@@ -56,34 +56,59 @@ type Operator struct {
56
56
57
57
//Operators struct represents list of Operators returned by Relaodly
58
58
type Operators struct {
59
- Content []Operator `json:"content"`
60
- Pageable struct {
61
- Sort struct {
62
- Sorted bool `json:"sorted"`
63
- Unsorted bool `json:"unsorted"`
64
- Empty bool `json:"empty"`
65
- } `json:"sort"`
66
- PageNumber int `json:"pageNumber"`
67
- PageSize int `json:"pageSize"`
68
- Offset int `json:"offset"`
69
- Unpaged bool `json:"unpaged"`
70
- Paged bool `json:"paged"`
71
- } `json:"pageable"`
72
- TotalElements int `json:"totalElements"`
73
- TotalPages int `json:"totalPages"`
74
- Last bool `json:"last"`
75
- Sort struct {
76
- Sorted bool `json:"sorted"`
77
- Unsorted bool `json:"unsorted"`
78
- Empty bool `json:"empty"`
79
- } `json:"sort"`
80
- First bool `json:"first"`
81
- NumberOfElements int `json:"numberOfElements"`
82
- Size int `json:"size"`
83
- Number int `json:"number"`
84
- Empty bool `json:"empty"`
59
+ ID int `json:"id"`
60
+ OperatorID int `json:"operatorId"`
61
+ Name string `json:"name"`
62
+ Bundle bool `json:"bundle"`
63
+ Data bool `json:"data"`
64
+ Pin bool `json:"pin"`
65
+ SupportsLocalAmounts bool `json:"supportsLocalAmounts"`
66
+ SupportsGeographicalRechargePlans bool `json:"supportsGeographicalRechargePlans"`
67
+ DenominationType string `json:"denominationType"`
68
+ SenderCurrencyCode string `json:"senderCurrencyCode"`
69
+ SenderCurrencySymbol string `json:"senderCurrencySymbol"`
70
+ DestinationCurrencyCode string `json:"destinationCurrencyCode"`
71
+ DestinationCurrencySymbol string `json:"destinationCurrencySymbol"`
72
+ Commission float64 `json:"commission"`
73
+ InternationalDiscount float64 `json:"internationalDiscount"`
74
+ LocalDiscount float64 `json:"localDiscount"`
75
+ MostPopularAmount interface {} `json:"mostPopularAmount"`
76
+ MostPopularLocalAmount interface {} `json:"mostPopularLocalAmount"`
77
+ MinAmount interface {} `json:"minAmount"`
78
+ MaxAmount interface {} `json:"maxAmount"`
79
+ LocalMinAmount interface {} `json:"localMinAmount"`
80
+ LocalMaxAmount interface {} `json:"localMaxAmount"`
81
+ Country struct {
82
+ IsoName string `json:"isoName"`
83
+ Name string `json:"name"`
84
+ } `json:"country"`
85
+ Fx struct {
86
+ Rate int `json:"rate"`
87
+ CurrencyCode string `json:"currencyCode"`
88
+ } `json:"fx"`
89
+ LogoUrls []string `json:"logoUrls"`
90
+ FixedAmounts []interface {} `json:"fixedAmounts"`
91
+ FixedAmountsDescriptions struct {
92
+ } `json:"fixedAmountsDescriptions"`
93
+ LocalFixedAmounts []interface {} `json:"localFixedAmounts"`
94
+ LocalFixedAmountsDescriptions struct {
95
+ } `json:"localFixedAmountsDescriptions"`
96
+ SuggestedAmounts []interface {} `json:"suggestedAmounts"`
97
+ SuggestedAmountsMap struct {
98
+ } `json:"suggestedAmountsMap"`
99
+ GeographicalRechargePlans []struct {
100
+ LocationCode string `json:"locationCode"`
101
+ LocationName string `json:"locationName"`
102
+ FixedAmounts []float64 `json:"fixedAmounts"`
103
+ LocalAmounts []float64 `json:"localAmounts"`
104
+ FixedAmountsDescriptions struct {} `json:"fixedAmountsDescriptions"`
105
+ LocalFixedAmountsDescriptions struct {} `json:"localFixedAmountsDescriptions"`
106
+ } `json:"geographicalRechargePlans"`
107
+ Promotions []interface {} `json:"promotions"`
85
108
}
86
109
110
+
111
+
87
112
//OperatorFXRate represents FXRate returned by the Reloadly API
88
113
type OperatorFXRate struct {
89
114
ID int `json:"id"`
@@ -235,7 +260,7 @@ func (c *Client) GetOperatorsById(operatorID int, options ...OperatorOptions)(*O
235
260
method := "GET"
236
261
client := c .HttpClient
237
262
query := fmt .Sprintf ("?suggestedAmounts=%t&suggestedAmountsMap=%t" , o .SuggestedAmounts ,o .SuggestedAmountsMap )
238
- requestUrl := c .BaseURL + "/operators" + strconv .Itoa (operatorID ) + query
263
+ requestUrl := c .BaseURL + "/operators/ " + strconv .Itoa (operatorID ) + query
239
264
req , _ := http .NewRequest (method , requestUrl , nil )
240
265
241
266
req .Header .Add ("Authorization" , c .AuthHeader )
0 commit comments