integrate-onpoint #5
			
				
			
		
		
		
	| 
						 | 
					@ -1,7 +1,6 @@
 | 
				
			||||||
package globalcare
 | 
					package globalcare
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"encoding/json"
 | 
					 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,20 +40,7 @@ type VehicleInfo struct {
 | 
				
			||||||
// CarOccupantAccidentInsuranceObj ...
 | 
					// CarOccupantAccidentInsuranceObj ...
 | 
				
			||||||
type CarOccupantAccidentInsuranceObj struct {
 | 
					type CarOccupantAccidentInsuranceObj struct {
 | 
				
			||||||
	NumberOfSeats int `json:"numberOfSeats"`
 | 
						NumberOfSeats int `json:"numberOfSeats"`
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (c *CarOccupantAccidentInsuranceObj) MarshalJSON() ([]byte, error) {
 | 
					 | 
				
			||||||
	buy := 1
 | 
					 | 
				
			||||||
	if c.NumberOfSeats <= 0 {
 | 
					 | 
				
			||||||
		buy = 2
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return json.Marshal(&struct {
 | 
					 | 
				
			||||||
	Buy           int `json:"buy"`
 | 
						Buy           int `json:"buy"`
 | 
				
			||||||
		NumberOfSeats int `json:"numberOfSeats"`
 | 
					 | 
				
			||||||
	}{
 | 
					 | 
				
			||||||
		Buy:           buy,
 | 
					 | 
				
			||||||
		NumberOfSeats: c.NumberOfSeats,
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// InsuredInfo ...
 | 
					// InsuredInfo ...
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue