1
|
|
|
package mollie |
2
|
|
|
|
3
|
|
|
import ( |
4
|
|
|
"encoding/json" |
5
|
|
|
"fmt" |
6
|
|
|
"strings" |
7
|
|
|
"time" |
8
|
|
|
) |
9
|
|
|
|
10
|
|
|
// Amount represents a currency and value pair. |
11
|
|
|
type Amount struct { |
12
|
|
|
Currency string `json:"currency,omitempty" url:"currency,omitempty"` |
13
|
|
|
Value string `json:"value,omitempty" url:"value,omitempty"` |
14
|
|
|
} |
15
|
|
|
|
16
|
|
|
// Address provides a human friendly representation of a geographical space. |
17
|
|
|
// |
18
|
|
|
// When providing an address object as parameter to a request, the following conditions must be met: |
19
|
|
|
// |
20
|
|
|
// If any of the fields is provided, all fields have to be provided with exception of the region field. |
21
|
|
|
// If only the region field is given, one should provide all the other fields as per the previous condition. |
22
|
|
|
// For certain PayPal payments the region field is required. |
23
|
|
|
type Address struct { |
24
|
|
|
GivenName string `json:"givenName,omitempty"` |
25
|
|
|
FamilyName string `json:"familyName,omitempty"` |
26
|
|
|
StreetAndNumber string `json:"streetAndNumber,omitempty"` |
27
|
|
|
StreetAdditional string `json:"streetAdditional,omitempty"` |
28
|
|
|
PostalCode string `json:"postalCode,omitempty"` |
29
|
|
|
City string `json:"city,omitempty"` |
30
|
|
|
Region string `json:"region,omitempty"` |
31
|
|
|
Country string `json:"country,omitempty"` |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
// EntityType for an organization. |
35
|
|
|
type EntityType string |
36
|
|
|
|
37
|
|
|
// Supported entity types. |
38
|
|
|
const ( |
39
|
|
|
LimitedCompany EntityType = "limited-company" |
40
|
|
|
PublicLimitedCompany EntityType = "public-limited-company" |
41
|
|
|
EntrepreneurialCompany EntityType = "entrepreneurial-company" |
42
|
|
|
LimitedPartnershipLimitedCompany EntityType = "limited-partnership-limited-company" |
43
|
|
|
LimitedPartnership EntityType = "limited-partnership" |
44
|
|
|
GeneralPartnership EntityType = "general-partnership" |
45
|
|
|
RegisteredSoleTrader EntityType = "registered-sole-trader" |
46
|
|
|
SoleTrader EntityType = "sole-trader" |
47
|
|
|
CivilLawPartnership EntityType = "civil-law-partnership" |
48
|
|
|
PublicInstitution EntityType = "public-institution" |
49
|
|
|
) |
50
|
|
|
|
51
|
|
|
// Company information that allows to identify the business that is interacting with Mollie. |
52
|
|
|
type Company struct { |
53
|
|
|
RegistrationNumber string `json:"registrationNumber,omitempty"` |
54
|
|
|
VATNumber string `json:"vatNumber,omitempty"` |
55
|
|
|
EntityType EntityType `json:"entityType,omitempty"` |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
// ShortDate is a string representing a date in YYYY-MM-DD format. |
59
|
|
|
type ShortDate struct { |
60
|
|
|
time.Time |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
// MarshalJSON overrides the default marshal action |
64
|
|
|
// for the Date struct. Returns date as YYYY-MM-DD formatted string. |
65
|
|
|
func (d *ShortDate) MarshalJSON() ([]byte, error) { |
66
|
1 |
|
bts, _ := json.Marshal(d.Time.Format("2006-01-02")) |
67
|
|
|
|
68
|
1 |
|
return bts, nil |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
// UnmarshalJSON overrides the default unmarshal action |
72
|
|
|
// for the Date struct, as we need links to be pointers to the time.Time struct. |
73
|
|
|
func (d *ShortDate) UnmarshalJSON(b []byte) error { |
74
|
1 |
|
s := string(b) |
75
|
|
|
|
76
|
1 |
|
s = strings.Trim(s, "\"") |
77
|
|
|
|
78
|
1 |
|
date, err := time.Parse("2006-01-02", s) |
79
|
1 |
|
if err != nil { |
80
|
1 |
|
return fmt.Errorf("time_parse_error: %w", err) |
|
|
|
|
81
|
|
|
} |
82
|
|
|
|
83
|
1 |
|
d.Time = date |
84
|
|
|
|
85
|
1 |
|
return nil |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
// Locale represents a country and language in ISO-15897 format. |
89
|
|
|
type Locale string |
90
|
|
|
|
91
|
|
|
// Mollie supported locales. |
92
|
|
|
const ( |
93
|
|
|
English Locale = "en_US" |
94
|
|
|
EnglishGB Locale = "en_GB" |
95
|
|
|
Dutch Locale = "nl_NL" |
96
|
|
|
DutchBelgium Locale = "nl_BE" |
97
|
|
|
French Locale = "fr_FR" |
98
|
|
|
FrenchBelgium Locale = "fr_BE" |
99
|
|
|
German Locale = "de_DE" |
100
|
|
|
GermanAustria Locale = "de_AT" |
101
|
|
|
GermanSwiss Locale = "de_CH" |
102
|
|
|
Spanish Locale = "es_ES" |
103
|
|
|
Catalan Locale = "ca_ES" |
104
|
|
|
Portuguese Locale = "pt_PT" |
105
|
|
|
Italian Locale = "it_IT" |
106
|
|
|
Norwegian Locale = "nb_NO" |
107
|
|
|
Swedish Locale = "sv_SE" |
108
|
|
|
Finish Locale = "fi_FI" |
109
|
|
|
Danish Locale = "da_DK" |
110
|
|
|
Icelandic Locale = "is_IS" |
111
|
|
|
Hungarian Locale = "hu_HU" |
112
|
|
|
Polish Locale = "pl_PL" |
113
|
|
|
Latvian Locale = "lv_LV" |
114
|
|
|
Lithuanian Locale = "lt_LT" |
115
|
|
|
) |
116
|
|
|
|
117
|
|
|
// PhoneNumber represents a phone number in the E.164 format. |
118
|
|
|
type PhoneNumber string |
119
|
|
|
|
120
|
|
|
// QRCode object represents an image of a QR code. |
121
|
|
|
type QRCode struct { |
122
|
|
|
Height int `json:"height,omitempty"` |
123
|
|
|
Width int `json:"width,omitempty"` |
124
|
|
|
Src string `json:"src,omitempty"` |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
// URL in Mollie are commonly represented as objects with an href and type field. |
128
|
|
|
type URL struct { |
129
|
|
|
Href string `json:"href,omitempty"` |
130
|
|
|
Type string `json:"type,omitempty"` |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
// PaginationLinks describes the hal component of paginated responses. |
134
|
|
|
type PaginationLinks struct { |
135
|
|
|
Self *URL `json:"self,omitempty"` |
136
|
|
|
Previous *URL `json:"previous,omitempty"` |
137
|
|
|
Next *URL `json:"next,omitempty"` |
138
|
|
|
Documentation *URL `json:"documentation,omitempty"` |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
// CategoryCode is DEPRECATED! |
142
|
|
|
// It is replaced by BusinessCategory type. |
143
|
|
|
type CategoryCode uint |
144
|
|
|
|
145
|
|
|
// DEPRECATED category codes. |
146
|
|
|
// Replaced by BusinessCategory values. |
147
|
|
|
const ( |
148
|
|
|
BookMagazinesAndNewspapers CategoryCode = 5192 |
149
|
|
|
GeneralMerchandise CategoryCode = 5399 |
150
|
|
|
FoodAndDrinks CategoryCode = 5499 |
151
|
|
|
AutomotiveProducts CategoryCode = 5533 |
152
|
|
|
ChildrenProducts CategoryCode = 5641 |
153
|
|
|
ClothingAndShoes CategoryCode = 5651 |
154
|
|
|
MarketplaceCrowdfundingAndDonations CategoryCode = 5262 |
155
|
|
|
ElectronicsComputersAndSoftware CategoryCode = 5732 |
156
|
|
|
HostingOrVpnServices CategoryCode = 5734 |
157
|
|
|
Entertainment CategoryCode = 5735 |
158
|
|
|
CreditsOrVouchersOrGiftCards CategoryCode = 5815 |
159
|
|
|
Alcohol CategoryCode = 5921 |
160
|
|
|
JewelryAndAccessories CategoryCode = 5944 |
161
|
|
|
HealthAndBeautyProducts CategoryCode = 5977 |
162
|
|
|
FinancialServices CategoryCode = 6012 |
163
|
|
|
Consultancy CategoryCode = 7299 |
164
|
|
|
TravelRentalAndTransportation CategoryCode = 7999 |
165
|
|
|
AdvisingOrCoachingOrTraining CategoryCode = 8299 |
166
|
|
|
CharityAndDonations CategoryCode = 8398 |
167
|
|
|
PoliticalParties CategoryCode = 8699 |
168
|
|
|
Others CategoryCode = 0 |
169
|
|
|
) |
170
|
|
|
|
171
|
|
|
// BusinessCategory specifies an industry or category. |
172
|
|
|
// It replaces the DEPRECATED CategoryCode type. |
173
|
|
|
type BusinessCategory string |
174
|
|
|
|
175
|
|
|
// Available business categories. |
176
|
|
|
const ( |
177
|
|
|
PetShopsPetFoodAndSupplies BusinessCategory = "PET_SHOPS" |
178
|
|
|
VeterinaryServices BusinessCategory = "VETERINARY_SERVICES" |
179
|
|
|
ACAndHeatingContractors BusinessCategory = "AC_AND_HEATING_CONTRACTORS" |
180
|
|
|
CarpentryContractors BusinessCategory = "CARPENTRY_CONTRACTORS" |
181
|
|
|
ElectricalContractors BusinessCategory = "ELECTRICAL_CONTRACTORS" |
182
|
|
|
EquipmentToolsOrFurnitureRentalOrLeasing BusinessCategory = "EQUIPMENT_TOOLS_FURNITURE_RENTAL_LEASING" |
183
|
|
|
GeneralContractors BusinessCategory = "GENERAL_CONTRACTORS" |
184
|
|
|
SpecialTradeContractors BusinessCategory = "SPECIAL_TRADE_CONTRACTORS" |
185
|
|
|
CharityAndDonationsCategory BusinessCategory = "CHARITY_AND_DONATIONS" |
186
|
|
|
FundraisingCrowdfundingAndSocialServiceOrganizations BusinessCategory = "FUNDRAISING_CROWDFUNDING_SOCIAL_SERVICE" |
187
|
|
|
Apps BusinessCategory = "APPS" |
188
|
|
|
BooksMediaMoviesMusic BusinessCategory = "BOOKS_MEDIA_MOVIES_MUSIC" |
189
|
|
|
Games BusinessCategory = "GAMES" |
190
|
|
|
SoftwareAndSubscriptions BusinessCategory = "SOFTWARE_AND_SUBSCRIPTIONS" |
191
|
|
|
ChildCareServices BusinessCategory = "CHILD_CARE_SERVICES" |
192
|
|
|
CollegesOrUniversities BusinessCategory = "COLLEGES_UNIVERSITIES" |
193
|
|
|
ElementaryOrSecondarySchools BusinessCategory = "ELEMENTARY_SECONDARY_SCHOOLS" |
194
|
|
|
OtherEducationalServices BusinessCategory = "OTHER_EDUCATIONAL_SERVICES" |
195
|
|
|
VocationalSchoolsOrTradeSchools BusinessCategory = "VOCATIONAL_SCHOOLS_TRADE_SCHOOLS" |
196
|
|
|
AmusementParksCircusesCarnivalsAndFortuneTellers BusinessCategory = "AMUSEMENT_PARKS" |
197
|
|
|
EventTicketing BusinessCategory = "EVENT_TICKETING" |
198
|
|
|
GamingEstablishmentsBilliardsPoolBowlingArcades BusinessCategory = "GAMING_ESTABLISHMENTS" |
199
|
|
|
MovieTheatres BusinessCategory = "MOVIE_THEATRES" |
200
|
|
|
MusiciansBandsOrOrchestras BusinessCategory = "MUSICIANS_BANDS_ORCHESTRAS" |
201
|
|
|
OnlineGambling BusinessCategory = "ONLINE_GAMBLING" |
202
|
|
|
OtherEntertainmentAndRecreation BusinessCategory = "OTHER_ENTERTAINMENT_RECREATION" |
203
|
|
|
SportingAndRecreationalCamps BusinessCategory = "SPORTING_RECREATIONAL_CAMPS" |
204
|
|
|
SportsForecastingOrPredictionServices BusinessCategory = "SPORTS_FORECASTING" |
205
|
|
|
CreditCounsellingOrCreditRepair BusinessCategory = "CREDIT_COUNSELLING_REPAIR" |
206
|
|
|
DigitalWallets BusinessCategory = "DIGITAL_WALLETS" |
207
|
|
|
InvestmentServices BusinessCategory = "INVESTMENT_SERVICES" |
208
|
|
|
MoneyServicesOrTransmission BusinessCategory = "MONEY_SERVICES" |
209
|
|
|
MortgagesInsurancesLoansAndFinancialAdvice BusinessCategory = "MORTGAGES_INSURANCES_LOANS_FINANCIAL_ADVICE" |
210
|
|
|
SecurityBrokersOrDealers BusinessCategory = "SECURITY_BROKERS_DEALERS" |
211
|
|
|
TrustOffices BusinessCategory = "TRUST_OFFICES" |
212
|
|
|
VirtualCurrenciesAndCryptoCurrencies BusinessCategory = "VIRTUAL_CRYPTO_CURRENCIES" |
213
|
|
|
CaterersPrepareAndDelivery BusinessCategory = "CATERERS" |
214
|
|
|
FastFoodRestaurants BusinessCategory = "FAST_FOOD_RESTAURANTS" |
215
|
|
|
GroceryStoresSupermarketsAndFoodProductStores BusinessCategory = "FOOD_PRODUCT_STORES" |
216
|
|
|
RestaurantsNightlifeAndOtherOnPremiseConsumption BusinessCategory = "RESTAURANTS_NIGHTLIFE" |
217
|
|
|
BoatRentalsAndLeasing BusinessCategory = "BOAT_RENTALS_LEASING" |
218
|
|
|
CruiseLines BusinessCategory = "CRUISE_LINES" |
219
|
|
|
HotelsMotelsResortsInnsAndOtherLodgingAndHospitality BusinessCategory = "LODGING" |
220
|
|
|
PropertyRentalsOrCamping BusinessCategory = "PROPERTY_RENTALS_CAMPING" |
221
|
|
|
Marketplaces BusinessCategory = "MARKETPLACES" |
222
|
|
|
DentalLabAndOrOphthalmicEquipmentAndSupplies BusinessCategory = "DENTAL_EQUIPMENT_SUPPLIES" |
223
|
|
|
DentistsAndOrthodontists BusinessCategory = "DENTISTS_ORTHODONTISTS" |
224
|
|
|
DoctorsPhysiciansAndOtherMedicalServices BusinessCategory = "MEDICAL_SERVICES" |
225
|
|
|
DrugStoresPharmaciesAndPrescriptionMedicine BusinessCategory = "DRUG_PHARMACIES_PRESCRIPTION" |
226
|
|
|
MedicalDevices BusinessCategory = "MEDICAL_DEVICES" |
227
|
|
|
MedicalOrganizations BusinessCategory = "MEDICAL_ORGANIZATIONS" |
228
|
|
|
MentalHealthServices BusinessCategory = "MENTAL_HEALTH_SERVICES" |
229
|
|
|
NursingOrPersonalCareFacilitiesAndAssistedLiving BusinessCategory = "NURSING" |
230
|
|
|
OpticiansAndEyeglasses BusinessCategory = "OPTICIANS_EYEGLASSES" |
231
|
|
|
CivicFraternalOrSocialAssociations BusinessCategory = "SOCIAL_ASSOCIATIONS" |
232
|
|
|
GymsMembershipFeeBasedSports BusinessCategory = "MEMBERSHIP_FEE_BASED_SPORTS" |
233
|
|
|
OtherMembershipOrganizations BusinessCategory = "OTHER_MEMBERSHIP_ORGANIZATIONS" |
234
|
|
|
AdultContentOrServices BusinessCategory = "ADULT_CONTENT_SERVICES" |
235
|
|
|
CounselingServices BusinessCategory = "COUNSELING_SERVICES" |
236
|
|
|
DatingServices BusinessCategory = "DATING_SERVICES" |
237
|
|
|
HealthAndBeautySpas BusinessCategory = "HEALTH_BEAUTY_SPAS" |
238
|
|
|
LandscapingServices BusinessCategory = "LANDSCAPING_SERVICES" |
239
|
|
|
LaundryOrDryCleaningServices BusinessCategory = "LAUNDRY_DRYCLEANING_SERVICES" |
240
|
|
|
MassageParlours BusinessCategory = "MASSAGE_PARLOURS" |
241
|
|
|
OtherPersonalServices BusinessCategory = "OTHER_PERSONAL_SERVICES" |
242
|
|
|
PhotographyStudios BusinessCategory = "PHOTOGRAPHY_STUDIOS" |
243
|
|
|
SalonsOrBarbers BusinessCategory = "SALONS_BARBERS" |
244
|
|
|
PoliticalPartiesCategory BusinessCategory = "POLITICAL_PARTIES" |
245
|
|
|
AccountingAuditingBookkeepingAndTaxPreparationServices BusinessCategory = "ACCOUNTING_AUDITING_BOOKKEEPING_TAX_PREPARATION_SERVICES" |
246
|
|
|
AdvertisingServices BusinessCategory = "ADVERTISING_SERVICES" |
247
|
|
|
CleaningAndMaintenanceJanitorialServices BusinessCategory = "CLEANING_MAINTENANCE_JANITORIAL_SERVICES" |
248
|
|
|
ComputerRepair BusinessCategory = "COMPUTER_REPAIR" |
249
|
|
|
ConsultancyCategory BusinessCategory = "CONSULTANCY" |
250
|
|
|
DetectiveOrProtectiveAgenciesSecurityServices BusinessCategory = "SECURITY_SERVICES" |
251
|
|
|
DirectMarketing BusinessCategory = "DIRECT_MARKETING" |
252
|
|
|
FuneralServicesAndCrematories BusinessCategory = "FUNERAL_SERVICES" |
253
|
|
|
GovernmentServices BusinessCategory = "GOVERNMENT_SERVICES" |
254
|
|
|
HostingAndVpnServices BusinessCategory = "HOSTING_VPN_SERVICES" |
255
|
|
|
IndustrialSuppliesNotElsewhereClassified BusinessCategory = "INDUSTRIAL_SUPPLIES_NOT_ELSEWHERE_CLASSIFIED" |
256
|
|
|
LegalServicesAndAttorneys BusinessCategory = "LEGAL_SERVICES_ATTORNEYS" |
257
|
|
|
MotionPictureOrVideoTapeProductionAndOrDistribution BusinessCategory = "MOTION_PICTURES_DISTRIBUTION" |
258
|
|
|
OtherBusinessServices BusinessCategory = "OTHER_BUSINESS_SERVICES" |
259
|
|
|
PrintingAndPublishing BusinessCategory = "PRINTING_PUBLISHING" |
260
|
|
|
RealEstateAgents BusinessCategory = "REAL_ESTATE_AGENTS" |
261
|
|
|
SanitationPolishingAndSpecialtyCleaning BusinessCategory = "SANITATION_POLISHING_SPECIALTY_CLEANING" |
262
|
|
|
StationeryOrOfficeSupplies BusinessCategory = "OFFICE_SUPPLIES" |
263
|
|
|
TestingLaboratoriesNotMedical BusinessCategory = "TESTING_LABORATORIES_NOT_MEDICAL" |
264
|
|
|
TrainingAndCoaching BusinessCategory = "TRAINING_AND_COACHING" |
265
|
|
|
Utilities BusinessCategory = "UTILITIES" |
266
|
|
|
ReligiousOrganizations BusinessCategory = "RELIGIOUS_ORGANIZATIONS" |
267
|
|
|
SportsClothingShoesAndAccessories BusinessCategory = "CLOTHING_SHOES_ACCESSORIES" |
268
|
|
|
ArtDealersGalleriesCommercialPhotographyAndGraphics BusinessCategory = "COMMERCIAL_ART" |
269
|
|
|
BeautyProducts BusinessCategory = "BEAUTY_PRODUCTS" |
270
|
|
|
BooksPeriodicalsAndNewspapers BusinessCategory = "BOOKS_PERIODICALS_NEWSPAPERS" |
271
|
|
|
BuildingHomeImprovementAndEquipment BusinessCategory = "HOME_IMPROVEMENT" |
272
|
|
|
CardsGiftsNoveltyAndSouvenirShops BusinessCategory = "GIFTS_SHOPS" |
273
|
|
|
CbdOrMarijuanaRelatedProducts BusinessCategory = "CBD_MARIJUANA_PRODUCTS" |
274
|
|
|
CoffeeShopsOrGrowShops BusinessCategory = "COFFEE_SHOPS" |
275
|
|
|
ConvenienceStoresSpecialtyMarketsHealthFoodStores BusinessCategory = "CONVENIENCE_STORES" |
276
|
|
|
CreditsVouchersGiftCardsForNonFinancialInstitutions BusinessCategory = "GIFT_CARDS" |
277
|
|
|
EroticToys BusinessCategory = "EROTIC_TOYS" |
278
|
|
|
FloristsFloristSupplier BusinessCategory = "FLORISTS" |
279
|
|
|
FuelDealers BusinessCategory = "FUEL_DEALERS" |
280
|
|
|
FurnitureHomeFurnishingsAndEquipmentStores BusinessCategory = "FURNITURE_FURNISHINGS_EQUIPMENT_STORES" |
281
|
|
|
GameToyAndHobbyShops BusinessCategory = "GAME_TOY_HOBBY_SHOPS" |
282
|
|
|
GardenAndOutdoorEquipment BusinessCategory = "OUTDOOR_EQUIPMENT" |
283
|
|
|
HomeElectronicsAndPersonalComputers BusinessCategory = "HOME_ELECTRONICS" |
284
|
|
|
HouseholdApplianceStores BusinessCategory = "HOUSEHOLD_APPLIANCE_STORES" |
285
|
|
|
JewelryWatchClockAndSilverwareStoresUnder1000Euro BusinessCategory = "JEWELRY_WATCH_CLOCK_AND_SILVERWARE_STORES_UNDER_1000" |
286
|
|
|
MusicStoresInstrumentsAndRecords BusinessCategory = "MUSIC_STORES" |
287
|
|
|
OtherMerchandise BusinessCategory = "OTHER_MERCHANDISE" |
288
|
|
|
PackageStoresBeerWineAndLiquor BusinessCategory = "LIQUOR_STORES" |
289
|
|
|
PaidTelevisionOrRadioServicesCableOrSatellite BusinessCategory = "PAID_TELEVISION_RADIO" |
290
|
|
|
PreciousStonesMetalsWatchesAndJewelryOver1000Euro BusinessCategory = "PRECIOUS_STONES_METALS_JEWELRY_OVER_1000" |
291
|
|
|
RepairShopsAndRelatedServicesNotElsewhereClassified BusinessCategory = "REPAIR_SHOPS" |
292
|
|
|
SecondHandOrUsedMerchandiseStores BusinessCategory = "SECOND_HAND_STORES" |
293
|
|
|
SportingGoodsStoresMiscellaneousAndSpecialtyRetailShops BusinessCategory = "SPORTING_GOODS_SPECIALTY_RETAIL_SHOPS" |
294
|
|
|
SupplementsNutritionVitaminStores BusinessCategory = "SUPPLEMENTS_STORES" |
295
|
|
|
TelecomEquipment BusinessCategory = "TELECOM_EQUIPMENT" |
296
|
|
|
TelecomServices BusinessCategory = "TELECOM_SERVICES" |
297
|
|
|
TobaccoCigarsECigarettesAndRelatedProducts BusinessCategory = "TOBACCO_PRODUCTS" |
298
|
|
|
TradersInDiamonds BusinessCategory = "TRADERS_DIAMONDS" |
299
|
|
|
TradersInGold BusinessCategory = "TRADERS_GOLD" |
300
|
|
|
WeaponsOrAmmunition BusinessCategory = "WEAPONS_AMMUNITION" |
301
|
|
|
CommuterTransportation BusinessCategory = "COMMUTER_TRANSPORTATION" |
302
|
|
|
CourierServicesAndFreightForwarders BusinessCategory = "COURIER_SERVICES" |
303
|
|
|
OtherTransportationServices BusinessCategory = "OTHER_TRANSPORTATION_SERVICES" |
304
|
|
|
TaxisLimosAndRideSharing BusinessCategory = "RIDESHARING" |
305
|
|
|
TravelAgenciesTourOperatorsAndOtherTravelServices BusinessCategory = "TRAVEL_SERVICES" |
306
|
|
|
AutomotivePartsAndAccessories BusinessCategory = "AUTOMOTIVE_PARTS_ACCESSORIES" |
307
|
|
|
AutoAndTruckSalesAndServiceDealersAndLeasingCompanies BusinessCategory = "CAR_TRUCK_COMPANIES" |
308
|
|
|
AutomotiveServices BusinessCategory = "AUTOMOTIVE_SERVICES" |
309
|
|
|
BicyclePartsShopsAndService BusinessCategory = "BICYCLE_PARTS_SHOPS_SERVICE" |
310
|
|
|
CarBoatCamperMobileHomeDealer BusinessCategory = "CAR_BOAT_CAMPER_MOBILE_HOME_DEALER" |
311
|
|
|
CarRentals BusinessCategory = "CAR_RENTALS" |
312
|
|
|
MotorcyclePartsShopsAndDealers BusinessCategory = "MOTORCYCLE_PARTS_SHOPS_AND_DEALERS" |
313
|
|
|
) |
314
|
|
|
|
315
|
|
|
// Mode contains information about the creation environment. |
316
|
|
|
type Mode string |
317
|
|
|
|
318
|
|
|
// Valid modes. |
319
|
|
|
const ( |
320
|
|
|
LiveMode Mode = "live" |
321
|
|
|
TestMode Mode = "test" |
322
|
|
|
) |
323
|
|
|
|
324
|
|
|
// IncludeValue is a valid value for the Include query string parameter. |
325
|
|
|
type IncludeValue string |
326
|
|
|
|
327
|
|
|
// Supported Include values. |
328
|
|
|
const ( |
329
|
|
|
IncludeQrCode IncludeValue = "details.qrCode" |
330
|
|
|
IncludeRemainderDetails IncludeValue = "details.remainderDetails" |
331
|
|
|
IncludeIssuers IncludeValue = "issuers" |
332
|
|
|
IncludePricing IncludeValue = "pricing" |
333
|
|
|
) |
334
|
|
|
|
335
|
|
|
// EmbedValue describes the valid value of embed query string. |
336
|
|
|
type EmbedValue string |
337
|
|
|
|
338
|
|
|
// Valid Embed query string value. |
339
|
|
|
const ( |
340
|
|
|
EmbedPayments EmbedValue = "payments" |
341
|
|
|
EmbedRefunds EmbedValue = "refunds" |
342
|
|
|
EmbedShipments EmbedValue = "shipments" |
343
|
|
|
EmbedChargebacks EmbedValue = "chargebacks" |
344
|
|
|
EmbedCaptures EmbedValue = "captures" |
345
|
|
|
EmbedOrganization EmbedValue = "organization" |
346
|
|
|
EmbedOnboarding EmbedValue = "onboarding" |
347
|
|
|
) |
348
|
|
|
|
349
|
|
|
// Rate describes service rates, further divided into fixed and percentage costs. |
350
|
|
|
type Rate struct { |
351
|
|
|
Variable string `json:"variable,omitempty"` |
352
|
|
|
Fixed *Amount `json:"fixed,omitempty"` |
353
|
|
|
} |
354
|
|
|
|
355
|
|
|
// Image describes a generic image resource retrieved by Mollie. |
356
|
|
|
type Image struct { |
357
|
|
|
Size1x string `json:"size1X,omitempty"` |
358
|
|
|
Size2X string `json:"size2X,omitempty"` |
359
|
|
|
Svg string `json:"svg,omitempty"` |
360
|
|
|
} |
361
|
|
|
|
362
|
|
|
// Personal data of your customer. |
363
|
|
|
type Owner struct { |
364
|
|
|
Email string `json:"email,omitempty"` |
365
|
|
|
GivenName string `json:"givenName,omitempty"` |
366
|
|
|
FamilyName string `json:"familyName,omitempty"` |
367
|
|
|
Locale Locale `json:"locale,omitempty"` |
368
|
|
|
} |
369
|
|
|
|