diff --git a/Client.go b/Client.go index ae6a780..2b765f4 100644 --- a/Client.go +++ b/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package connectsdk diff --git a/Client_Logging_test.go b/Client_Logging_test.go index 9173b7b..21c2ec5 100644 --- a/Client_Logging_test.go +++ b/Client_Logging_test.go @@ -6,6 +6,7 @@ import ( "net/http" "net/url" "strconv" + "strings" "testing" "time" @@ -25,6 +26,50 @@ var convertAmountJSON = `{ "convertedAmount": 4547504 }` +var createPaymentUnicodeJSON = `{ + "creationOutput": { + "additionalReference": "00000012341000059598", + "externalReference": "000000123410000595980000100001" + }, + "payment": { + "id": "000000123410000595980000100001", + "paymentOutput": { + "amountOfMoney": { + "amount": 2345, + "currencyCode": "CAD" + }, + "references": { + "paymentReference": "0" + }, + "paymentMethod": "redirect", + "redirectPaymentMethodSpecificOutput":{ + "paymentProductId":840, + "paymentProduct840SpecificOutput":{ + "customerAccount":{ + "firstName":"Theresa", + "surname":"Schröder" + }, + "customerAddress":{ + "city":"sittensen", + "countryCode":"DE", + "street":"Westerberg 25", + "zip":"27419" + } + } + } + }, + "status": "PENDING_APPROVAL", + "statusOutput": { + "isCancellable": true, + "statusCategory": "PENDING_MERCHANT", + "statusCode": 600, + "statusCodeChangeDateTime": "20160310094054", + "isAuthorized": true + } + } +} +` + var createPaymentJSON = `{ "creationOutput": { "additionalReference": "00000012341000059598", @@ -525,6 +570,167 @@ func TestDeleteToken(t *testing.T) { } } +func TestLoggingCreatePaymentUnicode(t *testing.T) { + logPrefix := "TestLoggingCreatePayment" + + responseHeaders := map[string]string{ + "Content-Type": "application/json", + "Dummy": "dummy", + "Location": "http://localhost/v1/1234/payments/000000123410000595980000100001", + } + requestHeaders := map[string][]string{} + + listener, sl, client, err := createTestEnvironment( + "/v1/1234/payments", + createRecordRequest(http.StatusCreated, createPaymentUnicodeJSON, responseHeaders, requestHeaders)) + if err != nil { + t.Fatalf("%v: %v", logPrefix, err) + } + defer listener.Close() + defer sl.Close() + defer client.Close() + + logger := &testLogger{} + client.EnableLogging(logger) + + var card definitions.Card + card.CardNumber = newString("1234567890123456") + card.Cvv = newString("123") + card.ExpiryDate = newString("1220") + + var cardPaymentMethodSpecificInput payment.CardPaymentMethodSpecificInput + cardPaymentMethodSpecificInput.Card = &card + cardPaymentMethodSpecificInput.PaymentProductID = newInt32(1) + + var amountOfMoney definitions.AmountOfMoney + amountOfMoney.Amount = newInt64(2345) + amountOfMoney.CurrencyCode = newString("CAD") + + var billingAddress definitions.Address + billingAddress.CountryCode = newString("CA") + + var customer payment.Customer + customer.BillingAddress = &billingAddress + + var order payment.Order + order.AmountOfMoney = &amountOfMoney + order.Customer = &customer + + var reqBody payment.CreateRequest + reqBody.CardPaymentMethodSpecificInput = &cardPaymentMethodSpecificInput + reqBody.Order = &order + + response, err := client.Merchant("1234").Payments().Create(reqBody, nil) + if err != nil { + t.Fatalf("%v: %v", logPrefix, err) + } + + if len(logger.entries) != 2 { + t.Fatalf("%v: loggerEntries %v", logPrefix, len(logger.entries)) + } + + if response.Payment == nil { + t.Fatalf("%v: responsePayment nil", logPrefix) + } + if response.Payment.ID == nil { + t.Fatalf("%v: responsePaymentID nil", logPrefix) + } + + firstEntry := logger.entries[0] + if firstEntry.request == nil { + t.Fatalf("%v: firstEntryRequest %v", logPrefix, firstEntry.request) + } + if firstEntry.request.Method() != "POST" { + t.Fatalf("%v: firstEntryRequestMethod %v", logPrefix, firstEntry.request.Method()) + } + if firstEntry.request.URL().Path != "/v1/1234/payments" { + t.Fatalf("%v: firstEntryRequestURL %v", logPrefix, firstEntry.request.URL().Path) + } + if firstEntry.request.Headers() == nil { + t.Fatalf("%v: firstEntryRequestHeaders %v", logPrefix, firstEntry.request.Headers()) + } + foundDate, foundMetainfo := false, false + for k, v := range firstEntry.request.Headers() { + switch k { + case "Authorization": + { + if v[0] != "********" { + t.Fatalf("%v: authorizationHeader %v", logPrefix, v) + } + + break + } + case "Date": + { + foundDate = true + + break + } + case "X-GCS-ServerMetaInfo": + { + foundMetainfo = true + + break + } + } + } + if !foundDate { + t.Fatalf("%v: date header not found", logPrefix) + } + if !foundMetainfo { + t.Fatalf("%v: meta info header not found", logPrefix) + } + if firstEntry.err != nil { + t.Fatalf("%v: firstEntryErr %v", logPrefix, firstEntry.err) + } + + secondEntry := logger.entries[1] + if !strings.Contains(secondEntry.response.Body(), "Schröder") { + t.Fatalf("%v: secondEntryResponse %v", logPrefix, secondEntry.response) + } + if secondEntry.response == nil { + t.Fatalf("%v: secondEntryResponse %v", logPrefix, secondEntry.response) + } + if secondEntry.response.StatusCode() != http.StatusCreated { + t.Fatalf("%v: secondEntryResponseStatusCode %v", logPrefix, secondEntry.response.StatusCode()) + } + if secondEntry.response.ContentType() != "application/json" { + t.Fatalf("%v: secondEntryResponseContentType %v", logPrefix, secondEntry.response.ContentType()) + } + if secondEntry.response.Headers() == nil { + t.Fatalf("%v: secondEntryResponseHeaders %v", logPrefix, secondEntry.response.Headers()) + } + if secondEntry.response.Body() == "" { + t.Fatalf("%v: secondEntryResponseBody %v", logPrefix, secondEntry.response.Body()) + } + + foundDate, foundDummy := false, false + for k := range secondEntry.response.Headers() { + switch k { + case "Date": + { + foundDate = true + + break + } + case "Dummy": + { + foundDummy = true + + break + } + } + } + if !foundDate { + t.Fatalf("%v: date header not found", logPrefix) + } + if !foundDummy { + t.Fatalf("%v: dummy header not found", logPrefix) + } + if secondEntry.err != nil { + t.Fatalf("%v: secondEntryErr %v", logPrefix, secondEntry.err) + } +} func TestLoggingCreatePayment(t *testing.T) { logPrefix := "TestLoggingCreatePayment" diff --git a/communicator/MetaDataProvider.go b/communicator/MetaDataProvider.go index 8b362ce..0f25f5b 100644 --- a/communicator/MetaDataProvider.go +++ b/communicator/MetaDataProvider.go @@ -40,7 +40,7 @@ func getPlatformIdentifier() string { } const sdkIdentifier = "GoServerSDK/v" + sdkVersion -const sdkVersion = "1.4.0" +const sdkVersion = "1.5.0" const serverMetaInfoHeader = "X-GCS-ServerMetaInfo" // NewMetaDataProviderWithBuilder creates a MetaDataProvider with the given MetaDataProviderBuilder diff --git a/domain/capture/Capture.go b/domain/capture/Capture.go new file mode 100644 index 0000000..520e9ce --- /dev/null +++ b/domain/capture/Capture.go @@ -0,0 +1,17 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package capture + +// Capture represents class Capture +type Capture struct { + CaptureOutput *Output `json:"captureOutput,omitempty"` + ID *string `json:"id,omitempty"` + Status *string `json:"status,omitempty"` + StatusOutput *StatusOutput `json:"statusOutput,omitempty"` +} + +// NewCapture constructs a new Capture +func NewCapture() *Capture { + return &Capture{} +} diff --git a/domain/capture/CapturesResponse.go b/domain/capture/CapturesResponse.go new file mode 100644 index 0000000..f03fe8f --- /dev/null +++ b/domain/capture/CapturesResponse.go @@ -0,0 +1,14 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package capture + +// CapturesResponse represents class CapturesResponse +type CapturesResponse struct { + Captures *[]Capture `json:"captures,omitempty"` +} + +// NewCapturesResponse constructs a new CapturesResponse +func NewCapturesResponse() *CapturesResponse { + return &CapturesResponse{} +} diff --git a/domain/capture/Output.go b/domain/capture/Output.go new file mode 100644 index 0000000..eb535de --- /dev/null +++ b/domain/capture/Output.go @@ -0,0 +1,30 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package capture + +import ( + "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/payment" +) + +// Output represents class CaptureOutput +type Output struct { + AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` + AmountPaid *int64 `json:"amountPaid,omitempty"` + BankTransferPaymentMethodSpecificOutput *payment.BankTransferPaymentMethodSpecificOutput `json:"bankTransferPaymentMethodSpecificOutput,omitempty"` + CardPaymentMethodSpecificOutput *payment.CardPaymentMethodSpecificOutput `json:"cardPaymentMethodSpecificOutput,omitempty"` + CashPaymentMethodSpecificOutput *payment.CashPaymentMethodSpecificOutput `json:"cashPaymentMethodSpecificOutput,omitempty"` + DirectDebitPaymentMethodSpecificOutput *payment.NonSepaDirectDebitPaymentMethodSpecificOutput `json:"directDebitPaymentMethodSpecificOutput,omitempty"` + InvoicePaymentMethodSpecificOutput *payment.InvoicePaymentMethodSpecificOutput `json:"invoicePaymentMethodSpecificOutput,omitempty"` + MobilePaymentMethodSpecificOutput *payment.MobilePaymentMethodSpecificOutput `json:"mobilePaymentMethodSpecificOutput,omitempty"` + PaymentMethod *string `json:"paymentMethod,omitempty"` + RedirectPaymentMethodSpecificOutput *payment.RedirectPaymentMethodSpecificOutput `json:"redirectPaymentMethodSpecificOutput,omitempty"` + References *payment.References `json:"references,omitempty"` + SepaDirectDebitPaymentMethodSpecificOutput *payment.SepaDirectDebitPaymentMethodSpecificOutput `json:"sepaDirectDebitPaymentMethodSpecificOutput,omitempty"` +} + +// NewOutput constructs a new Output +func NewOutput() *Output { + return &Output{} +} diff --git a/domain/capture/Response.go b/domain/capture/Response.go new file mode 100644 index 0000000..47d25b4 --- /dev/null +++ b/domain/capture/Response.go @@ -0,0 +1,17 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package capture + +// Response represents class CaptureResponse +type Response struct { + CaptureOutput *Output `json:"captureOutput,omitempty"` + ID *string `json:"id,omitempty"` + Status *string `json:"status,omitempty"` + StatusOutput *StatusOutput `json:"statusOutput,omitempty"` +} + +// NewResponse constructs a new Response +func NewResponse() *Response { + return &Response{} +} diff --git a/domain/capture/StatusOutput.go b/domain/capture/StatusOutput.go new file mode 100644 index 0000000..604191e --- /dev/null +++ b/domain/capture/StatusOutput.go @@ -0,0 +1,14 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package capture + +// StatusOutput represents class CaptureStatusOutput +type StatusOutput struct { + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewStatusOutput constructs a new StatusOutput +func NewStatusOutput() *StatusOutput { + return &StatusOutput{} +} diff --git a/domain/definitions/AbstractOrderStatus.go b/domain/definitions/AbstractOrderStatus.go index dfbb27d..6ff5adc 100644 --- a/domain/definitions/AbstractOrderStatus.go +++ b/domain/definitions/AbstractOrderStatus.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // AbstractOrderStatus represents class AbstractOrderStatus -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AbstractOrderStatus type AbstractOrderStatus struct { ID *string `json:"id,omitempty"` } diff --git a/domain/definitions/AbstractPaymentMethodSpecificInput.go b/domain/definitions/AbstractPaymentMethodSpecificInput.go index e9ef607..6d60af0 100644 --- a/domain/definitions/AbstractPaymentMethodSpecificInput.go +++ b/domain/definitions/AbstractPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // AbstractPaymentMethodSpecificInput represents class AbstractPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AbstractPaymentMethodSpecificInput type AbstractPaymentMethodSpecificInput struct { PaymentProductID *int32 `json:"paymentProductId,omitempty"` } diff --git a/domain/definitions/AdditionalOrderInputAirlineData.go b/domain/definitions/AdditionalOrderInputAirlineData.go index c176864..f9b6690 100644 --- a/domain/definitions/AdditionalOrderInputAirlineData.go +++ b/domain/definitions/AdditionalOrderInputAirlineData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // AdditionalOrderInputAirlineData represents class AdditionalOrderInputAirlineData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AdditionalOrderInputAirlineData type AdditionalOrderInputAirlineData struct { AirlineData *AirlineData `json:"airlineData,omitempty"` } diff --git a/domain/definitions/Address.go b/domain/definitions/Address.go index f4b2c36..ab71201 100644 --- a/domain/definitions/Address.go +++ b/domain/definitions/Address.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // Address represents class Address -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Address type Address struct { AdditionalInfo *string `json:"additionalInfo,omitempty"` City *string `json:"city,omitempty"` diff --git a/domain/definitions/AirlineData.go b/domain/definitions/AirlineData.go index d7d35d8..00d2198 100644 --- a/domain/definitions/AirlineData.go +++ b/domain/definitions/AirlineData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // AirlineData represents class AirlineData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AirlineData type AirlineData struct { AgentNumericCode *string `json:"agentNumericCode,omitempty"` Code *string `json:"code,omitempty"` diff --git a/domain/definitions/AirlineFlightLeg.go b/domain/definitions/AirlineFlightLeg.go index c0d38b3..2d9b403 100644 --- a/domain/definitions/AirlineFlightLeg.go +++ b/domain/definitions/AirlineFlightLeg.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // AirlineFlightLeg represents class AirlineFlightLeg -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AirlineFlightLeg type AirlineFlightLeg struct { AirlineClass *string `json:"airlineClass,omitempty"` ArrivalAirport *string `json:"arrivalAirport,omitempty"` diff --git a/domain/definitions/AmountOfMoney.go b/domain/definitions/AmountOfMoney.go index c2d33ae..cef9a97 100644 --- a/domain/definitions/AmountOfMoney.go +++ b/domain/definitions/AmountOfMoney.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // AmountOfMoney represents class AmountOfMoney -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AmountOfMoney type AmountOfMoney struct { Amount *int64 `json:"amount,omitempty"` CurrencyCode *string `json:"currencyCode,omitempty"` diff --git a/domain/definitions/BankAccount.go b/domain/definitions/BankAccount.go index 80dbdff..e49dbe1 100644 --- a/domain/definitions/BankAccount.go +++ b/domain/definitions/BankAccount.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // BankAccount represents class BankAccount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankAccount type BankAccount struct { AccountHolderName *string `json:"accountHolderName,omitempty"` } diff --git a/domain/definitions/BankAccountBban.go b/domain/definitions/BankAccountBban.go index 0da7130..264ced8 100644 --- a/domain/definitions/BankAccountBban.go +++ b/domain/definitions/BankAccountBban.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // BankAccountBban represents class BankAccountBban -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankAccountBban type BankAccountBban struct { AccountHolderName *string `json:"accountHolderName,omitempty"` AccountNumber *string `json:"accountNumber,omitempty"` diff --git a/domain/definitions/BankAccountIban.go b/domain/definitions/BankAccountIban.go index 331fe65..1297a27 100644 --- a/domain/definitions/BankAccountIban.go +++ b/domain/definitions/BankAccountIban.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // BankAccountIban represents class BankAccountIban -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankAccountIban type BankAccountIban struct { AccountHolderName *string `json:"accountHolderName,omitempty"` Iban *string `json:"iban,omitempty"` diff --git a/domain/definitions/Card.go b/domain/definitions/Card.go index 0e08eb8..a1f9fa4 100644 --- a/domain/definitions/Card.go +++ b/domain/definitions/Card.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // Card represents class Card -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Card type Card struct { CardNumber *string `json:"cardNumber,omitempty"` CardholderName *string `json:"cardholderName,omitempty"` diff --git a/domain/definitions/CardEssentials.go b/domain/definitions/CardEssentials.go index 77eea1f..e87a090 100644 --- a/domain/definitions/CardEssentials.go +++ b/domain/definitions/CardEssentials.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // CardEssentials represents class CardEssentials -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CardEssentials type CardEssentials struct { CardNumber *string `json:"cardNumber,omitempty"` ExpiryDate *string `json:"expiryDate,omitempty"` diff --git a/domain/definitions/CardFraudResults.go b/domain/definitions/CardFraudResults.go index e0c8fa2..251c376 100644 --- a/domain/definitions/CardFraudResults.go +++ b/domain/definitions/CardFraudResults.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // CardFraudResults represents class CardFraudResults -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CardFraudResults type CardFraudResults struct { AvsResult *string `json:"avsResult,omitempty"` CvvResult *string `json:"cvvResult,omitempty"` diff --git a/domain/definitions/CardWithoutCvv.go b/domain/definitions/CardWithoutCvv.go index f96a221..3bd630f 100644 --- a/domain/definitions/CardWithoutCvv.go +++ b/domain/definitions/CardWithoutCvv.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // CardWithoutCvv represents class CardWithoutCvv -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CardWithoutCvv type CardWithoutCvv struct { CardNumber *string `json:"cardNumber,omitempty"` CardholderName *string `json:"cardholderName,omitempty"` diff --git a/domain/definitions/CompanyInformation.go b/domain/definitions/CompanyInformation.go index a4b831a..8d570b9 100644 --- a/domain/definitions/CompanyInformation.go +++ b/domain/definitions/CompanyInformation.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // CompanyInformation represents class CompanyInformation -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CompanyInformation type CompanyInformation struct { Name *string `json:"name,omitempty"` } diff --git a/domain/definitions/ContactDetailsBase.go b/domain/definitions/ContactDetailsBase.go index ca4a371..b32fcb1 100644 --- a/domain/definitions/ContactDetailsBase.go +++ b/domain/definitions/ContactDetailsBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // ContactDetailsBase represents class ContactDetailsBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ContactDetailsBase type ContactDetailsBase struct { EmailAddress *string `json:"emailAddress,omitempty"` EmailMessageType *string `json:"emailMessageType,omitempty"` diff --git a/domain/definitions/CustomerBase.go b/domain/definitions/CustomerBase.go index 467d388..3d90fb6 100644 --- a/domain/definitions/CustomerBase.go +++ b/domain/definitions/CustomerBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // CustomerBase represents class CustomerBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CustomerBase type CustomerBase struct { CompanyInformation *CompanyInformation `json:"companyInformation,omitempty"` MerchantCustomerID *string `json:"merchantCustomerId,omitempty"` diff --git a/domain/definitions/FraudFields.go b/domain/definitions/FraudFields.go index 4f71baf..bd13547 100644 --- a/domain/definitions/FraudFields.go +++ b/domain/definitions/FraudFields.go @@ -1,23 +1,27 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // FraudFields represents class FraudFields -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_FraudFields type FraudFields struct { - CustomerIPAddress *string `json:"customerIpAddress,omitempty"` - DefaultFormFill *string `json:"defaultFormFill,omitempty"` - GiftCardType *string `json:"giftCardType,omitempty"` - GiftMessage *string `json:"giftMessage,omitempty"` - HasForgottenPwd *bool `json:"hasForgottenPwd,omitempty"` - HasPassword *bool `json:"hasPassword,omitempty"` - IsPreviousCustomer *bool `json:"isPreviousCustomer,omitempty"` - OrderTimezone *string `json:"orderTimezone,omitempty"` - ShipComments *string `json:"shipComments,omitempty"` - ShipmentTrackingNumber *string `json:"shipmentTrackingNumber,omitempty"` - UserData *[]string `json:"userData,omitempty"` - Website *string `json:"website,omitempty"` + AddressesAreIdentical *bool `json:"addressesAreIdentical,omitempty"` + BlackListData *string `json:"blackListData,omitempty"` + CardOwnerAddress *Address `json:"cardOwnerAddress,omitempty"` + CustomerIPAddress *string `json:"customerIpAddress,omitempty"` + DefaultFormFill *string `json:"defaultFormFill,omitempty"` + FingerPrintActivated *bool `json:"fingerPrintActivated,omitempty"` + GiftCardType *string `json:"giftCardType,omitempty"` + GiftMessage *string `json:"giftMessage,omitempty"` + HasForgottenPwd *bool `json:"hasForgottenPwd,omitempty"` + HasPassword *bool `json:"hasPassword,omitempty"` + IsPreviousCustomer *bool `json:"isPreviousCustomer,omitempty"` + OrderTimezone *string `json:"orderTimezone,omitempty"` + ShipComments *string `json:"shipComments,omitempty"` + ShipmentTrackingNumber *string `json:"shipmentTrackingNumber,omitempty"` + ShippingDetails *FraudFieldsShippingDetails `json:"shippingDetails,omitempty"` + UserData *[]string `json:"userData,omitempty"` + Website *string `json:"website,omitempty"` } // NewFraudFields constructs a new FraudFields diff --git a/domain/definitions/FraudFieldsShippingDetails.go b/domain/definitions/FraudFieldsShippingDetails.go new file mode 100644 index 0000000..6ca5b97 --- /dev/null +++ b/domain/definitions/FraudFieldsShippingDetails.go @@ -0,0 +1,16 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package definitions + +// FraudFieldsShippingDetails represents class FraudFieldsShippingDetails +type FraudFieldsShippingDetails struct { + MethodDetails *string `json:"methodDetails,omitempty"` + MethodSpeed *int32 `json:"methodSpeed,omitempty"` + MethodType *int32 `json:"methodType,omitempty"` +} + +// NewFraudFieldsShippingDetails constructs a new FraudFieldsShippingDetails +func NewFraudFieldsShippingDetails() *FraudFieldsShippingDetails { + return &FraudFieldsShippingDetails{} +} diff --git a/domain/definitions/FraudResults.go b/domain/definitions/FraudResults.go index 188c2e5..f674439 100644 --- a/domain/definitions/FraudResults.go +++ b/domain/definitions/FraudResults.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // FraudResults represents class FraudResults -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_FraudResults type FraudResults struct { FraudServiceResult *string `json:"fraudServiceResult,omitempty"` } diff --git a/domain/definitions/FraudResultsRetailDecisions.go b/domain/definitions/FraudResultsRetailDecisions.go index a17d5a6..5da863d 100644 --- a/domain/definitions/FraudResultsRetailDecisions.go +++ b/domain/definitions/FraudResultsRetailDecisions.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // FraudResultsRetailDecisions represents class FraudResultsRetailDecisions -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_FraudResultsRetailDecisions type FraudResultsRetailDecisions struct { FraudCode *string `json:"fraudCode,omitempty"` FraudNeural *string `json:"fraudNeural,omitempty"` diff --git a/domain/definitions/KeyValuePair.go b/domain/definitions/KeyValuePair.go index 32d4208..d5c9a94 100644 --- a/domain/definitions/KeyValuePair.go +++ b/domain/definitions/KeyValuePair.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // KeyValuePair represents class KeyValuePair -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_KeyValuePair type KeyValuePair struct { Key *string `json:"key,omitempty"` Value *string `json:"value,omitempty"` diff --git a/domain/definitions/OrderStatusOutput.go b/domain/definitions/OrderStatusOutput.go index 9c4c55a..c9f55ec 100644 --- a/domain/definitions/OrderStatusOutput.go +++ b/domain/definitions/OrderStatusOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions import "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" // OrderStatusOutput represents class OrderStatusOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderStatusOutput type OrderStatusOutput struct { Errors *[]errors.APIError `json:"errors,omitempty"` IsCancellable *bool `json:"isCancellable,omitempty"` diff --git a/domain/definitions/PaymentProductFilter.go b/domain/definitions/PaymentProductFilter.go index 963e9a7..57d01ab 100644 --- a/domain/definitions/PaymentProductFilter.go +++ b/domain/definitions/PaymentProductFilter.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // PaymentProductFilter represents class PaymentProductFilter -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFilter type PaymentProductFilter struct { Groups *[]string `json:"groups,omitempty"` Products *[]int32 `json:"products,omitempty"` diff --git a/domain/definitions/PersonalNameBase.go b/domain/definitions/PersonalNameBase.go index 7c8a3e5..38e3c2c 100644 --- a/domain/definitions/PersonalNameBase.go +++ b/domain/definitions/PersonalNameBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // PersonalNameBase represents class PersonalNameBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalNameBase type PersonalNameBase struct { FirstName *string `json:"firstName,omitempty"` Surname *string `json:"surname,omitempty"` diff --git a/domain/definitions/ResultDoRiskAssessment.go b/domain/definitions/ResultDoRiskAssessment.go index 673f143..f7de7a4 100644 --- a/domain/definitions/ResultDoRiskAssessment.go +++ b/domain/definitions/ResultDoRiskAssessment.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // ResultDoRiskAssessment represents class ResultDoRiskAssessment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ResultDoRiskAssessment type ResultDoRiskAssessment struct { Category *string `json:"category,omitempty"` Result *string `json:"result,omitempty"` diff --git a/domain/definitions/RetailDecisionsCCFraudCheckOutput.go b/domain/definitions/RetailDecisionsCCFraudCheckOutput.go index c21813c..4426b05 100644 --- a/domain/definitions/RetailDecisionsCCFraudCheckOutput.go +++ b/domain/definitions/RetailDecisionsCCFraudCheckOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // RetailDecisionsCCFraudCheckOutput represents class RetailDecisionsCCFraudCheckOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RetailDecisionsCCFraudCheckOutput type RetailDecisionsCCFraudCheckOutput struct { FraudCode *string `json:"fraudCode,omitempty"` FraudNeural *string `json:"fraudNeural,omitempty"` diff --git a/domain/definitions/ValidationBankAccountCheck.go b/domain/definitions/ValidationBankAccountCheck.go index 04ad240..5c175c6 100644 --- a/domain/definitions/ValidationBankAccountCheck.go +++ b/domain/definitions/ValidationBankAccountCheck.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // ValidationBankAccountCheck represents class ValidationBankAccountCheck -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ValidationBankAccountCheck type ValidationBankAccountCheck struct { Code *string `json:"code,omitempty"` Description *string `json:"description,omitempty"` diff --git a/domain/definitions/ValidationBankAccountOutput.go b/domain/definitions/ValidationBankAccountOutput.go index 82139dd..5f01f03 100644 --- a/domain/definitions/ValidationBankAccountOutput.go +++ b/domain/definitions/ValidationBankAccountOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package definitions // ValidationBankAccountOutput represents class ValidationBankAccountOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ValidationBankAccountOutput type ValidationBankAccountOutput struct { Checks *[]ValidationBankAccountCheck `json:"checks,omitempty"` NewBankName *string `json:"newBankName,omitempty"` diff --git a/domain/errors/APIError.go b/domain/errors/APIError.go index 98afba1..5e16740 100644 --- a/domain/errors/APIError.go +++ b/domain/errors/APIError.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package errors // APIError represents class APIError -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_APIError type APIError struct { Category *string `json:"category,omitempty"` Code *string `json:"code,omitempty"` diff --git a/domain/errors/ErrorResponse.go b/domain/errors/ErrorResponse.go index 2b225d7..f1ccdae 100644 --- a/domain/errors/ErrorResponse.go +++ b/domain/errors/ErrorResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package errors // ErrorResponse represents class ErrorResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ErrorResponse type ErrorResponse struct { ErrorID *string `json:"errorId,omitempty"` Errors *[]APIError `json:"errors,omitempty"` diff --git a/domain/hostedcheckout/CreateRequest.go b/domain/hostedcheckout/CreateRequest.go index a5415ed..ee0c148 100644 --- a/domain/hostedcheckout/CreateRequest.go +++ b/domain/hostedcheckout/CreateRequest.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout @@ -9,7 +9,6 @@ import ( ) // CreateRequest represents class CreateHostedCheckoutRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreateHostedCheckoutRequest type CreateRequest struct { BankTransferPaymentMethodSpecificInput *payment.BankTransferPaymentMethodSpecificInputBase `json:"bankTransferPaymentMethodSpecificInput,omitempty"` CardPaymentMethodSpecificInput *payment.CardPaymentMethodSpecificInputBase `json:"cardPaymentMethodSpecificInput,omitempty"` diff --git a/domain/hostedcheckout/CreateResponse.go b/domain/hostedcheckout/CreateResponse.go index d31fe7d..0bddc95 100644 --- a/domain/hostedcheckout/CreateResponse.go +++ b/domain/hostedcheckout/CreateResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout // CreateResponse represents class CreateHostedCheckoutResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreateHostedCheckoutResponse type CreateResponse struct { RETURNMAC *string `json:"RETURNMAC,omitempty"` HostedCheckoutID *string `json:"hostedCheckoutId,omitempty"` diff --git a/domain/hostedcheckout/CreatedPaymentOutput.go b/domain/hostedcheckout/CreatedPaymentOutput.go index 1129db2..06d273a 100644 --- a/domain/hostedcheckout/CreatedPaymentOutput.go +++ b/domain/hostedcheckout/CreatedPaymentOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout import "github.com/Ingenico-ePayments/connect-sdk-go/domain/payment" // CreatedPaymentOutput represents class CreatedPaymentOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreatedPaymentOutput type CreatedPaymentOutput struct { DisplayedData *DisplayedData `json:"displayedData,omitempty"` Payment *payment.Payment `json:"payment,omitempty"` diff --git a/domain/hostedcheckout/DisplayedData.go b/domain/hostedcheckout/DisplayedData.go index 862f89f..e69a139 100644 --- a/domain/hostedcheckout/DisplayedData.go +++ b/domain/hostedcheckout/DisplayedData.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // DisplayedData represents class DisplayedData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_DisplayedData type DisplayedData struct { DisplayedDataType *string `json:"displayedDataType,omitempty"` RenderingData *string `json:"renderingData,omitempty"` diff --git a/domain/hostedcheckout/GetResponse.go b/domain/hostedcheckout/GetResponse.go index 2dc48c7..a2416db 100644 --- a/domain/hostedcheckout/GetResponse.go +++ b/domain/hostedcheckout/GetResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout // GetResponse represents class GetHostedCheckoutResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_GetHostedCheckoutResponse type GetResponse struct { CreatedPaymentOutput *CreatedPaymentOutput `json:"createdPaymentOutput,omitempty"` Status *string `json:"status,omitempty"` diff --git a/domain/hostedcheckout/PaymentProductFiltersHostedCheckout.go b/domain/hostedcheckout/PaymentProductFiltersHostedCheckout.go index b3c95c4..17e3a91 100644 --- a/domain/hostedcheckout/PaymentProductFiltersHostedCheckout.go +++ b/domain/hostedcheckout/PaymentProductFiltersHostedCheckout.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // PaymentProductFiltersHostedCheckout represents class PaymentProductFiltersHostedCheckout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFiltersHostedCheckout type PaymentProductFiltersHostedCheckout struct { Exclude *definitions.PaymentProductFilter `json:"exclude,omitempty"` RestrictTo *definitions.PaymentProductFilter `json:"restrictTo,omitempty"` diff --git a/domain/hostedcheckout/SpecificInput.go b/domain/hostedcheckout/SpecificInput.go index 148a42b..8d7cb52 100644 --- a/domain/hostedcheckout/SpecificInput.go +++ b/domain/hostedcheckout/SpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckout // SpecificInput represents class HostedCheckoutSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_HostedCheckoutSpecificInput type SpecificInput struct { IsRecurring *bool `json:"isRecurring,omitempty"` Locale *string `json:"locale,omitempty"` diff --git a/domain/payment/AbstractPaymentMethodSpecificOutput.go b/domain/payment/AbstractPaymentMethodSpecificOutput.go index 37bb737..0d50350 100644 --- a/domain/payment/AbstractPaymentMethodSpecificOutput.go +++ b/domain/payment/AbstractPaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // AbstractPaymentMethodSpecificOutput represents class AbstractPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AbstractPaymentMethodSpecificOutput type AbstractPaymentMethodSpecificOutput struct { PaymentProductID *int32 `json:"paymentProductId,omitempty"` } diff --git a/domain/payment/AdditionalOrderInput.go b/domain/payment/AdditionalOrderInput.go index eb09e8a..78566dd 100644 --- a/domain/payment/AdditionalOrderInput.go +++ b/domain/payment/AdditionalOrderInput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // AdditionalOrderInput represents class AdditionalOrderInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AdditionalOrderInput type AdditionalOrderInput struct { AirlineData *definitions.AirlineData `json:"airlineData,omitempty"` // Deprecated: Use Order.shoppingCart instead diff --git a/domain/payment/AddressPersonal.go b/domain/payment/AddressPersonal.go index 4d3f11a..43e40a4 100644 --- a/domain/payment/AddressPersonal.go +++ b/domain/payment/AddressPersonal.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // AddressPersonal represents class AddressPersonal -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AddressPersonal type AddressPersonal struct { AdditionalInfo *string `json:"additionalInfo,omitempty"` City *string `json:"city,omitempty"` diff --git a/domain/payment/AmountBreakdown.go b/domain/payment/AmountBreakdown.go index 3f9eaf4..41e018e 100644 --- a/domain/payment/AmountBreakdown.go +++ b/domain/payment/AmountBreakdown.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // AmountBreakdown represents class AmountBreakdown -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AmountBreakdown type AmountBreakdown struct { Amount *int64 `json:"amount,omitempty"` Type *string `json:"type,omitempty"` diff --git a/domain/payment/ApprovalResponse.go b/domain/payment/ApprovalResponse.go index d6520ac..0686225 100644 --- a/domain/payment/ApprovalResponse.go +++ b/domain/payment/ApprovalResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApprovalResponse represents class PaymentApprovalResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentApprovalResponse type ApprovalResponse struct { CardPaymentMethodSpecificOutput *ApprovePaymentCardPaymentMethodSpecificOutput `json:"cardPaymentMethodSpecificOutput,omitempty"` MobilePaymentMethodSpecificOutput *ApprovePaymentMobilePaymentMethodSpecificOutput `json:"mobilePaymentMethodSpecificOutput,omitempty"` diff --git a/domain/payment/ApprovePaymentCardPaymentMethodSpecificOutput.go b/domain/payment/ApprovePaymentCardPaymentMethodSpecificOutput.go index cb0928c..c45804e 100644 --- a/domain/payment/ApprovePaymentCardPaymentMethodSpecificOutput.go +++ b/domain/payment/ApprovePaymentCardPaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApprovePaymentCardPaymentMethodSpecificOutput represents class ApprovePaymentCardPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentCardPaymentMethodSpecificOutput type ApprovePaymentCardPaymentMethodSpecificOutput struct { VoidResponseID *string `json:"voidResponseId,omitempty"` } diff --git a/domain/payment/ApprovePaymentMobilePaymentMethodSpecificOutput.go b/domain/payment/ApprovePaymentMobilePaymentMethodSpecificOutput.go index f20a530..c1fa45a 100644 --- a/domain/payment/ApprovePaymentMobilePaymentMethodSpecificOutput.go +++ b/domain/payment/ApprovePaymentMobilePaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApprovePaymentMobilePaymentMethodSpecificOutput represents class ApprovePaymentMobilePaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentMobilePaymentMethodSpecificOutput type ApprovePaymentMobilePaymentMethodSpecificOutput struct { VoidResponseID *string `json:"voidResponseId,omitempty"` } diff --git a/domain/payment/ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput.go b/domain/payment/ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput.go index 03f713a..c777dad 100644 --- a/domain/payment/ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput.go +++ b/domain/payment/ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput represents class ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput type ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput struct { DateCollect *string `json:"dateCollect,omitempty"` Token *string `json:"token,omitempty"` diff --git a/domain/payment/ApprovePaymentPaymentMethodSpecificInput.go b/domain/payment/ApprovePaymentPaymentMethodSpecificInput.go index 7377580..b9320bd 100644 --- a/domain/payment/ApprovePaymentPaymentMethodSpecificInput.go +++ b/domain/payment/ApprovePaymentPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApprovePaymentPaymentMethodSpecificInput represents class ApprovePaymentPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentPaymentMethodSpecificInput type ApprovePaymentPaymentMethodSpecificInput struct { DateCollect *string `json:"dateCollect,omitempty"` Token *string `json:"token,omitempty"` diff --git a/domain/payment/ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput.go b/domain/payment/ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput.go index 75460ce..01a9758 100644 --- a/domain/payment/ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput.go +++ b/domain/payment/ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput represents class ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput type ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput struct { DateCollect *string `json:"dateCollect,omitempty"` Token *string `json:"token,omitempty"` diff --git a/domain/payment/ApproveRequest.go b/domain/payment/ApproveRequest.go index a2fc2d0..7fdde60 100644 --- a/domain/payment/ApproveRequest.go +++ b/domain/payment/ApproveRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ApproveRequest represents class ApprovePaymentRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentRequest type ApproveRequest struct { Amount *int64 `json:"amount,omitempty"` DirectDebitPaymentMethodSpecificInput *ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput `json:"directDebitPaymentMethodSpecificInput,omitempty"` diff --git a/domain/payment/BankTransferPaymentMethodSpecificInput.go b/domain/payment/BankTransferPaymentMethodSpecificInput.go index 5a04350..c3b983c 100644 --- a/domain/payment/BankTransferPaymentMethodSpecificInput.go +++ b/domain/payment/BankTransferPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // BankTransferPaymentMethodSpecificInput represents class BankTransferPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankTransferPaymentMethodSpecificInput type BankTransferPaymentMethodSpecificInput struct { AdditionalReference *string `json:"additionalReference,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/payment/BankTransferPaymentMethodSpecificInputBase.go b/domain/payment/BankTransferPaymentMethodSpecificInputBase.go index 08e3887..d3d3a7d 100644 --- a/domain/payment/BankTransferPaymentMethodSpecificInputBase.go +++ b/domain/payment/BankTransferPaymentMethodSpecificInputBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // BankTransferPaymentMethodSpecificInputBase represents class BankTransferPaymentMethodSpecificInputBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankTransferPaymentMethodSpecificInputBase type BankTransferPaymentMethodSpecificInputBase struct { AdditionalReference *string `json:"additionalReference,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/payment/BankTransferPaymentMethodSpecificOutput.go b/domain/payment/BankTransferPaymentMethodSpecificOutput.go index 745b1ae..5b524c4 100644 --- a/domain/payment/BankTransferPaymentMethodSpecificOutput.go +++ b/domain/payment/BankTransferPaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // BankTransferPaymentMethodSpecificOutput represents class BankTransferPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankTransferPaymentMethodSpecificOutput type BankTransferPaymentMethodSpecificOutput struct { PaymentProductID *int32 `json:"paymentProductId,omitempty"` } diff --git a/domain/payment/CancelApprovalPaymentResponse.go b/domain/payment/CancelApprovalPaymentResponse.go index cf81e4f..8cc938e 100644 --- a/domain/payment/CancelApprovalPaymentResponse.go +++ b/domain/payment/CancelApprovalPaymentResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CancelApprovalPaymentResponse represents class CancelApprovalPaymentResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CancelApprovalPaymentResponse type CancelApprovalPaymentResponse struct { Payment *Payment `json:"payment,omitempty"` } diff --git a/domain/payment/CancelPaymentCardPaymentMethodSpecificOutput.go b/domain/payment/CancelPaymentCardPaymentMethodSpecificOutput.go index 3bc6eaf..f459c9a 100644 --- a/domain/payment/CancelPaymentCardPaymentMethodSpecificOutput.go +++ b/domain/payment/CancelPaymentCardPaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CancelPaymentCardPaymentMethodSpecificOutput represents class CancelPaymentCardPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CancelPaymentCardPaymentMethodSpecificOutput type CancelPaymentCardPaymentMethodSpecificOutput struct { VoidResponseID *string `json:"voidResponseId,omitempty"` } diff --git a/domain/payment/CancelPaymentMobilePaymentMethodSpecificOutput.go b/domain/payment/CancelPaymentMobilePaymentMethodSpecificOutput.go index c5a1482..07100f7 100644 --- a/domain/payment/CancelPaymentMobilePaymentMethodSpecificOutput.go +++ b/domain/payment/CancelPaymentMobilePaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CancelPaymentMobilePaymentMethodSpecificOutput represents class CancelPaymentMobilePaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CancelPaymentMobilePaymentMethodSpecificOutput type CancelPaymentMobilePaymentMethodSpecificOutput struct { VoidResponseID *string `json:"voidResponseId,omitempty"` } diff --git a/domain/payment/CancelResponse.go b/domain/payment/CancelResponse.go index ad8a58d..6a96d53 100644 --- a/domain/payment/CancelResponse.go +++ b/domain/payment/CancelResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CancelResponse represents class CancelPaymentResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CancelPaymentResponse type CancelResponse struct { CardPaymentMethodSpecificOutput *CancelPaymentCardPaymentMethodSpecificOutput `json:"cardPaymentMethodSpecificOutput,omitempty"` MobilePaymentMethodSpecificOutput *CancelPaymentMobilePaymentMethodSpecificOutput `json:"mobilePaymentMethodSpecificOutput,omitempty"` diff --git a/domain/payment/CapturePaymentRequest.go b/domain/payment/CapturePaymentRequest.go new file mode 100644 index 0000000..051ff73 --- /dev/null +++ b/domain/payment/CapturePaymentRequest.go @@ -0,0 +1,15 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package payment + +// CapturePaymentRequest represents class CapturePaymentRequest +type CapturePaymentRequest struct { + Amount *int64 `json:"amount,omitempty"` + IsFinal *bool `json:"isFinal,omitempty"` +} + +// NewCapturePaymentRequest constructs a new CapturePaymentRequest +func NewCapturePaymentRequest() *CapturePaymentRequest { + return &CapturePaymentRequest{} +} diff --git a/domain/payment/CardPaymentMethodSpecificInput.go b/domain/payment/CardPaymentMethodSpecificInput.go index e0ce20b..5419895 100644 --- a/domain/payment/CardPaymentMethodSpecificInput.go +++ b/domain/payment/CardPaymentMethodSpecificInput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CardPaymentMethodSpecificInput represents class CardPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CardPaymentMethodSpecificInput type CardPaymentMethodSpecificInput struct { AuthorizationMode *string `json:"authorizationMode,omitempty"` Card *definitions.Card `json:"card,omitempty"` @@ -21,6 +20,7 @@ type CardPaymentMethodSpecificInput struct { SkipFraudService *bool `json:"skipFraudService,omitempty"` Token *string `json:"token,omitempty"` Tokenize *bool `json:"tokenize,omitempty"` + TransactionChannel *string `json:"transactionChannel,omitempty"` } // NewCardPaymentMethodSpecificInput constructs a new CardPaymentMethodSpecificInput diff --git a/domain/payment/CardPaymentMethodSpecificInputBase.go b/domain/payment/CardPaymentMethodSpecificInputBase.go index dbdb2b6..b1ea305 100644 --- a/domain/payment/CardPaymentMethodSpecificInputBase.go +++ b/domain/payment/CardPaymentMethodSpecificInputBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CardPaymentMethodSpecificInputBase represents class CardPaymentMethodSpecificInputBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CardPaymentMethodSpecificInputBase type CardPaymentMethodSpecificInputBase struct { AuthorizationMode *string `json:"authorizationMode,omitempty"` CustomerReference *string `json:"customerReference,omitempty"` @@ -15,6 +14,7 @@ type CardPaymentMethodSpecificInputBase struct { SkipFraudService *bool `json:"skipFraudService,omitempty"` Token *string `json:"token,omitempty"` Tokenize *bool `json:"tokenize,omitempty"` + TransactionChannel *string `json:"transactionChannel,omitempty"` } // NewCardPaymentMethodSpecificInputBase constructs a new CardPaymentMethodSpecificInputBase diff --git a/domain/payment/CardPaymentMethodSpecificOutput.go b/domain/payment/CardPaymentMethodSpecificOutput.go index 8b92f9b..e8c9611 100644 --- a/domain/payment/CardPaymentMethodSpecificOutput.go +++ b/domain/payment/CardPaymentMethodSpecificOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CardPaymentMethodSpecificOutput represents class CardPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CardPaymentMethodSpecificOutput type CardPaymentMethodSpecificOutput struct { AuthorisationCode *string `json:"authorisationCode,omitempty"` Card *definitions.CardEssentials `json:"card,omitempty"` diff --git a/domain/payment/CashPaymentMethodSpecificInput.go b/domain/payment/CashPaymentMethodSpecificInput.go index 61d2483..2e7d0ba 100644 --- a/domain/payment/CashPaymentMethodSpecificInput.go +++ b/domain/payment/CashPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CashPaymentMethodSpecificInput represents class CashPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CashPaymentMethodSpecificInput type CashPaymentMethodSpecificInput struct { PaymentProduct1503SpecificInput *CashPaymentProduct1503SpecificInput `json:"paymentProduct1503SpecificInput,omitempty"` PaymentProduct1504SpecificInput *CashPaymentProduct1504SpecificInput `json:"paymentProduct1504SpecificInput,omitempty"` diff --git a/domain/payment/CashPaymentMethodSpecificInputBase.go b/domain/payment/CashPaymentMethodSpecificInputBase.go index 4f594d2..abbc2da 100644 --- a/domain/payment/CashPaymentMethodSpecificInputBase.go +++ b/domain/payment/CashPaymentMethodSpecificInputBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CashPaymentMethodSpecificInputBase represents class CashPaymentMethodSpecificInputBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CashPaymentMethodSpecificInputBase type CashPaymentMethodSpecificInputBase struct { PaymentProductID *int32 `json:"paymentProductId,omitempty"` } diff --git a/domain/payment/CashPaymentMethodSpecificOutput.go b/domain/payment/CashPaymentMethodSpecificOutput.go index 73638e2..a662127 100644 --- a/domain/payment/CashPaymentMethodSpecificOutput.go +++ b/domain/payment/CashPaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CashPaymentMethodSpecificOutput represents class CashPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CashPaymentMethodSpecificOutput type CashPaymentMethodSpecificOutput struct { PaymentProductID *int32 `json:"paymentProductId,omitempty"` } diff --git a/domain/payment/CashPaymentProduct1503SpecificInput.go b/domain/payment/CashPaymentProduct1503SpecificInput.go index 501497d..5be60ee 100644 --- a/domain/payment/CashPaymentProduct1503SpecificInput.go +++ b/domain/payment/CashPaymentProduct1503SpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CashPaymentProduct1503SpecificInput represents class CashPaymentProduct1503SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CashPaymentProduct1503SpecificInput type CashPaymentProduct1503SpecificInput struct { ReturnURL *string `json:"returnUrl,omitempty"` } diff --git a/domain/payment/CashPaymentProduct1504SpecificInput.go b/domain/payment/CashPaymentProduct1504SpecificInput.go index 68c2639..ceb5df9 100644 --- a/domain/payment/CashPaymentProduct1504SpecificInput.go +++ b/domain/payment/CashPaymentProduct1504SpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CashPaymentProduct1504SpecificInput represents class CashPaymentProduct1504SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CashPaymentProduct1504SpecificInput type CashPaymentProduct1504SpecificInput struct { ReturnURL *string `json:"returnUrl,omitempty"` } diff --git a/domain/payment/ContactDetails.go b/domain/payment/ContactDetails.go index 2deb1cc..1ad9950 100644 --- a/domain/payment/ContactDetails.go +++ b/domain/payment/ContactDetails.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ContactDetails represents class ContactDetails -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ContactDetails type ContactDetails struct { EmailAddress *string `json:"emailAddress,omitempty"` EmailMessageType *string `json:"emailMessageType,omitempty"` diff --git a/domain/payment/CreateRequest.go b/domain/payment/CreateRequest.go index 1fc2e7d..15937a9 100644 --- a/domain/payment/CreateRequest.go +++ b/domain/payment/CreateRequest.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CreateRequest represents class CreatePaymentRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreatePaymentRequest type CreateRequest struct { BankTransferPaymentMethodSpecificInput *BankTransferPaymentMethodSpecificInput `json:"bankTransferPaymentMethodSpecificInput,omitempty"` CardPaymentMethodSpecificInput *CardPaymentMethodSpecificInput `json:"cardPaymentMethodSpecificInput,omitempty"` diff --git a/domain/payment/CreateResponse.go b/domain/payment/CreateResponse.go index 17f25f4..cfd6c8c 100644 --- a/domain/payment/CreateResponse.go +++ b/domain/payment/CreateResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CreateResponse represents class CreatePaymentResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreatePaymentResponse type CreateResponse struct { CreationOutput *CreationOutput `json:"creationOutput,omitempty"` MerchantAction *MerchantAction `json:"merchantAction,omitempty"` diff --git a/domain/payment/CreateResult.go b/domain/payment/CreateResult.go index ffec999..4e91ef6 100644 --- a/domain/payment/CreateResult.go +++ b/domain/payment/CreateResult.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CreateResult represents class CreatePaymentResult -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreatePaymentResult type CreateResult struct { CreationOutput *CreationOutput `json:"creationOutput,omitempty"` MerchantAction *MerchantAction `json:"merchantAction,omitempty"` diff --git a/domain/payment/CreationOutput.go b/domain/payment/CreationOutput.go index 6f1cb70..bbf6566 100644 --- a/domain/payment/CreationOutput.go +++ b/domain/payment/CreationOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CreationOutput represents class PaymentCreationOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentCreationOutput type CreationOutput struct { AdditionalReference *string `json:"additionalReference,omitempty"` ExternalReference *string `json:"externalReference,omitempty"` diff --git a/domain/payment/CreationReferences.go b/domain/payment/CreationReferences.go index 38533fe..37f1b7b 100644 --- a/domain/payment/CreationReferences.go +++ b/domain/payment/CreationReferences.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // CreationReferences represents class PaymentCreationReferences -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentCreationReferences type CreationReferences struct { AdditionalReference *string `json:"additionalReference,omitempty"` ExternalReference *string `json:"externalReference,omitempty"` diff --git a/domain/payment/Customer.go b/domain/payment/Customer.go index fc76bea..3715456 100644 --- a/domain/payment/Customer.go +++ b/domain/payment/Customer.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // Customer represents class Customer -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Customer type Customer struct { BillingAddress *definitions.Address `json:"billingAddress,omitempty"` CompanyInformation *definitions.CompanyInformation `json:"companyInformation,omitempty"` diff --git a/domain/payment/DecryptedPaymentData.go b/domain/payment/DecryptedPaymentData.go index b05ccfd..c54feac 100644 --- a/domain/payment/DecryptedPaymentData.go +++ b/domain/payment/DecryptedPaymentData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // DecryptedPaymentData represents class DecryptedPaymentData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_DecryptedPaymentData type DecryptedPaymentData struct { CardholderName *string `json:"cardholderName,omitempty"` Cryptogram *string `json:"cryptogram,omitempty"` diff --git a/domain/payment/ErrorResponse.go b/domain/payment/ErrorResponse.go index f404693..abd622a 100644 --- a/domain/payment/ErrorResponse.go +++ b/domain/payment/ErrorResponse.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" // ErrorResponse represents class PaymentErrorResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentErrorResponse type ErrorResponse struct { ErrorID *string `json:"errorId,omitempty"` Errors *[]errors.APIError `json:"errors,omitempty"` diff --git a/domain/payment/ExternalCardholderAuthenticationData.go b/domain/payment/ExternalCardholderAuthenticationData.go index e21b957..c48609c 100644 --- a/domain/payment/ExternalCardholderAuthenticationData.go +++ b/domain/payment/ExternalCardholderAuthenticationData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ExternalCardholderAuthenticationData represents class ExternalCardholderAuthenticationData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ExternalCardholderAuthenticationData type ExternalCardholderAuthenticationData struct { Cavv *string `json:"cavv,omitempty"` CavvAlgorithm *string `json:"cavvAlgorithm,omitempty"` diff --git a/domain/payment/InvoicePaymentMethodSpecificInput.go b/domain/payment/InvoicePaymentMethodSpecificInput.go index 3cd400c..8e229e5 100644 --- a/domain/payment/InvoicePaymentMethodSpecificInput.go +++ b/domain/payment/InvoicePaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // InvoicePaymentMethodSpecificInput represents class InvoicePaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_InvoicePaymentMethodSpecificInput type InvoicePaymentMethodSpecificInput struct { AdditionalReference *string `json:"additionalReference,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/payment/InvoicePaymentMethodSpecificOutput.go b/domain/payment/InvoicePaymentMethodSpecificOutput.go index 8549736..dfaf2b5 100644 --- a/domain/payment/InvoicePaymentMethodSpecificOutput.go +++ b/domain/payment/InvoicePaymentMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // InvoicePaymentMethodSpecificOutput represents class InvoicePaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_InvoicePaymentMethodSpecificOutput type InvoicePaymentMethodSpecificOutput struct { PaymentProductID *int32 `json:"paymentProductId,omitempty"` } diff --git a/domain/payment/Level3SummaryData.go b/domain/payment/Level3SummaryData.go index ae9c3a2..4572168 100644 --- a/domain/payment/Level3SummaryData.go +++ b/domain/payment/Level3SummaryData.go @@ -1,18 +1,17 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // Level3SummaryData represents class Level3SummaryData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Level3SummaryData // -// Deprecated: Use ShoppingCart instead +// Deprecated: Use Order.shoppingCart instead type Level3SummaryData struct { - // Deprecated: Use ShoppingCart.discountAmount instead + // Deprecated: Use ShoppingCart.amountbreakdown with type DISCOUNT instead DiscountAmount *int64 `json:"discountAmount,omitempty"` - // Deprecated: Use ShoppingCart.dutyAmount instead + // Deprecated: Use ShoppingCart.amountbreakdown with type DUTY instead DutyAmount *int64 `json:"dutyAmount,omitempty"` - // Deprecated: Use ShoppingCart.shippingAmount instead + // Deprecated: Use ShoppingCart.amountbreakdown with type SHIPPING instead ShippingAmount *int64 `json:"shippingAmount,omitempty"` } diff --git a/domain/payment/LineItem.go b/domain/payment/LineItem.go index 9f7e60d..6c4e494 100644 --- a/domain/payment/LineItem.go +++ b/domain/payment/LineItem.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // LineItem represents class LineItem -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_LineItem type LineItem struct { AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` InvoiceData *LineItemInvoiceData `json:"invoiceData,omitempty"` diff --git a/domain/payment/LineItemInvoiceData.go b/domain/payment/LineItemInvoiceData.go index b5a4a68..5045fcd 100644 --- a/domain/payment/LineItemInvoiceData.go +++ b/domain/payment/LineItemInvoiceData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // LineItemInvoiceData represents class LineItemInvoiceData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_LineItemInvoiceData type LineItemInvoiceData struct { Description *string `json:"description,omitempty"` MerchantLinenumber *string `json:"merchantLinenumber,omitempty"` diff --git a/domain/payment/LineItemLevel3InterchangeInformation.go b/domain/payment/LineItemLevel3InterchangeInformation.go index 6880b31..03c3cf4 100644 --- a/domain/payment/LineItemLevel3InterchangeInformation.go +++ b/domain/payment/LineItemLevel3InterchangeInformation.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // LineItemLevel3InterchangeInformation represents class LineItemLevel3InterchangeInformation -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_LineItemLevel3InterchangeInformation type LineItemLevel3InterchangeInformation struct { DiscountAmount *int64 `json:"discountAmount,omitempty"` LineAmountTotal *int64 `json:"lineAmountTotal,omitempty"` diff --git a/domain/payment/MerchantAction.go b/domain/payment/MerchantAction.go index 48c8ae4..35bd22f 100644 --- a/domain/payment/MerchantAction.go +++ b/domain/payment/MerchantAction.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // MerchantAction represents class MerchantAction -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MerchantAction type MerchantAction struct { ActionType *string `json:"actionType,omitempty"` RedirectData *RedirectData `json:"redirectData,omitempty"` diff --git a/domain/payment/MobilePaymentData.go b/domain/payment/MobilePaymentData.go index e0c6184..9ce5169 100644 --- a/domain/payment/MobilePaymentData.go +++ b/domain/payment/MobilePaymentData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // MobilePaymentData represents class MobilePaymentData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentData type MobilePaymentData struct { Dpan *string `json:"dpan,omitempty"` ExpiryDate *string `json:"expiryDate,omitempty"` diff --git a/domain/payment/MobilePaymentMethodSpecificInput.go b/domain/payment/MobilePaymentMethodSpecificInput.go index 6b61608..59ce7e4 100644 --- a/domain/payment/MobilePaymentMethodSpecificInput.go +++ b/domain/payment/MobilePaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // MobilePaymentMethodSpecificInput represents class MobilePaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentMethodSpecificInput type MobilePaymentMethodSpecificInput struct { AuthorizationMode *string `json:"authorizationMode,omitempty"` DecryptedPaymentData *DecryptedPaymentData `json:"decryptedPaymentData,omitempty"` diff --git a/domain/payment/MobilePaymentMethodSpecificOutput.go b/domain/payment/MobilePaymentMethodSpecificOutput.go index 445edce..4f73f37 100644 --- a/domain/payment/MobilePaymentMethodSpecificOutput.go +++ b/domain/payment/MobilePaymentMethodSpecificOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // MobilePaymentMethodSpecificOutput represents class MobilePaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentMethodSpecificOutput type MobilePaymentMethodSpecificOutput struct { AuthorisationCode *string `json:"authorisationCode,omitempty"` FraudResults *definitions.CardFraudResults `json:"fraudResults,omitempty"` diff --git a/domain/payment/MobilePaymentProduct320SpecificInput.go b/domain/payment/MobilePaymentProduct320SpecificInput.go index 7864424..a024397 100644 --- a/domain/payment/MobilePaymentProduct320SpecificInput.go +++ b/domain/payment/MobilePaymentProduct320SpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // MobilePaymentProduct320SpecificInput represents class MobilePaymentProduct320SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentProduct320SpecificInput type MobilePaymentProduct320SpecificInput struct { KeyID *string `json:"keyId,omitempty"` } diff --git a/domain/payment/NonSepaDirectDebitPaymentMethodSpecificInput.go b/domain/payment/NonSepaDirectDebitPaymentMethodSpecificInput.go index 5d1cbdf..5a526b9 100644 --- a/domain/payment/NonSepaDirectDebitPaymentMethodSpecificInput.go +++ b/domain/payment/NonSepaDirectDebitPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // NonSepaDirectDebitPaymentMethodSpecificInput represents class NonSepaDirectDebitPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_NonSepaDirectDebitPaymentMethodSpecificInput type NonSepaDirectDebitPaymentMethodSpecificInput struct { DateCollect *string `json:"dateCollect,omitempty"` DirectDebitText *string `json:"directDebitText,omitempty"` diff --git a/domain/payment/NonSepaDirectDebitPaymentMethodSpecificOutput.go b/domain/payment/NonSepaDirectDebitPaymentMethodSpecificOutput.go index a2ad4ed..88d2f0c 100644 --- a/domain/payment/NonSepaDirectDebitPaymentMethodSpecificOutput.go +++ b/domain/payment/NonSepaDirectDebitPaymentMethodSpecificOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // NonSepaDirectDebitPaymentMethodSpecificOutput represents class NonSepaDirectDebitPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_NonSepaDirectDebitPaymentMethodSpecificOutput type NonSepaDirectDebitPaymentMethodSpecificOutput struct { FraudResults *definitions.FraudResults `json:"fraudResults,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/payment/NonSepaDirectDebitPaymentProduct705SpecificInput.go b/domain/payment/NonSepaDirectDebitPaymentProduct705SpecificInput.go index 1d1cde3..9e89891 100644 --- a/domain/payment/NonSepaDirectDebitPaymentProduct705SpecificInput.go +++ b/domain/payment/NonSepaDirectDebitPaymentProduct705SpecificInput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // NonSepaDirectDebitPaymentProduct705SpecificInput represents class NonSepaDirectDebitPaymentProduct705SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_NonSepaDirectDebitPaymentProduct705SpecificInput type NonSepaDirectDebitPaymentProduct705SpecificInput struct { AuthorisationID *string `json:"authorisationId,omitempty"` BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` diff --git a/domain/payment/Order.go b/domain/payment/Order.go index 217ec02..167aeaf 100644 --- a/domain/payment/Order.go +++ b/domain/payment/Order.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // Order represents class Order -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Order type Order struct { AdditionalInput *AdditionalOrderInput `json:"additionalInput,omitempty"` AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` diff --git a/domain/payment/OrderApprovePayment.go b/domain/payment/OrderApprovePayment.go index 40e8745..9664243 100644 --- a/domain/payment/OrderApprovePayment.go +++ b/domain/payment/OrderApprovePayment.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // OrderApprovePayment represents class OrderApprovePayment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderApprovePayment type OrderApprovePayment struct { AdditionalInput *definitions.AdditionalOrderInputAirlineData `json:"additionalInput,omitempty"` References *OrderReferencesApprovePayment `json:"references,omitempty"` diff --git a/domain/payment/OrderInvoiceData.go b/domain/payment/OrderInvoiceData.go index ee6c1ba..7455529 100644 --- a/domain/payment/OrderInvoiceData.go +++ b/domain/payment/OrderInvoiceData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // OrderInvoiceData represents class OrderInvoiceData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderInvoiceData type OrderInvoiceData struct { AdditionalData *string `json:"additionalData,omitempty"` InvoiceDate *string `json:"invoiceDate,omitempty"` diff --git a/domain/payment/OrderLineDetails.go b/domain/payment/OrderLineDetails.go index dc2adb3..5b9edbd 100644 --- a/domain/payment/OrderLineDetails.go +++ b/domain/payment/OrderLineDetails.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // OrderLineDetails represents class OrderLineDetails -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderLineDetails type OrderLineDetails struct { DiscountAmount *int64 `json:"discountAmount,omitempty"` LineAmountTotal *int64 `json:"lineAmountTotal,omitempty"` diff --git a/domain/payment/OrderOutput.go b/domain/payment/OrderOutput.go index 21cbbc3..ffcf1b0 100644 --- a/domain/payment/OrderOutput.go +++ b/domain/payment/OrderOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // OrderOutput represents class OrderOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderOutput type OrderOutput struct { AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` References *References `json:"references,omitempty"` diff --git a/domain/payment/OrderReferences.go b/domain/payment/OrderReferences.go index ee3cf8d..ecaa775 100644 --- a/domain/payment/OrderReferences.go +++ b/domain/payment/OrderReferences.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // OrderReferences represents class OrderReferences -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderReferences type OrderReferences struct { Descriptor *string `json:"descriptor,omitempty"` InvoiceData *OrderInvoiceData `json:"invoiceData,omitempty"` diff --git a/domain/payment/OrderReferencesApprovePayment.go b/domain/payment/OrderReferencesApprovePayment.go index 1be9957..db6a82c 100644 --- a/domain/payment/OrderReferencesApprovePayment.go +++ b/domain/payment/OrderReferencesApprovePayment.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // OrderReferencesApprovePayment represents class OrderReferencesApprovePayment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderReferencesApprovePayment type OrderReferencesApprovePayment struct { MerchantReference *string `json:"merchantReference,omitempty"` } diff --git a/domain/payment/OrderTypeInformation.go b/domain/payment/OrderTypeInformation.go index c61d295..88fb0ba 100644 --- a/domain/payment/OrderTypeInformation.go +++ b/domain/payment/OrderTypeInformation.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // OrderTypeInformation represents class OrderTypeInformation -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderTypeInformation type OrderTypeInformation struct { PurchaseType *string `json:"purchaseType,omitempty"` UsageType *string `json:"usageType,omitempty"` diff --git a/domain/payment/Output.go b/domain/payment/Output.go index a15bf53..30e5648 100644 --- a/domain/payment/Output.go +++ b/domain/payment/Output.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // Output represents class PaymentOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentOutput type Output struct { AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` AmountPaid *int64 `json:"amountPaid,omitempty"` diff --git a/domain/payment/Payment.go b/domain/payment/Payment.go index 844bb86..45b7916 100644 --- a/domain/payment/Payment.go +++ b/domain/payment/Payment.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // Payment represents class Payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Payment type Payment struct { ID *string `json:"id,omitempty"` PaymentOutput *Output `json:"paymentOutput,omitempty"` diff --git a/domain/payment/PersonalInformation.go b/domain/payment/PersonalInformation.go index 760bd27..c59518d 100644 --- a/domain/payment/PersonalInformation.go +++ b/domain/payment/PersonalInformation.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // PersonalInformation represents class PersonalInformation -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalInformation type PersonalInformation struct { DateOfBirth *string `json:"dateOfBirth,omitempty"` Gender *string `json:"gender,omitempty"` diff --git a/domain/payment/PersonalName.go b/domain/payment/PersonalName.go index afbadb5..eab0502 100644 --- a/domain/payment/PersonalName.go +++ b/domain/payment/PersonalName.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // PersonalName represents class PersonalName -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalName type PersonalName struct { FirstName *string `json:"firstName,omitempty"` Surname *string `json:"surname,omitempty"` diff --git a/domain/payment/Product836SpecificOutput.go b/domain/payment/Product836SpecificOutput.go index e73f0ec..ac63052 100644 --- a/domain/payment/Product836SpecificOutput.go +++ b/domain/payment/Product836SpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // Product836SpecificOutput represents class PaymentProduct836SpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProduct836SpecificOutput type Product836SpecificOutput struct { SecurityIndicator *string `json:"securityIndicator,omitempty"` } diff --git a/domain/payment/Product840CustomerAccount.go b/domain/payment/Product840CustomerAccount.go index 81f6e0d..8d3431d 100644 --- a/domain/payment/Product840CustomerAccount.go +++ b/domain/payment/Product840CustomerAccount.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // Product840CustomerAccount represents class PaymentProduct840CustomerAccount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProduct840CustomerAccount type Product840CustomerAccount struct { AccountID *string `json:"accountId,omitempty"` BillingAgreementID *string `json:"billingAgreementId,omitempty"` diff --git a/domain/payment/Product840SpecificOutput.go b/domain/payment/Product840SpecificOutput.go index 04a5678..9a8b599 100644 --- a/domain/payment/Product840SpecificOutput.go +++ b/domain/payment/Product840SpecificOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // Product840SpecificOutput represents class PaymentProduct840SpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProduct840SpecificOutput type Product840SpecificOutput struct { CustomerAccount *Product840CustomerAccount `json:"customerAccount,omitempty"` CustomerAddress *definitions.Address `json:"customerAddress,omitempty"` diff --git a/domain/payment/RedirectData.go b/domain/payment/RedirectData.go index ab38fb9..14b68b7 100644 --- a/domain/payment/RedirectData.go +++ b/domain/payment/RedirectData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RedirectData represents class RedirectData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectData type RedirectData struct { RETURNMAC *string `json:"RETURNMAC,omitempty"` RedirectURL *string `json:"redirectURL,omitempty"` diff --git a/domain/payment/RedirectPaymentMethodSpecificInput.go b/domain/payment/RedirectPaymentMethodSpecificInput.go index e819713..1683a6e 100644 --- a/domain/payment/RedirectPaymentMethodSpecificInput.go +++ b/domain/payment/RedirectPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RedirectPaymentMethodSpecificInput represents class RedirectPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentMethodSpecificInput type RedirectPaymentMethodSpecificInput struct { ExpirationPeriod *int32 `json:"expirationPeriod,omitempty"` IsRecurring *bool `json:"isRecurring,omitempty"` diff --git a/domain/payment/RedirectPaymentMethodSpecificInputBase.go b/domain/payment/RedirectPaymentMethodSpecificInputBase.go index e14c0d0..eadd9ec 100644 --- a/domain/payment/RedirectPaymentMethodSpecificInputBase.go +++ b/domain/payment/RedirectPaymentMethodSpecificInputBase.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RedirectPaymentMethodSpecificInputBase represents class RedirectPaymentMethodSpecificInputBase -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentMethodSpecificInputBase type RedirectPaymentMethodSpecificInputBase struct { ExpirationPeriod *int32 `json:"expirationPeriod,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/payment/RedirectPaymentMethodSpecificOutput.go b/domain/payment/RedirectPaymentMethodSpecificOutput.go index 78d6261..eef0430 100644 --- a/domain/payment/RedirectPaymentMethodSpecificOutput.go +++ b/domain/payment/RedirectPaymentMethodSpecificOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RedirectPaymentMethodSpecificOutput represents class RedirectPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentMethodSpecificOutput type RedirectPaymentMethodSpecificOutput struct { BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` PaymentProduct836SpecificOutput *Product836SpecificOutput `json:"paymentProduct836SpecificOutput,omitempty"` diff --git a/domain/payment/RedirectPaymentProduct809SpecificInput.go b/domain/payment/RedirectPaymentProduct809SpecificInput.go index 95f01b0..2d3e058 100644 --- a/domain/payment/RedirectPaymentProduct809SpecificInput.go +++ b/domain/payment/RedirectPaymentProduct809SpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RedirectPaymentProduct809SpecificInput represents class RedirectPaymentProduct809SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentProduct809SpecificInput type RedirectPaymentProduct809SpecificInput struct { // Deprecated: Use RedirectPaymentMethodSpecificInput.expirationPeriod instead ExpirationPeriod *string `json:"expirationPeriod,omitempty"` diff --git a/domain/payment/RedirectPaymentProduct816SpecificInput.go b/domain/payment/RedirectPaymentProduct816SpecificInput.go index b515193..e654764 100644 --- a/domain/payment/RedirectPaymentProduct816SpecificInput.go +++ b/domain/payment/RedirectPaymentProduct816SpecificInput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RedirectPaymentProduct816SpecificInput represents class RedirectPaymentProduct816SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentProduct816SpecificInput type RedirectPaymentProduct816SpecificInput struct { BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` } diff --git a/domain/payment/RedirectPaymentProduct882SpecificInput.go b/domain/payment/RedirectPaymentProduct882SpecificInput.go index a610c75..863daec 100644 --- a/domain/payment/RedirectPaymentProduct882SpecificInput.go +++ b/domain/payment/RedirectPaymentProduct882SpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RedirectPaymentProduct882SpecificInput represents class RedirectPaymentProduct882SpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RedirectPaymentProduct882SpecificInput type RedirectPaymentProduct882SpecificInput struct { IssuerID *string `json:"issuerId,omitempty"` } diff --git a/domain/payment/References.go b/domain/payment/References.go index 1310ed6..b07ace8 100644 --- a/domain/payment/References.go +++ b/domain/payment/References.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // References represents class PaymentReferences -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentReferences type References struct { MerchantOrderID *int64 `json:"merchantOrderId,omitempty"` MerchantReference *string `json:"merchantReference,omitempty"` diff --git a/domain/payment/RefundBankMethodSpecificOutput.go b/domain/payment/RefundBankMethodSpecificOutput.go index e2e4221..a9be906 100644 --- a/domain/payment/RefundBankMethodSpecificOutput.go +++ b/domain/payment/RefundBankMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundBankMethodSpecificOutput represents class RefundBankMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundBankMethodSpecificOutput type RefundBankMethodSpecificOutput struct { TotalAmountPaid *int64 `json:"totalAmountPaid,omitempty"` TotalAmountRefunded *int64 `json:"totalAmountRefunded,omitempty"` diff --git a/domain/payment/RefundCardMethodSpecificOutput.go b/domain/payment/RefundCardMethodSpecificOutput.go index 7ab87cf..eb53150 100644 --- a/domain/payment/RefundCardMethodSpecificOutput.go +++ b/domain/payment/RefundCardMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundCardMethodSpecificOutput represents class RefundCardMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundCardMethodSpecificOutput type RefundCardMethodSpecificOutput struct { TotalAmountPaid *int64 `json:"totalAmountPaid,omitempty"` TotalAmountRefunded *int64 `json:"totalAmountRefunded,omitempty"` diff --git a/domain/payment/RefundEWalletMethodSpecificOutput.go b/domain/payment/RefundEWalletMethodSpecificOutput.go index 99bb776..5ca20a6 100644 --- a/domain/payment/RefundEWalletMethodSpecificOutput.go +++ b/domain/payment/RefundEWalletMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundEWalletMethodSpecificOutput represents class RefundEWalletMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundEWalletMethodSpecificOutput type RefundEWalletMethodSpecificOutput struct { PaymentProduct840SpecificOutput *RefundPaymentProduct840SpecificOutput `json:"paymentProduct840SpecificOutput,omitempty"` TotalAmountPaid *int64 `json:"totalAmountPaid,omitempty"` diff --git a/domain/payment/RefundMethodSpecificOutput.go b/domain/payment/RefundMethodSpecificOutput.go index d9b1845..ddbe13b 100644 --- a/domain/payment/RefundMethodSpecificOutput.go +++ b/domain/payment/RefundMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundMethodSpecificOutput represents class RefundMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundMethodSpecificOutput type RefundMethodSpecificOutput struct { TotalAmountPaid *int64 `json:"totalAmountPaid,omitempty"` TotalAmountRefunded *int64 `json:"totalAmountRefunded,omitempty"` diff --git a/domain/payment/RefundMobileMethodSpecificOutput.go b/domain/payment/RefundMobileMethodSpecificOutput.go index 5bf88d5..5b1d56a 100644 --- a/domain/payment/RefundMobileMethodSpecificOutput.go +++ b/domain/payment/RefundMobileMethodSpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundMobileMethodSpecificOutput represents class RefundMobileMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundMobileMethodSpecificOutput type RefundMobileMethodSpecificOutput struct { Network *string `json:"network,omitempty"` TotalAmountPaid *int64 `json:"totalAmountPaid,omitempty"` diff --git a/domain/payment/RefundOutput.go b/domain/payment/RefundOutput.go index dcc904f..169ad99 100644 --- a/domain/payment/RefundOutput.go +++ b/domain/payment/RefundOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RefundOutput represents class RefundOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundOutput type RefundOutput struct { AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` AmountPaid *int64 `json:"amountPaid,omitempty"` diff --git a/domain/payment/RefundPaymentProduct840CustomerAccount.go b/domain/payment/RefundPaymentProduct840CustomerAccount.go index a69d087..217080d 100644 --- a/domain/payment/RefundPaymentProduct840CustomerAccount.go +++ b/domain/payment/RefundPaymentProduct840CustomerAccount.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundPaymentProduct840CustomerAccount represents class RefundPaymentProduct840CustomerAccount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundPaymentProduct840CustomerAccount type RefundPaymentProduct840CustomerAccount struct { CustomerAccountStatus *string `json:"customerAccountStatus,omitempty"` CustomerAddressStatus *string `json:"customerAddressStatus,omitempty"` diff --git a/domain/payment/RefundPaymentProduct840SpecificOutput.go b/domain/payment/RefundPaymentProduct840SpecificOutput.go index 710352e..94cae5d 100644 --- a/domain/payment/RefundPaymentProduct840SpecificOutput.go +++ b/domain/payment/RefundPaymentProduct840SpecificOutput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // RefundPaymentProduct840SpecificOutput represents class RefundPaymentProduct840SpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundPaymentProduct840SpecificOutput type RefundPaymentProduct840SpecificOutput struct { CustomerAccount *RefundPaymentProduct840CustomerAccount `json:"customerAccount,omitempty"` } diff --git a/domain/payment/Response.go b/domain/payment/Response.go index d63da92..1218261 100644 --- a/domain/payment/Response.go +++ b/domain/payment/Response.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // Response represents class PaymentResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentResponse type Response struct { ID *string `json:"id,omitempty"` PaymentOutput *Output `json:"paymentOutput,omitempty"` diff --git a/domain/payment/SepaDirectDebitPaymentMethodSpecificInput.go b/domain/payment/SepaDirectDebitPaymentMethodSpecificInput.go index 387f221..51b472f 100644 --- a/domain/payment/SepaDirectDebitPaymentMethodSpecificInput.go +++ b/domain/payment/SepaDirectDebitPaymentMethodSpecificInput.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // SepaDirectDebitPaymentMethodSpecificInput represents class SepaDirectDebitPaymentMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_SepaDirectDebitPaymentMethodSpecificInput type SepaDirectDebitPaymentMethodSpecificInput struct { DateCollect *string `json:"dateCollect,omitempty"` DirectDebitText *string `json:"directDebitText,omitempty"` diff --git a/domain/payment/SepaDirectDebitPaymentMethodSpecificOutput.go b/domain/payment/SepaDirectDebitPaymentMethodSpecificOutput.go index 0fdd37f..2aeb28b 100644 --- a/domain/payment/SepaDirectDebitPaymentMethodSpecificOutput.go +++ b/domain/payment/SepaDirectDebitPaymentMethodSpecificOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // SepaDirectDebitPaymentMethodSpecificOutput represents class SepaDirectDebitPaymentMethodSpecificOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_SepaDirectDebitPaymentMethodSpecificOutput type SepaDirectDebitPaymentMethodSpecificOutput struct { FraudResults *definitions.FraudResults `json:"fraudResults,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/payment/ShoppingCart.go b/domain/payment/ShoppingCart.go index c6f8e3f..eb1e9f0 100644 --- a/domain/payment/ShoppingCart.go +++ b/domain/payment/ShoppingCart.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ShoppingCart represents class ShoppingCart -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ShoppingCart type ShoppingCart struct { AmountBreakdown *[]AmountBreakdown `json:"amountBreakdown,omitempty"` } diff --git a/domain/payment/StatusOutput.go b/domain/payment/StatusOutput.go index 0970111..a562eaa 100644 --- a/domain/payment/StatusOutput.go +++ b/domain/payment/StatusOutput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment import "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" // StatusOutput represents class PaymentStatusOutput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentStatusOutput type StatusOutput struct { Errors *[]errors.APIError `json:"errors,omitempty"` IsAuthorized *bool `json:"isAuthorized,omitempty"` diff --git a/domain/payment/ThreeDSecureResults.go b/domain/payment/ThreeDSecureResults.go index 4854545..d0692d5 100644 --- a/domain/payment/ThreeDSecureResults.go +++ b/domain/payment/ThreeDSecureResults.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // ThreeDSecureResults represents class ThreeDSecureResults -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ThreeDSecureResults type ThreeDSecureResults struct { Cavv *string `json:"cavv,omitempty"` Eci *string `json:"eci,omitempty"` diff --git a/domain/payment/TokenizeRequest.go b/domain/payment/TokenizeRequest.go index 83aa45b..8cc321b 100644 --- a/domain/payment/TokenizeRequest.go +++ b/domain/payment/TokenizeRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payment // TokenizeRequest represents class TokenizePaymentRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenizePaymentRequest type TokenizeRequest struct { Alias *string `json:"alias,omitempty"` } diff --git a/domain/payout/AbstractPayoutMethodSpecificInput.go b/domain/payout/AbstractPayoutMethodSpecificInput.go new file mode 100644 index 0000000..f3f2dc1 --- /dev/null +++ b/domain/payout/AbstractPayoutMethodSpecificInput.go @@ -0,0 +1,13 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package payout + +// AbstractPayoutMethodSpecificInput represents class AbstractPayoutMethodSpecificInput +type AbstractPayoutMethodSpecificInput struct { +} + +// NewAbstractPayoutMethodSpecificInput constructs a new AbstractPayoutMethodSpecificInput +func NewAbstractPayoutMethodSpecificInput() *AbstractPayoutMethodSpecificInput { + return &AbstractPayoutMethodSpecificInput{} +} diff --git a/domain/payout/ApproveRequest.go b/domain/payout/ApproveRequest.go index f3e109f..51f81aa 100644 --- a/domain/payout/ApproveRequest.go +++ b/domain/payout/ApproveRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout // ApproveRequest represents class ApprovePayoutRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePayoutRequest type ApproveRequest struct { DatePayout *string `json:"datePayout,omitempty"` } diff --git a/domain/payout/BankTransferPayoutMethodSpecificInput.go b/domain/payout/BankTransferPayoutMethodSpecificInput.go new file mode 100644 index 0000000..9f55e20 --- /dev/null +++ b/domain/payout/BankTransferPayoutMethodSpecificInput.go @@ -0,0 +1,21 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package payout + +import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" + +// BankTransferPayoutMethodSpecificInput represents class BankTransferPayoutMethodSpecificInput +type BankTransferPayoutMethodSpecificInput struct { + BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` + BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` + Customer *Customer `json:"customer,omitempty"` + PayoutDate *string `json:"payoutDate,omitempty"` + PayoutText *string `json:"payoutText,omitempty"` + SwiftCode *string `json:"swiftCode,omitempty"` +} + +// NewBankTransferPayoutMethodSpecificInput constructs a new BankTransferPayoutMethodSpecificInput +func NewBankTransferPayoutMethodSpecificInput() *BankTransferPayoutMethodSpecificInput { + return &BankTransferPayoutMethodSpecificInput{} +} diff --git a/domain/payout/CardPayoutMethodSpecificInput.go b/domain/payout/CardPayoutMethodSpecificInput.go new file mode 100644 index 0000000..e585477 --- /dev/null +++ b/domain/payout/CardPayoutMethodSpecificInput.go @@ -0,0 +1,17 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package payout + +import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" + +// CardPayoutMethodSpecificInput represents class CardPayoutMethodSpecificInput +type CardPayoutMethodSpecificInput struct { + Card *definitions.Card `json:"card,omitempty"` + PaymentProductID *int32 `json:"paymentProductId,omitempty"` +} + +// NewCardPayoutMethodSpecificInput constructs a new CardPayoutMethodSpecificInput +func NewCardPayoutMethodSpecificInput() *CardPayoutMethodSpecificInput { + return &CardPayoutMethodSpecificInput{} +} diff --git a/domain/payout/CreateRequest.go b/domain/payout/CreateRequest.go index 7314678..7eb7d1f 100644 --- a/domain/payout/CreateRequest.go +++ b/domain/payout/CreateRequest.go @@ -1,21 +1,28 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CreateRequest represents class CreatePayoutRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreatePayoutRequest type CreateRequest struct { - AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` - BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` - BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` - Customer *Customer `json:"customer,omitempty"` - PayoutDate *string `json:"payoutDate,omitempty"` - PayoutText *string `json:"payoutText,omitempty"` - References *References `json:"references,omitempty"` - SwiftCode *string `json:"swiftCode,omitempty"` + AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` + // Deprecated: Use bankTransferPayoutMethodSpecificInput.bankAccountBban instead + BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` + // Deprecated: Use bankTransferPayoutMethodSpecificInput.bankAccountIban instead + BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` + BankTransferPayoutMethodSpecificInput *BankTransferPayoutMethodSpecificInput `json:"bankTransferPayoutMethodSpecificInput,omitempty"` + CardPayoutMethodSpecificInput *CardPayoutMethodSpecificInput `json:"cardPayoutMethodSpecificInput,omitempty"` + // Deprecated: Use bankTransferPayoutMethodSpecificInput.customer instead + Customer *Customer `json:"customer,omitempty"` + // Deprecated: Use bankTransferPayoutMethodSpecificInput.payoutDate instead + PayoutDate *string `json:"payoutDate,omitempty"` + // Deprecated: Use bankTransferPayoutMethodSpecificInput.payoutText instead + PayoutText *string `json:"payoutText,omitempty"` + References *References `json:"references,omitempty"` + // Deprecated: Use bankTransferPayoutMethodSpecificInput.swiftCode instead + SwiftCode *string `json:"swiftCode,omitempty"` } // NewCreateRequest constructs a new CreateRequest diff --git a/domain/payout/Customer.go b/domain/payout/Customer.go index e0ea833..b67d57f 100644 --- a/domain/payout/Customer.go +++ b/domain/payout/Customer.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout @@ -9,7 +9,6 @@ import ( ) // Customer represents class PayoutCustomer -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PayoutCustomer type Customer struct { Address *definitions.Address `json:"address,omitempty"` CompanyInformation *definitions.CompanyInformation `json:"companyInformation,omitempty"` diff --git a/domain/payout/ErrorResponse.go b/domain/payout/ErrorResponse.go index 2d2778d..91056a9 100644 --- a/domain/payout/ErrorResponse.go +++ b/domain/payout/ErrorResponse.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout import "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" // ErrorResponse represents class PayoutErrorResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PayoutErrorResponse type ErrorResponse struct { ErrorID *string `json:"errorId,omitempty"` Errors *[]errors.APIError `json:"errors,omitempty"` diff --git a/domain/payout/References.go b/domain/payout/References.go index 0c6e5aa..a070fe6 100644 --- a/domain/payout/References.go +++ b/domain/payout/References.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout // References represents class PayoutReferences -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PayoutReferences type References struct { InvoiceNumber *string `json:"invoiceNumber,omitempty"` MerchantOrderID *int64 `json:"merchantOrderId,omitempty"` diff --git a/domain/payout/Response.go b/domain/payout/Response.go index 440fead..3d28a0a 100644 --- a/domain/payout/Response.go +++ b/domain/payout/Response.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout @@ -9,7 +9,6 @@ import ( ) // Response represents class PayoutResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PayoutResponse type Response struct { ID *string `json:"id,omitempty"` PayoutOutput *payment.OrderOutput `json:"payoutOutput,omitempty"` diff --git a/domain/payout/Result.go b/domain/payout/Result.go index 9062de7..c43d75b 100644 --- a/domain/payout/Result.go +++ b/domain/payout/Result.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payout @@ -9,7 +9,6 @@ import ( ) // Result represents class PayoutResult -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PayoutResult type Result struct { ID *string `json:"id,omitempty"` PayoutOutput *payment.OrderOutput `json:"payoutOutput,omitempty"` diff --git a/domain/product/AccountOnFile.go b/domain/product/AccountOnFile.go index 93ee951..8366634 100644 --- a/domain/product/AccountOnFile.go +++ b/domain/product/AccountOnFile.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // AccountOnFile represents class AccountOnFile -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AccountOnFile type AccountOnFile struct { Attributes *[]AccountOnFileAttribute `json:"attributes,omitempty"` DisplayHints *AccountOnFileDisplayHints `json:"displayHints,omitempty"` diff --git a/domain/product/AccountOnFileAttribute.go b/domain/product/AccountOnFileAttribute.go index 6372713..db386a4 100644 --- a/domain/product/AccountOnFileAttribute.go +++ b/domain/product/AccountOnFileAttribute.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // AccountOnFileAttribute represents class AccountOnFileAttribute -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AccountOnFileAttribute type AccountOnFileAttribute struct { Key *string `json:"key,omitempty"` MustWriteReason *string `json:"mustWriteReason,omitempty"` diff --git a/domain/product/AccountOnFileDisplayHints.go b/domain/product/AccountOnFileDisplayHints.go index 9f0b240..6e4b0a6 100644 --- a/domain/product/AccountOnFileDisplayHints.go +++ b/domain/product/AccountOnFileDisplayHints.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // AccountOnFileDisplayHints represents class AccountOnFileDisplayHints -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AccountOnFileDisplayHints type AccountOnFileDisplayHints struct { LabelTemplate *[]LabelTemplateElement `json:"labelTemplate,omitempty"` Logo *string `json:"logo,omitempty"` diff --git a/domain/product/BoletoBancarioRequirednessValidator.go b/domain/product/BoletoBancarioRequirednessValidator.go index cce1df1..dffc66e 100644 --- a/domain/product/BoletoBancarioRequirednessValidator.go +++ b/domain/product/BoletoBancarioRequirednessValidator.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // BoletoBancarioRequirednessValidator represents class BoletoBancarioRequirednessValidator -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BoletoBancarioRequirednessValidator type BoletoBancarioRequirednessValidator struct { FiscalNumberLength *int32 `json:"fiscalNumberLength,omitempty"` } diff --git a/domain/product/Directory.go b/domain/product/Directory.go index 17a0f6c..328a461 100644 --- a/domain/product/Directory.go +++ b/domain/product/Directory.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // Directory represents class Directory -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Directory type Directory struct { Entries *[]DirectoryEntry `json:"entries,omitempty"` } diff --git a/domain/product/DirectoryEntry.go b/domain/product/DirectoryEntry.go index eb75071..c0ee959 100644 --- a/domain/product/DirectoryEntry.go +++ b/domain/product/DirectoryEntry.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // DirectoryEntry represents class DirectoryEntry -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_DirectoryEntry type DirectoryEntry struct { CountryNames *[]string `json:"countryNames,omitempty"` IssuerID *string `json:"issuerId,omitempty"` diff --git a/domain/product/EmptyValidator.go b/domain/product/EmptyValidator.go index 7e2ba40..6cde9f2 100644 --- a/domain/product/EmptyValidator.go +++ b/domain/product/EmptyValidator.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // EmptyValidator represents class EmptyValidator -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_EmptyValidator type EmptyValidator struct { } diff --git a/domain/product/FixedListValidator.go b/domain/product/FixedListValidator.go index 3b9a005..c76ac1a 100644 --- a/domain/product/FixedListValidator.go +++ b/domain/product/FixedListValidator.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // FixedListValidator represents class FixedListValidator -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_FixedListValidator type FixedListValidator struct { AllowedValues *[]string `json:"allowedValues,omitempty"` } diff --git a/domain/product/LabelTemplateElement.go b/domain/product/LabelTemplateElement.go index 8b7c74e..c3739da 100644 --- a/domain/product/LabelTemplateElement.go +++ b/domain/product/LabelTemplateElement.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // LabelTemplateElement represents class LabelTemplateElement -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_LabelTemplateElement type LabelTemplateElement struct { AttributeKey *string `json:"attributeKey,omitempty"` Mask *string `json:"mask,omitempty"` diff --git a/domain/product/LengthValidator.go b/domain/product/LengthValidator.go index 5c37a68..d9a7e15 100644 --- a/domain/product/LengthValidator.go +++ b/domain/product/LengthValidator.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // LengthValidator represents class LengthValidator -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_LengthValidator type LengthValidator struct { MaxLength *int32 `json:"maxLength,omitempty"` MinLength *int32 `json:"minLength,omitempty"` diff --git a/domain/product/PaymentProduct.go b/domain/product/PaymentProduct.go index 3b73b3b..377ae1c 100644 --- a/domain/product/PaymentProduct.go +++ b/domain/product/PaymentProduct.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProduct represents class PaymentProduct -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProduct type PaymentProduct struct { AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"` AllowsRecurring *bool `json:"allowsRecurring,omitempty"` diff --git a/domain/product/PaymentProductDisplayHints.go b/domain/product/PaymentProductDisplayHints.go index 11de00d..6e86367 100644 --- a/domain/product/PaymentProductDisplayHints.go +++ b/domain/product/PaymentProductDisplayHints.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductDisplayHints represents class PaymentProductDisplayHints -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductDisplayHints type PaymentProductDisplayHints struct { DisplayOrder *int32 `json:"displayOrder,omitempty"` Label *string `json:"label,omitempty"` diff --git a/domain/product/PaymentProductField.go b/domain/product/PaymentProductField.go index d33fa54..73618a7 100644 --- a/domain/product/PaymentProductField.go +++ b/domain/product/PaymentProductField.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductField represents class PaymentProductField -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductField type PaymentProductField struct { DataRestrictions *PaymentProductFieldDataRestrictions `json:"dataRestrictions,omitempty"` DisplayHints *PaymentProductFieldDisplayHints `json:"displayHints,omitempty"` diff --git a/domain/product/PaymentProductFieldDataRestrictions.go b/domain/product/PaymentProductFieldDataRestrictions.go index c074d82..36372a0 100644 --- a/domain/product/PaymentProductFieldDataRestrictions.go +++ b/domain/product/PaymentProductFieldDataRestrictions.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductFieldDataRestrictions represents class PaymentProductFieldDataRestrictions -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFieldDataRestrictions type PaymentProductFieldDataRestrictions struct { IsRequired *bool `json:"isRequired,omitempty"` Validators *PaymentProductFieldValidators `json:"validators,omitempty"` diff --git a/domain/product/PaymentProductFieldDisplayHints.go b/domain/product/PaymentProductFieldDisplayHints.go index 0404b10..e5aa9c0 100644 --- a/domain/product/PaymentProductFieldDisplayHints.go +++ b/domain/product/PaymentProductFieldDisplayHints.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductFieldDisplayHints represents class PaymentProductFieldDisplayHints -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFieldDisplayHints type PaymentProductFieldDisplayHints struct { AlwaysShow *bool `json:"alwaysShow,omitempty"` DisplayOrder *int32 `json:"displayOrder,omitempty"` diff --git a/domain/product/PaymentProductFieldFormElement.go b/domain/product/PaymentProductFieldFormElement.go index 49388c7..36b8a54 100644 --- a/domain/product/PaymentProductFieldFormElement.go +++ b/domain/product/PaymentProductFieldFormElement.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductFieldFormElement represents class PaymentProductFieldFormElement -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFieldFormElement type PaymentProductFieldFormElement struct { Type *string `json:"type,omitempty"` ValueMapping *[]ValueMappingElement `json:"valueMapping,omitempty"` diff --git a/domain/product/PaymentProductFieldTooltip.go b/domain/product/PaymentProductFieldTooltip.go index a4f542a..5b28be4 100644 --- a/domain/product/PaymentProductFieldTooltip.go +++ b/domain/product/PaymentProductFieldTooltip.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductFieldTooltip represents class PaymentProductFieldTooltip -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFieldTooltip type PaymentProductFieldTooltip struct { Image *string `json:"image,omitempty"` Label *string `json:"label,omitempty"` diff --git a/domain/product/PaymentProductFieldValidators.go b/domain/product/PaymentProductFieldValidators.go index 6b5c3af..a5a40e9 100644 --- a/domain/product/PaymentProductFieldValidators.go +++ b/domain/product/PaymentProductFieldValidators.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductFieldValidators represents class PaymentProductFieldValidators -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFieldValidators type PaymentProductFieldValidators struct { BoletoBancarioRequiredness *BoletoBancarioRequirednessValidator `json:"boletoBancarioRequiredness,omitempty"` EmailAddress *EmptyValidator `json:"emailAddress,omitempty"` diff --git a/domain/product/PaymentProductGroup.go b/domain/product/PaymentProductGroup.go index 7a22d91..b089664 100644 --- a/domain/product/PaymentProductGroup.go +++ b/domain/product/PaymentProductGroup.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductGroup represents class PaymentProductGroup -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductGroup type PaymentProductGroup struct { AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"` DisplayHints *PaymentProductDisplayHints `json:"displayHints,omitempty"` diff --git a/domain/product/PaymentProductGroupResponse.go b/domain/product/PaymentProductGroupResponse.go index 03822c5..b6c0a24 100644 --- a/domain/product/PaymentProductGroupResponse.go +++ b/domain/product/PaymentProductGroupResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductGroupResponse represents class PaymentProductGroupResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductGroupResponse type PaymentProductGroupResponse struct { AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"` DisplayHints *PaymentProductDisplayHints `json:"displayHints,omitempty"` diff --git a/domain/product/PaymentProductGroups.go b/domain/product/PaymentProductGroups.go index 971dacb..74b2991 100644 --- a/domain/product/PaymentProductGroups.go +++ b/domain/product/PaymentProductGroups.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductGroups represents class PaymentProductGroups -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductGroups type PaymentProductGroups struct { PaymentProductGroups *[]PaymentProductGroup `json:"paymentProductGroups,omitempty"` } diff --git a/domain/product/PaymentProductNetworksResponse.go b/domain/product/PaymentProductNetworksResponse.go index 26187cd..bbdd6e6 100644 --- a/domain/product/PaymentProductNetworksResponse.go +++ b/domain/product/PaymentProductNetworksResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductNetworksResponse represents class PaymentProductNetworksResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductNetworksResponse type PaymentProductNetworksResponse struct { Networks *[]string `json:"networks,omitempty"` } diff --git a/domain/product/PaymentProductResponse.go b/domain/product/PaymentProductResponse.go index b5c05ba..c26ea00 100644 --- a/domain/product/PaymentProductResponse.go +++ b/domain/product/PaymentProductResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProductResponse represents class PaymentProductResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductResponse type PaymentProductResponse struct { AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"` AllowsRecurring *bool `json:"allowsRecurring,omitempty"` diff --git a/domain/product/PaymentProducts.go b/domain/product/PaymentProducts.go index 3c0e5d1..6c023a2 100644 --- a/domain/product/PaymentProducts.go +++ b/domain/product/PaymentProducts.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // PaymentProducts represents class PaymentProducts -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProducts type PaymentProducts struct { PaymentProducts *[]PaymentProduct `json:"paymentProducts,omitempty"` } diff --git a/domain/product/RangeValidator.go b/domain/product/RangeValidator.go index 82e72b6..e5dd086 100644 --- a/domain/product/RangeValidator.go +++ b/domain/product/RangeValidator.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // RangeValidator represents class RangeValidator -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RangeValidator type RangeValidator struct { MaxValue *int32 `json:"maxValue,omitempty"` MinValue *int32 `json:"minValue,omitempty"` diff --git a/domain/product/RegularExpressionValidator.go b/domain/product/RegularExpressionValidator.go index ba1dddc..dfa1f6b 100644 --- a/domain/product/RegularExpressionValidator.go +++ b/domain/product/RegularExpressionValidator.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // RegularExpressionValidator represents class RegularExpressionValidator -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RegularExpressionValidator type RegularExpressionValidator struct { RegularExpression *string `json:"regularExpression,omitempty"` } diff --git a/domain/product/ValueMappingElement.go b/domain/product/ValueMappingElement.go index 2555501..d8acf23 100644 --- a/domain/product/ValueMappingElement.go +++ b/domain/product/ValueMappingElement.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package product // ValueMappingElement represents class ValueMappingElement -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ValueMappingElement type ValueMappingElement struct { DisplayName *string `json:"displayName,omitempty"` Value *string `json:"value,omitempty"` diff --git a/domain/publickey/PublicKey.go b/domain/publickey/PublicKey.go index b2e3026..1dbcf27 100644 --- a/domain/publickey/PublicKey.go +++ b/domain/publickey/PublicKey.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package publickey // PublicKey represents class PublicKey -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PublicKey type PublicKey struct { KeyID *string `json:"keyId,omitempty"` PublicKey *string `json:"publicKey,omitempty"` diff --git a/domain/refund/ApproveRequest.go b/domain/refund/ApproveRequest.go index 8033482..c43e564 100644 --- a/domain/refund/ApproveRequest.go +++ b/domain/refund/ApproveRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund // ApproveRequest represents class ApproveRefundRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApproveRefundRequest type ApproveRequest struct { Amount *int64 `json:"amount,omitempty"` } diff --git a/domain/refund/BankAccountBbanRefund.go b/domain/refund/BankAccountBbanRefund.go index c9dc478..d1f7dc0 100644 --- a/domain/refund/BankAccountBbanRefund.go +++ b/domain/refund/BankAccountBbanRefund.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund // BankAccountBbanRefund represents class BankAccountBbanRefund -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankAccountBbanRefund type BankAccountBbanRefund struct { AccountHolderName *string `json:"accountHolderName,omitempty"` AccountNumber *string `json:"accountNumber,omitempty"` diff --git a/domain/refund/BankRefundMethodSpecificInput.go b/domain/refund/BankRefundMethodSpecificInput.go index 3990072..08f6f96 100644 --- a/domain/refund/BankRefundMethodSpecificInput.go +++ b/domain/refund/BankRefundMethodSpecificInput.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // BankRefundMethodSpecificInput represents class BankRefundMethodSpecificInput -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankRefundMethodSpecificInput type BankRefundMethodSpecificInput struct { BankAccountBban *BankAccountBbanRefund `json:"bankAccountBban,omitempty"` BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` diff --git a/domain/refund/Customer.go b/domain/refund/Customer.go index 1f519c8..d4f75b9 100644 --- a/domain/refund/Customer.go +++ b/domain/refund/Customer.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund @@ -9,7 +9,6 @@ import ( ) // Customer represents class RefundCustomer -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundCustomer type Customer struct { Address *payment.AddressPersonal `json:"address,omitempty"` CompanyInformation *definitions.CompanyInformation `json:"companyInformation,omitempty"` diff --git a/domain/refund/ErrorResponse.go b/domain/refund/ErrorResponse.go index 80c2b5f..681f6ad 100644 --- a/domain/refund/ErrorResponse.go +++ b/domain/refund/ErrorResponse.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund import "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" // ErrorResponse represents class RefundErrorResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundErrorResponse type ErrorResponse struct { ErrorID *string `json:"errorId,omitempty"` Errors *[]errors.APIError `json:"errors,omitempty"` diff --git a/domain/refund/References.go b/domain/refund/References.go index a4ac452..c5a33f9 100644 --- a/domain/refund/References.go +++ b/domain/refund/References.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund // References represents class RefundReferences -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundReferences type References struct { MerchantReference *string `json:"merchantReference,omitempty"` } diff --git a/domain/refund/Request.go b/domain/refund/Request.go index 63af690..7b3fa3f 100644 --- a/domain/refund/Request.go +++ b/domain/refund/Request.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // Request represents class RefundRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundRequest type Request struct { AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` BankRefundMethodSpecificInput *BankRefundMethodSpecificInput `json:"bankRefundMethodSpecificInput,omitempty"` diff --git a/domain/refund/Response.go b/domain/refund/Response.go index d1728f3..1451fad 100644 --- a/domain/refund/Response.go +++ b/domain/refund/Response.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund @@ -9,7 +9,6 @@ import ( ) // Response represents class RefundResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundResponse type Response struct { ID *string `json:"id,omitempty"` RefundOutput *payment.RefundOutput `json:"refundOutput,omitempty"` diff --git a/domain/refund/Result.go b/domain/refund/Result.go index 208494c..ecd8491 100644 --- a/domain/refund/Result.go +++ b/domain/refund/Result.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refund @@ -9,7 +9,6 @@ import ( ) // Result represents class RefundResult -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RefundResult type Result struct { ID *string `json:"id,omitempty"` RefundOutput *payment.RefundOutput `json:"refundOutput,omitempty"` diff --git a/domain/riskassessments/CustomerRiskAssessment.go b/domain/riskassessments/CustomerRiskAssessment.go index 8842c1b..62d3731 100644 --- a/domain/riskassessments/CustomerRiskAssessment.go +++ b/domain/riskassessments/CustomerRiskAssessment.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments @@ -9,7 +9,6 @@ import ( ) // CustomerRiskAssessment represents class CustomerRiskAssessment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CustomerRiskAssessment type CustomerRiskAssessment struct { BillingAddress *definitions.Address `json:"billingAddress,omitempty"` Locale *string `json:"locale,omitempty"` diff --git a/domain/riskassessments/OrderRiskAssessment.go b/domain/riskassessments/OrderRiskAssessment.go index 208b4e0..fb70a45 100644 --- a/domain/riskassessments/OrderRiskAssessment.go +++ b/domain/riskassessments/OrderRiskAssessment.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // OrderRiskAssessment represents class OrderRiskAssessment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_OrderRiskAssessment type OrderRiskAssessment struct { AdditionalInput *definitions.AdditionalOrderInputAirlineData `json:"additionalInput,omitempty"` AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` diff --git a/domain/riskassessments/PersonalInformationRiskAssessment.go b/domain/riskassessments/PersonalInformationRiskAssessment.go index c5992a5..7ae38a8 100644 --- a/domain/riskassessments/PersonalInformationRiskAssessment.go +++ b/domain/riskassessments/PersonalInformationRiskAssessment.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments // PersonalInformationRiskAssessment represents class PersonalInformationRiskAssessment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalInformationRiskAssessment type PersonalInformationRiskAssessment struct { Name *PersonalNameRiskAssessment `json:"name,omitempty"` } diff --git a/domain/riskassessments/PersonalNameRiskAssessment.go b/domain/riskassessments/PersonalNameRiskAssessment.go index 77ed6d5..e163766 100644 --- a/domain/riskassessments/PersonalNameRiskAssessment.go +++ b/domain/riskassessments/PersonalNameRiskAssessment.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments // PersonalNameRiskAssessment represents class PersonalNameRiskAssessment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalNameRiskAssessment type PersonalNameRiskAssessment struct { FirstName *string `json:"firstName,omitempty"` Surname *string `json:"surname,omitempty"` diff --git a/domain/riskassessments/RiskAssessment.go b/domain/riskassessments/RiskAssessment.go index 35518aa..225ee91 100644 --- a/domain/riskassessments/RiskAssessment.go +++ b/domain/riskassessments/RiskAssessment.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RiskAssessment represents class RiskAssessment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RiskAssessment type RiskAssessment struct { FraudFields *definitions.FraudFields `json:"fraudFields,omitempty"` Order *OrderRiskAssessment `json:"order,omitempty"` diff --git a/domain/riskassessments/RiskAssessmentBankAccount.go b/domain/riskassessments/RiskAssessmentBankAccount.go index b3f370f..619808e 100644 --- a/domain/riskassessments/RiskAssessmentBankAccount.go +++ b/domain/riskassessments/RiskAssessmentBankAccount.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RiskAssessmentBankAccount represents class RiskAssessmentBankAccount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RiskAssessmentBankAccount type RiskAssessmentBankAccount struct { BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` diff --git a/domain/riskassessments/RiskAssessmentCard.go b/domain/riskassessments/RiskAssessmentCard.go index 7d604b9..d187adc 100644 --- a/domain/riskassessments/RiskAssessmentCard.go +++ b/domain/riskassessments/RiskAssessmentCard.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RiskAssessmentCard represents class RiskAssessmentCard -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RiskAssessmentCard type RiskAssessmentCard struct { Card *definitions.Card `json:"card,omitempty"` FraudFields *definitions.FraudFields `json:"fraudFields,omitempty"` diff --git a/domain/riskassessments/RiskAssessmentResponse.go b/domain/riskassessments/RiskAssessmentResponse.go index 799be8b..701bc4b 100644 --- a/domain/riskassessments/RiskAssessmentResponse.go +++ b/domain/riskassessments/RiskAssessmentResponse.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // RiskAssessmentResponse represents class RiskAssessmentResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_RiskAssessmentResponse type RiskAssessmentResponse struct { Results *[]definitions.ResultDoRiskAssessment `json:"results,omitempty"` } diff --git a/domain/services/BankData.go b/domain/services/BankData.go index 00f22c9..dc22dda 100644 --- a/domain/services/BankData.go +++ b/domain/services/BankData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // BankData represents class BankData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankData type BankData struct { NewBankName *string `json:"newBankName,omitempty"` ReformattedAccountNumber *string `json:"reformattedAccountNumber,omitempty"` diff --git a/domain/services/BankDetails.go b/domain/services/BankDetails.go index e1eb9f9..e92ef3b 100644 --- a/domain/services/BankDetails.go +++ b/domain/services/BankDetails.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // BankDetails represents class BankDetails -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankDetails type BankDetails struct { BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` diff --git a/domain/services/BankDetailsRequest.go b/domain/services/BankDetailsRequest.go index a2859d8..9e3f18f 100644 --- a/domain/services/BankDetailsRequest.go +++ b/domain/services/BankDetailsRequest.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // BankDetailsRequest represents class BankDetailsRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankDetailsRequest type BankDetailsRequest struct { BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` diff --git a/domain/services/BankDetailsResponse.go b/domain/services/BankDetailsResponse.go index ed08ad7..8122a13 100644 --- a/domain/services/BankDetailsResponse.go +++ b/domain/services/BankDetailsResponse.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // BankDetailsResponse represents class BankDetailsResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_BankDetailsResponse type BankDetailsResponse struct { BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` diff --git a/domain/services/ConvertAmount.go b/domain/services/ConvertAmount.go index 27e9c00..afb8020 100644 --- a/domain/services/ConvertAmount.go +++ b/domain/services/ConvertAmount.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // ConvertAmount represents class ConvertAmount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ConvertAmount type ConvertAmount struct { ConvertedAmount *int64 `json:"convertedAmount,omitempty"` } diff --git a/domain/services/GetIINDetailsRequest.go b/domain/services/GetIINDetailsRequest.go index 230c19a..ca2eaf1 100644 --- a/domain/services/GetIINDetailsRequest.go +++ b/domain/services/GetIINDetailsRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // GetIINDetailsRequest represents class GetIINDetailsRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_GetIINDetailsRequest type GetIINDetailsRequest struct { Bin *string `json:"bin,omitempty"` PaymentContext *PaymentContext `json:"paymentContext,omitempty"` diff --git a/domain/services/GetIINDetailsResponse.go b/domain/services/GetIINDetailsResponse.go index c66c566..4de877d 100644 --- a/domain/services/GetIINDetailsResponse.go +++ b/domain/services/GetIINDetailsResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // GetIINDetailsResponse represents class GetIINDetailsResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_GetIINDetailsResponse type GetIINDetailsResponse struct { CoBrands *[]IINDetail `json:"coBrands,omitempty"` CountryCode *string `json:"countryCode,omitempty"` diff --git a/domain/services/IINDetail.go b/domain/services/IINDetail.go index c9dabe6..796d212 100644 --- a/domain/services/IINDetail.go +++ b/domain/services/IINDetail.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // IINDetail represents class IINDetail -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_IINDetail type IINDetail struct { IsAllowedInContext *bool `json:"isAllowedInContext,omitempty"` PaymentProductID *int32 `json:"paymentProductId,omitempty"` diff --git a/domain/services/PaymentContext.go b/domain/services/PaymentContext.go index 4d085c5..42b01da 100644 --- a/domain/services/PaymentContext.go +++ b/domain/services/PaymentContext.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // PaymentContext represents class PaymentContext -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentContext type PaymentContext struct { AmountOfMoney *definitions.AmountOfMoney `json:"amountOfMoney,omitempty"` CountryCode *string `json:"countryCode,omitempty"` diff --git a/domain/services/Swift.go b/domain/services/Swift.go index 0b50073..1efb700 100644 --- a/domain/services/Swift.go +++ b/domain/services/Swift.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // Swift represents class Swift -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Swift type Swift struct { Bic *string `json:"bic,omitempty"` Category *string `json:"category,omitempty"` diff --git a/domain/services/TestConnection.go b/domain/services/TestConnection.go index 9b36888..fce735f 100644 --- a/domain/services/TestConnection.go +++ b/domain/services/TestConnection.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services // TestConnection represents class TestConnection -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TestConnection type TestConnection struct { Result *string `json:"result,omitempty"` } diff --git a/domain/sessions/PaymentProductFiltersClientSession.go b/domain/sessions/PaymentProductFiltersClientSession.go index 1b3ae5e..3d96f8f 100644 --- a/domain/sessions/PaymentProductFiltersClientSession.go +++ b/domain/sessions/PaymentProductFiltersClientSession.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package sessions import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // PaymentProductFiltersClientSession represents class PaymentProductFiltersClientSession -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductFiltersClientSession type PaymentProductFiltersClientSession struct { Exclude *definitions.PaymentProductFilter `json:"exclude,omitempty"` RestrictTo *definitions.PaymentProductFilter `json:"restrictTo,omitempty"` diff --git a/domain/sessions/SessionRequest.go b/domain/sessions/SessionRequest.go index 4f9c3d9..762328b 100644 --- a/domain/sessions/SessionRequest.go +++ b/domain/sessions/SessionRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package sessions // SessionRequest represents class SessionRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_SessionRequest type SessionRequest struct { PaymentProductFilters *PaymentProductFiltersClientSession `json:"paymentProductFilters,omitempty"` Tokens *[]string `json:"tokens,omitempty"` diff --git a/domain/sessions/SessionResponse.go b/domain/sessions/SessionResponse.go index 5ee494d..ab48abe 100644 --- a/domain/sessions/SessionResponse.go +++ b/domain/sessions/SessionResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package sessions // SessionResponse represents class SessionResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_SessionResponse type SessionResponse struct { ClientSessionID *string `json:"clientSessionId,omitempty"` CustomerID *string `json:"customerId,omitempty"` diff --git a/domain/token/AbstractToken.go b/domain/token/AbstractToken.go index cf9285b..d1c25e5 100644 --- a/domain/token/AbstractToken.go +++ b/domain/token/AbstractToken.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // AbstractToken represents class AbstractToken -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_AbstractToken type AbstractToken struct { Alias *string `json:"alias,omitempty"` } diff --git a/domain/token/ApproveRequest.go b/domain/token/ApproveRequest.go index d904255..07648b7 100644 --- a/domain/token/ApproveRequest.go +++ b/domain/token/ApproveRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // ApproveRequest represents class ApproveTokenRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ApproveTokenRequest type ApproveRequest struct { MandateSignatureDate *string `json:"mandateSignatureDate,omitempty"` MandateSignaturePlace *string `json:"mandateSignaturePlace,omitempty"` diff --git a/domain/token/Card.go b/domain/token/Card.go index 25b224c..adb5140 100644 --- a/domain/token/Card.go +++ b/domain/token/Card.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // Card represents class TokenCard -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenCard type Card struct { Alias *string `json:"alias,omitempty"` Customer *CustomerToken `json:"customer,omitempty"` diff --git a/domain/token/CardData.go b/domain/token/CardData.go index 65d0572..867798c 100644 --- a/domain/token/CardData.go +++ b/domain/token/CardData.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CardData represents class TokenCardData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenCardData type CardData struct { CardWithoutCvv *definitions.CardWithoutCvv `json:"cardWithoutCvv,omitempty"` FirstTransactionDate *string `json:"firstTransactionDate,omitempty"` diff --git a/domain/token/ContactDetailsToken.go b/domain/token/ContactDetailsToken.go index 92f1b9e..38b4926 100644 --- a/domain/token/ContactDetailsToken.go +++ b/domain/token/ContactDetailsToken.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // ContactDetailsToken represents class ContactDetailsToken -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_ContactDetailsToken type ContactDetailsToken struct { EmailAddress *string `json:"emailAddress,omitempty"` EmailMessageType *string `json:"emailMessageType,omitempty"` diff --git a/domain/token/CreateRequest.go b/domain/token/CreateRequest.go index ef1c5e2..4c2fdae 100644 --- a/domain/token/CreateRequest.go +++ b/domain/token/CreateRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // CreateRequest represents class CreateTokenRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreateTokenRequest type CreateRequest struct { Card *Card `json:"card,omitempty"` EWallet *EWallet `json:"eWallet,omitempty"` diff --git a/domain/token/CreateResponse.go b/domain/token/CreateResponse.go index 9261c60..bc30bd1 100644 --- a/domain/token/CreateResponse.go +++ b/domain/token/CreateResponse.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // CreateResponse represents class CreateTokenResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CreateTokenResponse type CreateResponse struct { IsNewToken *bool `json:"isNewToken,omitempty"` Token *string `json:"token,omitempty"` diff --git a/domain/token/Creditor.go b/domain/token/Creditor.go index 8249971..d51adbf 100644 --- a/domain/token/Creditor.go +++ b/domain/token/Creditor.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // Creditor represents class Creditor -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Creditor type Creditor struct { AdditionalAddressInfo *string `json:"additionalAddressInfo,omitempty"` City *string `json:"city,omitempty"` diff --git a/domain/token/CustomerToken.go b/domain/token/CustomerToken.go index a0610d0..adb57f9 100644 --- a/domain/token/CustomerToken.go +++ b/domain/token/CustomerToken.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CustomerToken represents class CustomerToken -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CustomerToken type CustomerToken struct { BillingAddress *definitions.Address `json:"billingAddress,omitempty"` CompanyInformation *definitions.CompanyInformation `json:"companyInformation,omitempty"` diff --git a/domain/token/CustomerTokenWithContactDetails.go b/domain/token/CustomerTokenWithContactDetails.go index 3c5617e..6468635 100644 --- a/domain/token/CustomerTokenWithContactDetails.go +++ b/domain/token/CustomerTokenWithContactDetails.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // CustomerTokenWithContactDetails represents class CustomerTokenWithContactDetails -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_CustomerTokenWithContactDetails type CustomerTokenWithContactDetails struct { BillingAddress *definitions.Address `json:"billingAddress,omitempty"` CompanyInformation *definitions.CompanyInformation `json:"companyInformation,omitempty"` diff --git a/domain/token/Debtor.go b/domain/token/Debtor.go index aea480d..7b88c18 100644 --- a/domain/token/Debtor.go +++ b/domain/token/Debtor.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // Debtor represents class Debtor -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_Debtor type Debtor struct { AdditionalAddressInfo *string `json:"additionalAddressInfo,omitempty"` City *string `json:"city,omitempty"` diff --git a/domain/token/EWallet.go b/domain/token/EWallet.go index 9f8e753..850b8ff 100644 --- a/domain/token/EWallet.go +++ b/domain/token/EWallet.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // EWallet represents class TokenEWallet -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenEWallet type EWallet struct { Alias *string `json:"alias,omitempty"` Customer *CustomerToken `json:"customer,omitempty"` diff --git a/domain/token/EWalletData.go b/domain/token/EWalletData.go index c37c662..a1e081e 100644 --- a/domain/token/EWalletData.go +++ b/domain/token/EWalletData.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // EWalletData represents class TokenEWalletData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenEWalletData type EWalletData struct { BillingAgreementID *string `json:"billingAgreementId,omitempty"` } diff --git a/domain/token/MandateApproval.go b/domain/token/MandateApproval.go index 1b2b7f4..31e163a 100644 --- a/domain/token/MandateApproval.go +++ b/domain/token/MandateApproval.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // MandateApproval represents class MandateApproval -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MandateApproval type MandateApproval struct { MandateSignatureDate *string `json:"mandateSignatureDate,omitempty"` MandateSignaturePlace *string `json:"mandateSignaturePlace,omitempty"` diff --git a/domain/token/MandateNonSepaDirectDebit.go b/domain/token/MandateNonSepaDirectDebit.go index 140e7a7..4645c55 100644 --- a/domain/token/MandateNonSepaDirectDebit.go +++ b/domain/token/MandateNonSepaDirectDebit.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // MandateNonSepaDirectDebit represents class MandateNonSepaDirectDebit -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MandateNonSepaDirectDebit type MandateNonSepaDirectDebit struct { PaymentProduct705SpecificData *NonSepaDirectDebitPaymentProduct705SpecificData `json:"paymentProduct705SpecificData,omitempty"` } diff --git a/domain/token/MandateSepaDirectDebit.go b/domain/token/MandateSepaDirectDebit.go index d292b91..05cf58d 100644 --- a/domain/token/MandateSepaDirectDebit.go +++ b/domain/token/MandateSepaDirectDebit.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // MandateSepaDirectDebit represents class MandateSepaDirectDebit -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MandateSepaDirectDebit type MandateSepaDirectDebit struct { BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` Creditor *Creditor `json:"creditor,omitempty"` diff --git a/domain/token/MandateSepaDirectDebitWithMandateID.go b/domain/token/MandateSepaDirectDebitWithMandateID.go index efa5f8c..326df75 100644 --- a/domain/token/MandateSepaDirectDebitWithMandateID.go +++ b/domain/token/MandateSepaDirectDebitWithMandateID.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // MandateSepaDirectDebitWithMandateID represents class MandateSepaDirectDebitWithMandateId -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MandateSepaDirectDebitWithMandateId type MandateSepaDirectDebitWithMandateID struct { BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` CustomerContractIdentifier *string `json:"customerContractIdentifier,omitempty"` diff --git a/domain/token/MandateSepaDirectDebitWithoutCreditor.go b/domain/token/MandateSepaDirectDebitWithoutCreditor.go index dd2ecbd..88d673a 100644 --- a/domain/token/MandateSepaDirectDebitWithoutCreditor.go +++ b/domain/token/MandateSepaDirectDebitWithoutCreditor.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // MandateSepaDirectDebitWithoutCreditor represents class MandateSepaDirectDebitWithoutCreditor -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_MandateSepaDirectDebitWithoutCreditor type MandateSepaDirectDebitWithoutCreditor struct { BankAccountIban *definitions.BankAccountIban `json:"bankAccountIban,omitempty"` CustomerContractIdentifier *string `json:"customerContractIdentifier,omitempty"` diff --git a/domain/token/NonSepaDirectDebit.go b/domain/token/NonSepaDirectDebit.go index 983436a..b5a650b 100644 --- a/domain/token/NonSepaDirectDebit.go +++ b/domain/token/NonSepaDirectDebit.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // NonSepaDirectDebit represents class TokenNonSepaDirectDebit -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenNonSepaDirectDebit type NonSepaDirectDebit struct { Alias *string `json:"alias,omitempty"` Customer *CustomerToken `json:"customer,omitempty"` diff --git a/domain/token/NonSepaDirectDebitPaymentProduct705SpecificData.go b/domain/token/NonSepaDirectDebitPaymentProduct705SpecificData.go index 4ae90dd..1060b8a 100644 --- a/domain/token/NonSepaDirectDebitPaymentProduct705SpecificData.go +++ b/domain/token/NonSepaDirectDebitPaymentProduct705SpecificData.go @@ -1,12 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token import "github.com/Ingenico-ePayments/connect-sdk-go/domain/definitions" // NonSepaDirectDebitPaymentProduct705SpecificData represents class TokenNonSepaDirectDebitPaymentProduct705SpecificData -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenNonSepaDirectDebitPaymentProduct705SpecificData type NonSepaDirectDebitPaymentProduct705SpecificData struct { AuthorisationID *string `json:"authorisationId,omitempty"` BankAccountBban *definitions.BankAccountBban `json:"bankAccountBban,omitempty"` diff --git a/domain/token/PersonalInformationToken.go b/domain/token/PersonalInformationToken.go index 83eb8c9..d3e0b43 100644 --- a/domain/token/PersonalInformationToken.go +++ b/domain/token/PersonalInformationToken.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // PersonalInformationToken represents class PersonalInformationToken -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalInformationToken type PersonalInformationToken struct { Name *PersonalNameToken `json:"name,omitempty"` } diff --git a/domain/token/PersonalNameToken.go b/domain/token/PersonalNameToken.go index ba4aab2..d2064ab 100644 --- a/domain/token/PersonalNameToken.go +++ b/domain/token/PersonalNameToken.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // PersonalNameToken represents class PersonalNameToken -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_PersonalNameToken type PersonalNameToken struct { FirstName *string `json:"firstName,omitempty"` Surname *string `json:"surname,omitempty"` diff --git a/domain/token/Response.go b/domain/token/Response.go index 21288b2..1da68b1 100644 --- a/domain/token/Response.go +++ b/domain/token/Response.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // Response represents class TokenResponse -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenResponse type Response struct { Card *Card `json:"card,omitempty"` EWallet *EWallet `json:"eWallet,omitempty"` diff --git a/domain/token/SepaDirectDebit.go b/domain/token/SepaDirectDebit.go index 7feb475..ea5b185 100644 --- a/domain/token/SepaDirectDebit.go +++ b/domain/token/SepaDirectDebit.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // SepaDirectDebit represents class TokenSepaDirectDebit -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenSepaDirectDebit type SepaDirectDebit struct { Alias *string `json:"alias,omitempty"` Customer *CustomerTokenWithContactDetails `json:"customer,omitempty"` diff --git a/domain/token/SepaDirectDebitWithoutCreditor.go b/domain/token/SepaDirectDebitWithoutCreditor.go index 4f41d1f..31d76ae 100644 --- a/domain/token/SepaDirectDebitWithoutCreditor.go +++ b/domain/token/SepaDirectDebitWithoutCreditor.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // SepaDirectDebitWithoutCreditor represents class TokenSepaDirectDebitWithoutCreditor -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_TokenSepaDirectDebitWithoutCreditor type SepaDirectDebitWithoutCreditor struct { Alias *string `json:"alias,omitempty"` Customer *CustomerTokenWithContactDetails `json:"customer,omitempty"` diff --git a/domain/token/UpdateRequest.go b/domain/token/UpdateRequest.go index a0d3aba..3ec868e 100644 --- a/domain/token/UpdateRequest.go +++ b/domain/token/UpdateRequest.go @@ -1,10 +1,9 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package token // UpdateRequest represents class UpdateTokenRequest -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#schema_UpdateTokenRequest type UpdateRequest struct { Card *Card `json:"card,omitempty"` EWallet *EWallet `json:"eWallet,omitempty"` diff --git a/examples/merchant/captures/GetCaptureExample.go b/examples/merchant/captures/GetCaptureExample.go new file mode 100644 index 0000000..a63ca06 --- /dev/null +++ b/examples/merchant/captures/GetCaptureExample.go @@ -0,0 +1,18 @@ +// This file was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package examples + +import "fmt" + +func getCaptureExample() { + client, clientErr := getClient() + if clientErr != nil { + panic(clientErr) + } + defer client.Close() + + response, err := client.Merchant("merchantId").Captures().Get("captureId", nil) + + fmt.Println(response, err) +} diff --git a/examples/merchant/captures/Helper.go b/examples/merchant/captures/Helper.go new file mode 100644 index 0000000..cf74bb3 --- /dev/null +++ b/examples/merchant/captures/Helper.go @@ -0,0 +1,51 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package examples + +import ( + "github.com/Ingenico-ePayments/connect-sdk-go" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/payment" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/payout" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/refund" +) + +func getClient() (*connectsdk.Client, error) { + apiKeyID := "someKey" + secretAPIKey := "someSecret" + + return connectsdk.CreateClient(apiKeyID, secretAPIKey, "Ingenico") +} + +func newBool(value bool) *bool { + return &value +} + +func newInt32(value int32) *int32 { + return &value +} + +func newInt64(value int64) *int64 { + return &value +} + +func newString(value string) *string { + return &value +} + +func handleDeclinedPayment(paymentResult *payment.CreateResult) { + // handle the result here +} + +func handleDeclinedPayout(payoutResult *payout.Result) { + // handle the result here +} + +func handleDeclinedRefund(refundResult *refund.Result) { + // handle the result here +} + +func handleAPIErrors(errors []errors.APIError) { + // handle the errors here +} diff --git a/examples/merchant/hostedcheckouts/CreateHostedCheckoutExample.go b/examples/merchant/hostedcheckouts/CreateHostedCheckoutExample.go index e7683c9..d873041 100644 --- a/examples/merchant/hostedcheckouts/CreateHostedCheckoutExample.go +++ b/examples/merchant/hostedcheckouts/CreateHostedCheckoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/hostedcheckouts/GetHostedCheckoutExample.go b/examples/merchant/hostedcheckouts/GetHostedCheckoutExample.go index 894c164..487ff08 100644 --- a/examples/merchant/hostedcheckouts/GetHostedCheckoutExample.go +++ b/examples/merchant/hostedcheckouts/GetHostedCheckoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/hostedcheckouts/Helper.go b/examples/merchant/hostedcheckouts/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/hostedcheckouts/Helper.go +++ b/examples/merchant/hostedcheckouts/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/ApprovePaymentExample.go b/examples/merchant/payments/ApprovePaymentExample.go index d39675d..da3206e 100644 --- a/examples/merchant/payments/ApprovePaymentExample.go +++ b/examples/merchant/payments/ApprovePaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/CancelApprovalPaymentExample.go b/examples/merchant/payments/CancelApprovalPaymentExample.go index 2308dda..414a793 100644 --- a/examples/merchant/payments/CancelApprovalPaymentExample.go +++ b/examples/merchant/payments/CancelApprovalPaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/CancelPaymentExample.go b/examples/merchant/payments/CancelPaymentExample.go index 11d6d71..247b251 100644 --- a/examples/merchant/payments/CancelPaymentExample.go +++ b/examples/merchant/payments/CancelPaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/CapturePaymentExample.go b/examples/merchant/payments/CapturePaymentExample.go new file mode 100644 index 0000000..8c03a72 --- /dev/null +++ b/examples/merchant/payments/CapturePaymentExample.go @@ -0,0 +1,30 @@ +// This file was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package examples + +import ( + "fmt" + + "github.com/Ingenico-ePayments/connect-sdk-go/domain/payment" +) + +func capturePaymentExample() { + client, clientErr := getClient() + if clientErr != nil { + panic(clientErr) + } + defer client.Close() + + // Assigning literals to pointer variables directly is not supported. + // The below code uses helper function newInt64 to overcome this issue. + // http://stackoverflow.com/a/30716481 lists a few more alternatives. + // The code for this helper function can be found in file Helper.go + + var body payment.CapturePaymentRequest + body.Amount = newInt64(2980) + + response, err := client.Merchant("merchantId").Payments().Capture("paymentId", body, nil) + + fmt.Println(response, err) +} diff --git a/examples/merchant/payments/CreatePaymentExample.go b/examples/merchant/payments/CreatePaymentExample.go index e560349..dac6d8b 100644 --- a/examples/merchant/payments/CreatePaymentExample.go +++ b/examples/merchant/payments/CreatePaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/GetPaymentCapturesExample.go b/examples/merchant/payments/GetPaymentCapturesExample.go new file mode 100644 index 0000000..86b886a --- /dev/null +++ b/examples/merchant/payments/GetPaymentCapturesExample.go @@ -0,0 +1,18 @@ +// This file was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package examples + +import "fmt" + +func getPaymentCapturesExample() { + client, clientErr := getClient() + if clientErr != nil { + panic(clientErr) + } + defer client.Close() + + response, err := client.Merchant("merchantId").Payments().Captures("paymentId", nil) + + fmt.Println(response, err) +} diff --git a/examples/merchant/payments/GetPaymentExample.go b/examples/merchant/payments/GetPaymentExample.go index 0b03a02..1b0b8f0 100644 --- a/examples/merchant/payments/GetPaymentExample.go +++ b/examples/merchant/payments/GetPaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/Helper.go b/examples/merchant/payments/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/payments/Helper.go +++ b/examples/merchant/payments/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/ProcessChallengedPaymentExample.go b/examples/merchant/payments/ProcessChallengedPaymentExample.go index e6b690b..51db34a 100644 --- a/examples/merchant/payments/ProcessChallengedPaymentExample.go +++ b/examples/merchant/payments/ProcessChallengedPaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/RefundPaymentExample.go b/examples/merchant/payments/RefundPaymentExample.go index aa8a386..88f6bbf 100644 --- a/examples/merchant/payments/RefundPaymentExample.go +++ b/examples/merchant/payments/RefundPaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payments/TokenizePaymentExample.go b/examples/merchant/payments/TokenizePaymentExample.go index 7ace393..8252ef7 100644 --- a/examples/merchant/payments/TokenizePaymentExample.go +++ b/examples/merchant/payments/TokenizePaymentExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payouts/ApprovePayoutExample.go b/examples/merchant/payouts/ApprovePayoutExample.go index 7afdbe1..b793f10 100644 --- a/examples/merchant/payouts/ApprovePayoutExample.go +++ b/examples/merchant/payouts/ApprovePayoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payouts/CancelApprovalPayoutExample.go b/examples/merchant/payouts/CancelApprovalPayoutExample.go index a15a7e8..0ef9600 100644 --- a/examples/merchant/payouts/CancelApprovalPayoutExample.go +++ b/examples/merchant/payouts/CancelApprovalPayoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payouts/CancelPayoutExample.go b/examples/merchant/payouts/CancelPayoutExample.go index 25d0bc8..2bf543e 100644 --- a/examples/merchant/payouts/CancelPayoutExample.go +++ b/examples/merchant/payouts/CancelPayoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payouts/CreatePayoutExample.go b/examples/merchant/payouts/CreatePayoutExample.go index 9b2ebc5..ef5d276 100644 --- a/examples/merchant/payouts/CreatePayoutExample.go +++ b/examples/merchant/payouts/CreatePayoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payouts/GetPayoutExample.go b/examples/merchant/payouts/GetPayoutExample.go index e6d88ba..96bdb04 100644 --- a/examples/merchant/payouts/GetPayoutExample.go +++ b/examples/merchant/payouts/GetPayoutExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/payouts/Helper.go b/examples/merchant/payouts/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/payouts/Helper.go +++ b/examples/merchant/payouts/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/productgroups/GetPaymentProductGroupExample.go b/examples/merchant/productgroups/GetPaymentProductGroupExample.go index 6cd7d77..83d5e39 100644 --- a/examples/merchant/productgroups/GetPaymentProductGroupExample.go +++ b/examples/merchant/productgroups/GetPaymentProductGroupExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -22,11 +22,11 @@ func getPaymentProductGroupExample() { // The code for these helper functions can be found in file Helper.go var query productgroups.GetParams + query.CountryCode = newString("US") + query.CurrencyCode = newString("USD") + query.Locale = newString("en_US") query.Amount = newInt64(1000) query.IsRecurring = newBool(true) - query.CountryCode = newString("NL") - query.Locale = newString("en_US") - query.CurrencyCode = newString("EUR") query.AddHide("fields") response, err := client.Merchant("merchantId").Productgroups().Get("cards", query, nil) diff --git a/examples/merchant/productgroups/GetPaymentProductGroupsExample.go b/examples/merchant/productgroups/GetPaymentProductGroupsExample.go index 8273f83..fc7cd17 100644 --- a/examples/merchant/productgroups/GetPaymentProductGroupsExample.go +++ b/examples/merchant/productgroups/GetPaymentProductGroupsExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -22,11 +22,11 @@ func getPaymentProductGroupsExample() { // The code for these helper functions can be found in file Helper.go var query productgroups.FindParams + query.CountryCode = newString("US") + query.CurrencyCode = newString("USD") + query.Locale = newString("en_US") query.Amount = newInt64(1000) query.IsRecurring = newBool(true) - query.CountryCode = newString("NL") - query.Locale = newString("en_US") - query.CurrencyCode = newString("EUR") query.AddHide("fields") response, err := client.Merchant("merchantId").Productgroups().Find(query, nil) diff --git a/examples/merchant/productgroups/Helper.go b/examples/merchant/productgroups/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/productgroups/Helper.go +++ b/examples/merchant/productgroups/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/products/GetDirectoryExample.go b/examples/merchant/products/GetDirectoryExample.go index 5b31eeb..bd86ce4 100644 --- a/examples/merchant/products/GetDirectoryExample.go +++ b/examples/merchant/products/GetDirectoryExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -22,8 +22,8 @@ func getDirectoryExample() { // The code for this helper function can be found in file Helper.go var query products.DirectoryParams - query.CurrencyCode = newString("EUR") query.CountryCode = newString("NL") + query.CurrencyCode = newString("EUR") response, err := client.Merchant("merchantId").Products().Directory(809, query, nil) diff --git a/examples/merchant/products/GetNetworksExample.go b/examples/merchant/products/GetNetworksExample.go index 2a66fb0..569bc83 100644 --- a/examples/merchant/products/GetNetworksExample.go +++ b/examples/merchant/products/GetNetworksExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -22,8 +22,8 @@ func getNetworksExample() { // The code for these helper functions can be found in file Helper.go var query products.NetworksParams - query.CountryCode = newString("NL") - query.CurrencyCode = newString("EUR") + query.CountryCode = newString("US") + query.CurrencyCode = newString("USD") query.Amount = newInt64(1000) query.IsRecurring = newBool(true) diff --git a/examples/merchant/products/GetPaymentProductExample.go b/examples/merchant/products/GetPaymentProductExample.go index 1da1541..3f05358 100644 --- a/examples/merchant/products/GetPaymentProductExample.go +++ b/examples/merchant/products/GetPaymentProductExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -22,11 +22,11 @@ func getPaymentProductExample() { // The code for these helper functions can be found in file Helper.go var query products.GetParams - query.Amount = newInt64(1000) - query.IsRecurring = newBool(true) query.CountryCode = newString("US") - query.Locale = newString("en_US") query.CurrencyCode = newString("USD") + query.Locale = newString("en_US") + query.Amount = newInt64(1000) + query.IsRecurring = newBool(true) query.AddHide("fields") response, err := client.Merchant("merchantId").Products().Get(1, query, nil) diff --git a/examples/merchant/products/GetPaymentProductPublicKeyExample.go b/examples/merchant/products/GetPaymentProductPublicKeyExample.go index 8f68c90..a943bcf 100644 --- a/examples/merchant/products/GetPaymentProductPublicKeyExample.go +++ b/examples/merchant/products/GetPaymentProductPublicKeyExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/products/GetPaymentProductsExample.go b/examples/merchant/products/GetPaymentProductsExample.go index f66a995..f5980c7 100644 --- a/examples/merchant/products/GetPaymentProductsExample.go +++ b/examples/merchant/products/GetPaymentProductsExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -22,11 +22,11 @@ func getPaymentProductsExample() { // The code for these helper functions can be found in file Helper.go var query products.FindParams - query.Amount = newInt64(1000) - query.IsRecurring = newBool(true) query.CountryCode = newString("US") - query.Locale = newString("en_US") query.CurrencyCode = newString("USD") + query.Locale = newString("en_US") + query.Amount = newInt64(1000) + query.IsRecurring = newBool(true) query.AddHide("fields") response, err := client.Merchant("merchantId").Products().Find(query, nil) diff --git a/examples/merchant/products/Helper.go b/examples/merchant/products/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/products/Helper.go +++ b/examples/merchant/products/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/refunds/ApproveRefundExample.go b/examples/merchant/refunds/ApproveRefundExample.go index ebcc9f0..74dab65 100644 --- a/examples/merchant/refunds/ApproveRefundExample.go +++ b/examples/merchant/refunds/ApproveRefundExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/refunds/CancelApprovalRefundExample.go b/examples/merchant/refunds/CancelApprovalRefundExample.go index 4b53799..60bd392 100644 --- a/examples/merchant/refunds/CancelApprovalRefundExample.go +++ b/examples/merchant/refunds/CancelApprovalRefundExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/refunds/CancelRefundExample.go b/examples/merchant/refunds/CancelRefundExample.go index cc62e92..f11a84d 100644 --- a/examples/merchant/refunds/CancelRefundExample.go +++ b/examples/merchant/refunds/CancelRefundExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/refunds/GetRefundExample.go b/examples/merchant/refunds/GetRefundExample.go index 75d002d..33bbfc7 100644 --- a/examples/merchant/refunds/GetRefundExample.go +++ b/examples/merchant/refunds/GetRefundExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/refunds/Helper.go b/examples/merchant/refunds/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/refunds/Helper.go +++ b/examples/merchant/refunds/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/riskassessments/Helper.go b/examples/merchant/riskassessments/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/riskassessments/Helper.go +++ b/examples/merchant/riskassessments/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/riskassessments/RiskAssessmentBankAccountExample.go b/examples/merchant/riskassessments/RiskAssessmentBankAccountExample.go index 49fc14c..08d9120 100644 --- a/examples/merchant/riskassessments/RiskAssessmentBankAccountExample.go +++ b/examples/merchant/riskassessments/RiskAssessmentBankAccountExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/riskassessments/RiskAssessmentCardsExample.go b/examples/merchant/riskassessments/RiskAssessmentCardsExample.go index 6f10cd6..d22b6d5 100644 --- a/examples/merchant/riskassessments/RiskAssessmentCardsExample.go +++ b/examples/merchant/riskassessments/RiskAssessmentCardsExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/services/ConvertAmountExample.go b/examples/merchant/services/ConvertAmountExample.go index 836a650..6352c8e 100644 --- a/examples/merchant/services/ConvertAmountExample.go +++ b/examples/merchant/services/ConvertAmountExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples @@ -23,8 +23,8 @@ func convertAmountExample() { var query services.ConvertAmountParams query.Source = newString("EUR") - query.Amount = newInt64(100) query.Target = newString("USD") + query.Amount = newInt64(100) response, err := client.Merchant("merchantId").Services().ConvertAmount(query, nil) diff --git a/examples/merchant/services/ConvertBankAccountExample.go b/examples/merchant/services/ConvertBankAccountExample.go index dda84d0..6807ff3 100644 --- a/examples/merchant/services/ConvertBankAccountExample.go +++ b/examples/merchant/services/ConvertBankAccountExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/services/Helper.go b/examples/merchant/services/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/services/Helper.go +++ b/examples/merchant/services/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/services/IINDetailsExample.go b/examples/merchant/services/IINDetailsExample.go index 4d86cac..05ccb41 100644 --- a/examples/merchant/services/IINDetailsExample.go +++ b/examples/merchant/services/IINDetailsExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/services/TestConnectionExample.go b/examples/merchant/services/TestConnectionExample.go index 80bea39..6105645 100644 --- a/examples/merchant/services/TestConnectionExample.go +++ b/examples/merchant/services/TestConnectionExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/sessions/CreateSessionExample.go b/examples/merchant/sessions/CreateSessionExample.go index d65c08a..eeacdcc 100644 --- a/examples/merchant/sessions/CreateSessionExample.go +++ b/examples/merchant/sessions/CreateSessionExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/sessions/Helper.go b/examples/merchant/sessions/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/sessions/Helper.go +++ b/examples/merchant/sessions/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/tokens/ApproveSepaDirectDebitTokenExample.go b/examples/merchant/tokens/ApproveSepaDirectDebitTokenExample.go index 0a2ebd6..388c6a3 100644 --- a/examples/merchant/tokens/ApproveSepaDirectDebitTokenExample.go +++ b/examples/merchant/tokens/ApproveSepaDirectDebitTokenExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/tokens/CreateTokenExample.go b/examples/merchant/tokens/CreateTokenExample.go index 755b1ba..6106dc8 100644 --- a/examples/merchant/tokens/CreateTokenExample.go +++ b/examples/merchant/tokens/CreateTokenExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/tokens/DeleteTokenExample.go b/examples/merchant/tokens/DeleteTokenExample.go index 229c38b..6ca8bab 100644 --- a/examples/merchant/tokens/DeleteTokenExample.go +++ b/examples/merchant/tokens/DeleteTokenExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/tokens/GetTokenExample.go b/examples/merchant/tokens/GetTokenExample.go index 80574d0..ccc3569 100644 --- a/examples/merchant/tokens/GetTokenExample.go +++ b/examples/merchant/tokens/GetTokenExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/tokens/Helper.go b/examples/merchant/tokens/Helper.go index 5cdbd8e..cf74bb3 100644 --- a/examples/merchant/tokens/Helper.go +++ b/examples/merchant/tokens/Helper.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/examples/merchant/tokens/UpdateTokenExample.go b/examples/merchant/tokens/UpdateTokenExample.go index a6c36d1..123f10e 100644 --- a/examples/merchant/tokens/UpdateTokenExample.go +++ b/examples/merchant/tokens/UpdateTokenExample.go @@ -1,5 +1,5 @@ // This file was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package examples diff --git a/merchant/Client.go b/merchant/Client.go index ae712da..9dabb30 100644 --- a/merchant/Client.go +++ b/merchant/Client.go @@ -1,10 +1,11 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package merchant import ( "github.com/Ingenico-ePayments/connect-sdk-go/internal/apiresource" + "github.com/Ingenico-ePayments/connect-sdk-go/merchant/captures" "github.com/Ingenico-ePayments/connect-sdk-go/merchant/hostedcheckouts" "github.com/Ingenico-ePayments/connect-sdk-go/merchant/payments" "github.com/Ingenico-ePayments/connect-sdk-go/merchant/payouts" @@ -22,36 +23,36 @@ type Client struct { apiResource *apiresource.APIResource } -// Hostedcheckouts represents the resource /{merchantId}/hostedcheckouts -// Create new hosted checkout -func (c *Client) Hostedcheckouts() *hostedcheckouts.Client { - return hostedcheckouts.NewClient(c.apiResource, nil) -} - // Payments represents the resource /{merchantId}/payments // Create, cancel and approve payments func (c *Client) Payments() *payments.Client { return payments.NewClient(c.apiResource, nil) } +// Captures represents the resource /{merchantId}/captures +// Get capture +func (c *Client) Captures() *captures.Client { + return captures.NewClient(c.apiResource, nil) +} + // Payouts represents the resource /{merchantId}/payouts // Create, cancel and approve payouts func (c *Client) Payouts() *payouts.Client { return payouts.NewClient(c.apiResource, nil) } -// Productgroups represents the resource /{merchantId}/productgroups -// Get information about payment product groups -func (c *Client) Productgroups() *productgroups.Client { - return productgroups.NewClient(c.apiResource, nil) -} - // Products represents the resource /{merchantId}/products // Get information about payment products func (c *Client) Products() *products.Client { return products.NewClient(c.apiResource, nil) } +// Productgroups represents the resource /{merchantId}/productgroups +// Get information about payment product groups +func (c *Client) Productgroups() *productgroups.Client { + return productgroups.NewClient(c.apiResource, nil) +} + // Refunds represents the resource /{merchantId}/refunds // Create, cancel and approve refunds func (c *Client) Refunds() *refunds.Client { @@ -82,6 +83,12 @@ func (c *Client) Tokens() *tokens.Client { return tokens.NewClient(c.apiResource, nil) } +// Hostedcheckouts represents the resource /{merchantId}/hostedcheckouts +// Create new hosted checkout +func (c *Client) Hostedcheckouts() *hostedcheckouts.Client { + return hostedcheckouts.NewClient(c.apiResource, nil) +} + // NewClient constructs a Merchant Client // // parent is the *apiresource.APIResource on top of which we want to build the new Merchant Client diff --git a/merchant/captures/Client.go b/merchant/captures/Client.go new file mode 100644 index 0000000..fc58863 --- /dev/null +++ b/merchant/captures/Client.go @@ -0,0 +1,80 @@ +// This class was auto-generated from the API references found at +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ + +package captures + +import ( + "github.com/Ingenico-ePayments/connect-sdk-go/communicator/communication" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/capture" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" + sdkErrors "github.com/Ingenico-ePayments/connect-sdk-go/errors" + "github.com/Ingenico-ePayments/connect-sdk-go/internal/apiresource" +) + +// Client represents a captures client. Thread-safe. +type Client struct { + apiResource *apiresource.APIResource +} + +// Get represents the resource /{merchantId}/captures/{captureId} +// Get capture +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/captures/get.html +// +// Can return any of the following errors: +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error +func (c *Client) Get(captureID string, context communication.CallContext) (capture.Response, error) { + var resultObject capture.Response + + pathContext := map[string]string{ + "captureId": captureID, + } + + uri, err := c.apiResource.InstantiateURIWithContext("/{apiVersion}/{merchantId}/captures/{captureId}", pathContext) + if err != nil { + return resultObject, err + } + + clientHeaders := c.apiResource.ClientHeaders() + + getErr := c.apiResource.Communicator().Get(uri, clientHeaders, nil, context, &resultObject) + if getErr != nil { + responseError, isResponseError := getErr.(*sdkErrors.ResponseError) + if isResponseError { + var errorObject interface{} + + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err + } + + err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) + if createErr != nil { + return resultObject, createErr + } + + return resultObject, err + } + + return resultObject, getErr + } + + return resultObject, nil +} + +// NewClient constructs a Captures Client +// +// parent is the *apiresource.APIResource on top of which we want to build the new Captures Client +func NewClient(parent *apiresource.APIResource, pathContext map[string]string) *Client { + apiResource := apiresource.NewAPIResourceWithParent(parent, pathContext) + + return &Client{apiResource} +} diff --git a/merchant/hostedcheckouts/Client.go b/merchant/hostedcheckouts/Client.go index 16a6a1e..fbc7b9d 100644 --- a/merchant/hostedcheckouts/Client.go +++ b/merchant/hostedcheckouts/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package hostedcheckouts @@ -18,18 +18,18 @@ type Client struct { // Create represents the resource /{merchantId}/hostedcheckouts // Create hosted checkout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__hostedcheckouts_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/hostedcheckouts/create.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Create(body hostedcheckout.CreateRequest, context communication.CallContext) (hostedcheckout.CreateResponse, error) { var resultObject hostedcheckout.CreateResponse @@ -46,17 +46,10 @@ func (c *Client) Create(body hostedcheckout.CreateRequest, context communication if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -75,18 +68,18 @@ func (c *Client) Create(body hostedcheckout.CreateRequest, context communication // Get represents the resource /{merchantId}/hostedcheckouts/{hostedCheckoutId} // Get hosted checkout status -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__hostedcheckouts__hostedCheckoutId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/hostedcheckouts/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Get(hostedCheckoutID string, context communication.CallContext) (hostedcheckout.GetResponse, error) { var resultObject hostedcheckout.GetResponse @@ -107,17 +100,10 @@ func (c *Client) Get(hostedCheckoutID string, context communication.CallContext) if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/payments/Client.go b/merchant/payments/Client.go index d89e3d8..3b8630b 100644 --- a/merchant/payments/Client.go +++ b/merchant/payments/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payments @@ -7,6 +7,7 @@ import ( "net/http" "github.com/Ingenico-ePayments/connect-sdk-go/communicator/communication" + "github.com/Ingenico-ePayments/connect-sdk-go/domain/capture" "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" "github.com/Ingenico-ePayments/connect-sdk-go/domain/payment" "github.com/Ingenico-ePayments/connect-sdk-go/domain/refund" @@ -22,19 +23,19 @@ type Client struct { // Create represents the resource /{merchantId}/payments // Create payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/create.html // // Can return any of the following errors: -// DeclinedPaymentError if the GlobalCollect platform declined / rejected the payment. The payment result will be available from the exception. -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * DeclinedPaymentError if the GlobalCollect platform declined / rejected the payment. The payment result will be available from the exception. +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Create(body payment.CreateRequest, context communication.CallContext) (payment.CreateResponse, error) { var resultObject payment.CreateResponse @@ -130,18 +131,18 @@ func (c *Client) Create(body payment.CreateRequest, context communication.CallCo // Get represents the resource /{merchantId}/payments/{paymentId} // Get payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Get(paymentID string, context communication.CallContext) (payment.Response, error) { var resultObject payment.Response @@ -162,17 +163,10 @@ func (c *Client) Get(paymentID string, context communication.CallContext) (payme if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -190,19 +184,19 @@ func (c *Client) Get(paymentID string, context communication.CallContext) (payme } // Approve represents the resource /{merchantId}/payments/{paymentId}/approve -// Capture payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__approve_post +// Approve payment +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/approve.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Approve(paymentID string, body payment.ApproveRequest, context communication.CallContext) (payment.ApprovalResponse, error) { var resultObject payment.ApprovalResponse @@ -223,17 +217,64 @@ func (c *Client) Approve(paymentID string, body payment.ApproveRequest, context if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err + } - break - } + err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) + if createErr != nil { + return resultObject, createErr + } + + return resultObject, err + } + + return resultObject, postErr + } + + return resultObject, nil +} + +// Capture represents the resource /{merchantId}/payments/{paymentId}/capture +// Capture payment +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/capture.html +// +// Can return any of the following errors: +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error +func (c *Client) Capture(paymentID string, body payment.CapturePaymentRequest, context communication.CallContext) (capture.Response, error) { + var resultObject capture.Response + + pathContext := map[string]string{ + "paymentId": paymentID, + } + + uri, err := c.apiResource.InstantiateURIWithContext("/{apiVersion}/{merchantId}/payments/{paymentId}/capture", pathContext) + if err != nil { + return resultObject, err + } + + clientHeaders := c.apiResource.ClientHeaders() + + postErr := c.apiResource.Communicator().Post(uri, clientHeaders, nil, body, context, &resultObject) + if postErr != nil { + responseError, isResponseError := postErr.(*sdkErrors.ResponseError) + if isResponseError { + var errorObject interface{} + + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -250,20 +291,74 @@ func (c *Client) Approve(paymentID string, body payment.ApproveRequest, context return resultObject, nil } +// Captures represents the resource /{merchantId}/payments/{paymentId}/captures +// Get captures of payment +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/captures.html +// +// Can return any of the following errors: +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error +func (c *Client) Captures(paymentID string, context communication.CallContext) (capture.CapturesResponse, error) { + var resultObject capture.CapturesResponse + + pathContext := map[string]string{ + "paymentId": paymentID, + } + + uri, err := c.apiResource.InstantiateURIWithContext("/{apiVersion}/{merchantId}/payments/{paymentId}/captures", pathContext) + if err != nil { + return resultObject, err + } + + clientHeaders := c.apiResource.ClientHeaders() + + getErr := c.apiResource.Communicator().Get(uri, clientHeaders, nil, context, &resultObject) + if getErr != nil { + responseError, isResponseError := getErr.(*sdkErrors.ResponseError) + if isResponseError { + var errorObject interface{} + + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err + } + + err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) + if createErr != nil { + return resultObject, createErr + } + + return resultObject, err + } + + return resultObject, getErr + } + + return resultObject, nil +} + // Cancel represents the resource /{merchantId}/payments/{paymentId}/cancel // Cancel payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__cancel_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/cancel.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cancel(paymentID string, context communication.CallContext) (payment.CancelResponse, error) { var resultObject payment.CancelResponse @@ -284,17 +379,10 @@ func (c *Client) Cancel(paymentID string, context communication.CallContext) (pa if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -313,18 +401,18 @@ func (c *Client) Cancel(paymentID string, context communication.CallContext) (pa // Cancelapproval represents the resource /{merchantId}/payments/{paymentId}/cancelapproval // Undo capture payment request -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__cancelapproval_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/cancelapproval.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cancelapproval(paymentID string, context communication.CallContext) (payment.CancelApprovalPaymentResponse, error) { var resultObject payment.CancelApprovalPaymentResponse @@ -345,17 +433,10 @@ func (c *Client) Cancelapproval(paymentID string, context communication.CallCont if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -374,18 +455,18 @@ func (c *Client) Cancelapproval(paymentID string, context communication.CallCont // Processchallenged represents the resource /{merchantId}/payments/{paymentId}/processchallenged // Approves challenged payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__processchallenged_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/processchallenged.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Processchallenged(paymentID string, context communication.CallContext) (payment.Response, error) { var resultObject payment.Response @@ -406,17 +487,10 @@ func (c *Client) Processchallenged(paymentID string, context communication.CallC if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -435,19 +509,19 @@ func (c *Client) Processchallenged(paymentID string, context communication.CallC // Refund represents the resource /{merchantId}/payments/{paymentId}/refund // Create refund -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__refund_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/refund.html // // Can return any of the following errors: -// DeclinedRefundError if the GlobalCollect platform declined / rejected the refund. The refund result will be available from the exception. -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * DeclinedRefundError if the GlobalCollect platform declined / rejected the refund. The refund result will be available from the exception. +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Refund(paymentID string, body refund.Request, context communication.CallContext) (refund.Response, error) { var resultObject refund.Response @@ -517,18 +591,18 @@ func (c *Client) Refund(paymentID string, body refund.Request, context communica // Tokenize represents the resource /{merchantId}/payments/{paymentId}/tokenize // Create a token from payment -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payments__paymentId__tokenize_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payments/tokenize.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Tokenize(paymentID string, body payment.TokenizeRequest, context communication.CallContext) (token.CreateResponse, error) { var resultObject token.CreateResponse @@ -549,17 +623,10 @@ func (c *Client) Tokenize(paymentID string, body payment.TokenizeRequest, contex if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/payouts/Client.go b/merchant/payouts/Client.go index f0e0d5a..f1a7457 100644 --- a/merchant/payouts/Client.go +++ b/merchant/payouts/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package payouts @@ -20,19 +20,19 @@ type Client struct { // Create represents the resource /{merchantId}/payouts // Create payout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payouts_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/create.html // // Can return any of the following errors: -// DeclinedPayoutError if the GlobalCollect platform declined / rejected the payout. The payout result will be available from the exception. -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * DeclinedPayoutError if the GlobalCollect platform declined / rejected the payout. The payout result will be available from the exception. +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Create(body payout.CreateRequest, context communication.CallContext) (payout.Response, error) { var resultObject payout.Response @@ -88,18 +88,18 @@ func (c *Client) Create(body payout.CreateRequest, context communication.CallCon // Get represents the resource /{merchantId}/payouts/{payoutId} // Get payout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payouts__payoutId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Get(payoutID string, context communication.CallContext) (payout.Response, error) { var resultObject payout.Response @@ -120,17 +120,10 @@ func (c *Client) Get(payoutID string, context communication.CallContext) (payout if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -149,18 +142,18 @@ func (c *Client) Get(payoutID string, context communication.CallContext) (payout // Approve represents the resource /{merchantId}/payouts/{payoutId}/approve // Approve payout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payouts__payoutId__approve_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/approve.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Approve(payoutID string, body payout.ApproveRequest, context communication.CallContext) (payout.Response, error) { var resultObject payout.Response @@ -181,17 +174,10 @@ func (c *Client) Approve(payoutID string, body payout.ApproveRequest, context co if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -210,18 +196,18 @@ func (c *Client) Approve(payoutID string, body payout.ApproveRequest, context co // Cancel represents the resource /{merchantId}/payouts/{payoutId}/cancel // Cancel payout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payouts__payoutId__cancel_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/cancel.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cancel(payoutID string, context communication.CallContext) error { pathContext := map[string]string{ "payoutId": payoutID, @@ -241,17 +227,10 @@ func (c *Client) Cancel(payoutID string, context communication.CallContext) erro if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -270,18 +249,18 @@ func (c *Client) Cancel(payoutID string, context communication.CallContext) erro // Cancelapproval represents the resource /{merchantId}/payouts/{payoutId}/cancelapproval // Undo approve payout -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__payouts__payoutId__cancelapproval_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/cancelapproval.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cancelapproval(payoutID string, context communication.CallContext) error { pathContext := map[string]string{ "payoutId": payoutID, @@ -301,17 +280,10 @@ func (c *Client) Cancelapproval(payoutID string, context communication.CallConte if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/productgroups/Client.go b/merchant/productgroups/Client.go index c831765..6b80fa0 100644 --- a/merchant/productgroups/Client.go +++ b/merchant/productgroups/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package productgroups @@ -18,18 +18,18 @@ type Client struct { // Find represents the resource /{merchantId}/productgroups // Get payment product groups -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__productgroups_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/find.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Find(query FindParams, context communication.CallContext) (product.PaymentProductGroups, error) { var resultObject product.PaymentProductGroups @@ -46,17 +46,10 @@ func (c *Client) Find(query FindParams, context communication.CallContext) (prod if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -75,18 +68,18 @@ func (c *Client) Find(query FindParams, context communication.CallContext) (prod // Get represents the resource /{merchantId}/productgroups/{paymentProductGroupId} // Get payment product group -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__productgroups__paymentProductGroupId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Get(paymentProductGroupID string, query GetParams, context communication.CallContext) (product.PaymentProductGroupResponse, error) { var resultObject product.PaymentProductGroupResponse @@ -107,17 +100,10 @@ func (c *Client) Get(paymentProductGroupID string, query GetParams, context comm if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/productgroups/FindParams.go b/merchant/productgroups/FindParams.go index cd85914..5c31208 100644 --- a/merchant/productgroups/FindParams.go +++ b/merchant/productgroups/FindParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package productgroups @@ -8,14 +8,14 @@ import ( ) // FindParams represents query parameters for Get payment product groups -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__productgroups_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/find.html type FindParams struct { - Amount *int64 - Hide []string - IsRecurring *bool CountryCode *string - Locale *string CurrencyCode *string + Locale *string + Amount *int64 + IsRecurring *bool + Hide []string } // AddHide adds an element to the Hide array. @@ -28,12 +28,12 @@ func (params *FindParams) AddHide(value string) { func (params *FindParams) ToRequestParameters() communicator.RequestParams { reqParams := communicator.RequestParams{} - communicator.AddRequestParameter(&reqParams, "amount", params.Amount) - communicator.AddRequestParameter(&reqParams, "hide", params.Hide) - communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) communicator.AddRequestParameter(&reqParams, "countryCode", params.CountryCode) - communicator.AddRequestParameter(&reqParams, "locale", params.Locale) communicator.AddRequestParameter(&reqParams, "currencyCode", params.CurrencyCode) + communicator.AddRequestParameter(&reqParams, "locale", params.Locale) + communicator.AddRequestParameter(&reqParams, "amount", params.Amount) + communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) + communicator.AddRequestParameter(&reqParams, "hide", params.Hide) return reqParams } diff --git a/merchant/productgroups/FindParams_test.go b/merchant/productgroups/FindParams_test.go index dffefca..e02bd01 100644 --- a/merchant/productgroups/FindParams_test.go +++ b/merchant/productgroups/FindParams_test.go @@ -1,6 +1,7 @@ package productgroups import ( + "runtime" "testing" "github.com/Ingenico-ePayments/connect-sdk-go/communicator" @@ -14,64 +15,64 @@ func TestFindParamsToRequestParameters(t *testing.T) { paramRequestCmp(t, lParams, paramList) { - amount := new(int64) - *amount = 1000 - lParams.Amount = amount + lParams.CountryCode = new(string) + *lParams.CountryCode = "NL" - param, _ := communicator.NewRequestParam("amount", "1000") + param, _ := communicator.NewRequestParam("countryCode", "NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("fields") + lParams.CurrencyCode = new(string) + *lParams.CurrencyCode = "EUR" - param, _ := communicator.NewRequestParam("hide", "fields") + param, _ := communicator.NewRequestParam("currencyCode", "EUR") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("accountsOnFile") + lParams.Locale = new(string) + *lParams.Locale = "nl_NL" - param, _ := communicator.NewRequestParam("hide", "accountsOnFile") + param, _ := communicator.NewRequestParam("locale", "nl_NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - isRecurring := new(bool) - *isRecurring = true - lParams.IsRecurring = isRecurring + amount := new(int64) + *amount = 1000 + lParams.Amount = amount - param, _ := communicator.NewRequestParam("isRecurring", "true") + param, _ := communicator.NewRequestParam("amount", "1000") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CountryCode = new(string) - *lParams.CountryCode = "NL" + isRecurring := new(bool) + *isRecurring = true + lParams.IsRecurring = isRecurring - param, _ := communicator.NewRequestParam("countryCode", "NL") + param, _ := communicator.NewRequestParam("isRecurring", "true") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.Locale = new(string) - *lParams.Locale = "nl_NL" + lParams.AddHide("fields") - param, _ := communicator.NewRequestParam("locale", "nl_NL") + param, _ := communicator.NewRequestParam("hide", "fields") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CurrencyCode = new(string) - *lParams.CurrencyCode = "EUR" + lParams.AddHide("accountsOnFile") - param, _ := communicator.NewRequestParam("currencyCode", "EUR") + param, _ := communicator.NewRequestParam("hide", "accountsOnFile") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) @@ -79,7 +80,7 @@ func TestFindParamsToRequestParameters(t *testing.T) { { lParams.Amount = nil - paramList = paramList[1:] + paramList = append(paramList[0:3], paramList[4:]...) } paramRequestCmp(t, lParams, paramList) } @@ -88,7 +89,9 @@ func paramRequestCmp(t *testing.T, a communicator.ParamRequest, b communicator.R params := a.ToRequestParameters() if requestParamsCmp(params, b) == false { - t.Fatalf("paramRequestCmp failed because %s != %s", params, b) + buf := make([]byte, 1<<16) + runtime.Stack(buf, true) + t.Fatal("paramRequestCmp failed on equality", params, b, string(buf)) } } diff --git a/merchant/productgroups/GetParams.go b/merchant/productgroups/GetParams.go index dddf288..bc59386 100644 --- a/merchant/productgroups/GetParams.go +++ b/merchant/productgroups/GetParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package productgroups @@ -8,14 +8,14 @@ import ( ) // GetParams represents query parameters for Get payment product group -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__productgroups__paymentProductGroupId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/get.html type GetParams struct { - Amount *int64 - Hide []string - IsRecurring *bool CountryCode *string - Locale *string CurrencyCode *string + Locale *string + Amount *int64 + IsRecurring *bool + Hide []string } // AddHide adds an element to the Hide array. @@ -28,12 +28,12 @@ func (params *GetParams) AddHide(value string) { func (params *GetParams) ToRequestParameters() communicator.RequestParams { reqParams := communicator.RequestParams{} - communicator.AddRequestParameter(&reqParams, "amount", params.Amount) - communicator.AddRequestParameter(&reqParams, "hide", params.Hide) - communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) communicator.AddRequestParameter(&reqParams, "countryCode", params.CountryCode) - communicator.AddRequestParameter(&reqParams, "locale", params.Locale) communicator.AddRequestParameter(&reqParams, "currencyCode", params.CurrencyCode) + communicator.AddRequestParameter(&reqParams, "locale", params.Locale) + communicator.AddRequestParameter(&reqParams, "amount", params.Amount) + communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) + communicator.AddRequestParameter(&reqParams, "hide", params.Hide) return reqParams } diff --git a/merchant/productgroups/GetParams_test.go b/merchant/productgroups/GetParams_test.go index 9179156..a0698a5 100644 --- a/merchant/productgroups/GetParams_test.go +++ b/merchant/productgroups/GetParams_test.go @@ -13,64 +13,64 @@ func TestGetParamsToRequestParameters(t *testing.T) { paramRequestCmp(t, lParams, paramList) { - amount := new(int64) - *amount = 1000 - lParams.Amount = amount + lParams.CountryCode = new(string) + *lParams.CountryCode = "NL" - param, _ := communicator.NewRequestParam("amount", "1000") + param, _ := communicator.NewRequestParam("countryCode", "NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("fields") + lParams.CurrencyCode = new(string) + *lParams.CurrencyCode = "EUR" - param, _ := communicator.NewRequestParam("hide", "fields") + param, _ := communicator.NewRequestParam("currencyCode", "EUR") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("accountsOnFile") + lParams.Locale = new(string) + *lParams.Locale = "nl_NL" - param, _ := communicator.NewRequestParam("hide", "accountsOnFile") + param, _ := communicator.NewRequestParam("locale", "nl_NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - isRecurring := new(bool) - *isRecurring = true - lParams.IsRecurring = isRecurring + amount := new(int64) + *amount = 1000 + lParams.Amount = amount - param, _ := communicator.NewRequestParam("isRecurring", "true") + param, _ := communicator.NewRequestParam("amount", "1000") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CountryCode = new(string) - *lParams.CountryCode = "NL" + isRecurring := new(bool) + *isRecurring = true + lParams.IsRecurring = isRecurring - param, _ := communicator.NewRequestParam("countryCode", "NL") + param, _ := communicator.NewRequestParam("isRecurring", "true") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.Locale = new(string) - *lParams.Locale = "nl_NL" + lParams.AddHide("fields") - param, _ := communicator.NewRequestParam("locale", "nl_NL") + param, _ := communicator.NewRequestParam("hide", "fields") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CurrencyCode = new(string) - *lParams.CurrencyCode = "EUR" + lParams.AddHide("accountsOnFile") - param, _ := communicator.NewRequestParam("currencyCode", "EUR") + param, _ := communicator.NewRequestParam("hide", "accountsOnFile") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) @@ -78,7 +78,7 @@ func TestGetParamsToRequestParameters(t *testing.T) { { lParams.Amount = nil - paramList = paramList[1:] + paramList = append(paramList[0:3], paramList[4:]...) } paramRequestCmp(t, lParams, paramList) } diff --git a/merchant/products/Client.go b/merchant/products/Client.go index 552d24d..5bc080c 100644 --- a/merchant/products/Client.go +++ b/merchant/products/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package products @@ -21,18 +21,18 @@ type Client struct { // Find represents the resource /{merchantId}/products // Get payment products -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/find.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Find(query FindParams, context communication.CallContext) (product.PaymentProducts, error) { var resultObject product.PaymentProducts @@ -49,17 +49,10 @@ func (c *Client) Find(query FindParams, context communication.CallContext) (prod if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -78,18 +71,18 @@ func (c *Client) Find(query FindParams, context communication.CallContext) (prod // Get represents the resource /{merchantId}/products/{paymentProductId} // Get payment product -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Get(paymentProductID int32, query GetParams, context communication.CallContext) (product.PaymentProductResponse, error) { var resultObject product.PaymentProductResponse @@ -110,17 +103,10 @@ func (c *Client) Get(paymentProductID int32, query GetParams, context communicat if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -139,18 +125,18 @@ func (c *Client) Get(paymentProductID int32, query GetParams, context communicat // Directory represents the resource /{merchantId}/products/{paymentProductId}/directory // Get payment product directory -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__directory_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/directory.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Directory(paymentProductID int32, query DirectoryParams, context communication.CallContext) (product.Directory, error) { var resultObject product.Directory @@ -171,17 +157,10 @@ func (c *Client) Directory(paymentProductID int32, query DirectoryParams, contex if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -200,18 +179,18 @@ func (c *Client) Directory(paymentProductID int32, query DirectoryParams, contex // Networks represents the resource /{merchantId}/products/{paymentProductId}/networks // Get payment product networks -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__networks_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/networks.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Networks(paymentProductID int32, query NetworksParams, context communication.CallContext) (product.PaymentProductNetworksResponse, error) { var resultObject product.PaymentProductNetworksResponse @@ -232,17 +211,10 @@ func (c *Client) Networks(paymentProductID int32, query NetworksParams, context if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -261,18 +233,18 @@ func (c *Client) Networks(paymentProductID int32, query NetworksParams, context // PublicKey represents the resource /{merchantId}/products/{paymentProductId}/publicKey // Get payment product specific public key -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__publicKey_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/publicKey.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) PublicKey(paymentProductID int32, context communication.CallContext) (publickey.PublicKey, error) { var resultObject publickey.PublicKey @@ -293,17 +265,10 @@ func (c *Client) PublicKey(paymentProductID int32, context communication.CallCon if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/products/DirectoryParams.go b/merchant/products/DirectoryParams.go index e0ea288..9657d31 100644 --- a/merchant/products/DirectoryParams.go +++ b/merchant/products/DirectoryParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package products @@ -8,18 +8,18 @@ import ( ) // DirectoryParams represents query parameters for Get payment product directory -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__directory_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/directory.html type DirectoryParams struct { - CurrencyCode *string CountryCode *string + CurrencyCode *string } // ToRequestParameters converts the query to communicator.RequestParams func (params *DirectoryParams) ToRequestParameters() communicator.RequestParams { reqParams := communicator.RequestParams{} - communicator.AddRequestParameter(&reqParams, "currencyCode", params.CurrencyCode) communicator.AddRequestParameter(&reqParams, "countryCode", params.CountryCode) + communicator.AddRequestParameter(&reqParams, "currencyCode", params.CurrencyCode) return reqParams } diff --git a/merchant/products/DirectoryParams_test.go b/merchant/products/DirectoryParams_test.go index 620a2b0..e01b786 100644 --- a/merchant/products/DirectoryParams_test.go +++ b/merchant/products/DirectoryParams_test.go @@ -13,19 +13,19 @@ func TestDirectoryParamsToRequestParameters(t *testing.T) { paramRequestCmp(t, lParams, paramList) { - lParams.CurrencyCode = new(string) - *lParams.CurrencyCode = "EUR" + lParams.CountryCode = new(string) + *lParams.CountryCode = "NL" - param, _ := communicator.NewRequestParam("currencyCode", "EUR") + param, _ := communicator.NewRequestParam("countryCode", "NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CountryCode = new(string) - *lParams.CountryCode = "NL" + lParams.CurrencyCode = new(string) + *lParams.CurrencyCode = "EUR" - param, _ := communicator.NewRequestParam("countryCode", "NL") + param, _ := communicator.NewRequestParam("currencyCode", "EUR") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) diff --git a/merchant/products/FindParams.go b/merchant/products/FindParams.go index b097adf..9cf6471 100644 --- a/merchant/products/FindParams.go +++ b/merchant/products/FindParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package products @@ -8,14 +8,14 @@ import ( ) // FindParams represents query parameters for Get payment products -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/find.html type FindParams struct { - Amount *int64 - Hide []string - IsRecurring *bool CountryCode *string - Locale *string CurrencyCode *string + Locale *string + Amount *int64 + IsRecurring *bool + Hide []string } // AddHide adds an element to the Hide array. @@ -28,12 +28,12 @@ func (params *FindParams) AddHide(value string) { func (params *FindParams) ToRequestParameters() communicator.RequestParams { reqParams := communicator.RequestParams{} - communicator.AddRequestParameter(&reqParams, "amount", params.Amount) - communicator.AddRequestParameter(&reqParams, "hide", params.Hide) - communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) communicator.AddRequestParameter(&reqParams, "countryCode", params.CountryCode) - communicator.AddRequestParameter(&reqParams, "locale", params.Locale) communicator.AddRequestParameter(&reqParams, "currencyCode", params.CurrencyCode) + communicator.AddRequestParameter(&reqParams, "locale", params.Locale) + communicator.AddRequestParameter(&reqParams, "amount", params.Amount) + communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) + communicator.AddRequestParameter(&reqParams, "hide", params.Hide) return reqParams } diff --git a/merchant/products/FindParams_test.go b/merchant/products/FindParams_test.go index df69705..f71b7ab 100644 --- a/merchant/products/FindParams_test.go +++ b/merchant/products/FindParams_test.go @@ -1,6 +1,7 @@ package products import ( + "runtime" "testing" "github.com/Ingenico-ePayments/connect-sdk-go/communicator" @@ -13,64 +14,64 @@ func TestFindParamsToRequestParameters(t *testing.T) { paramRequestCmp(t, lParams, paramList) { - amount := new(int64) - *amount = 1000 - lParams.Amount = amount + lParams.CountryCode = new(string) + *lParams.CountryCode = "NL" - param, _ := communicator.NewRequestParam("amount", "1000") + param, _ := communicator.NewRequestParam("countryCode", "NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("fields") + lParams.CurrencyCode = new(string) + *lParams.CurrencyCode = "EUR" - param, _ := communicator.NewRequestParam("hide", "fields") + param, _ := communicator.NewRequestParam("currencyCode", "EUR") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("accountsOnFile") + lParams.Locale = new(string) + *lParams.Locale = "nl_NL" - param, _ := communicator.NewRequestParam("hide", "accountsOnFile") + param, _ := communicator.NewRequestParam("locale", "nl_NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - isRecurring := new(bool) - *isRecurring = true - lParams.IsRecurring = isRecurring + amount := new(int64) + *amount = 1000 + lParams.Amount = amount - param, _ := communicator.NewRequestParam("isRecurring", "true") + param, _ := communicator.NewRequestParam("amount", "1000") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CountryCode = new(string) - *lParams.CountryCode = "NL" + isRecurring := new(bool) + *isRecurring = true + lParams.IsRecurring = isRecurring - param, _ := communicator.NewRequestParam("countryCode", "NL") + param, _ := communicator.NewRequestParam("isRecurring", "true") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.Locale = new(string) - *lParams.Locale = "nl_NL" + lParams.AddHide("fields") - param, _ := communicator.NewRequestParam("locale", "nl_NL") + param, _ := communicator.NewRequestParam("hide", "fields") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CurrencyCode = new(string) - *lParams.CurrencyCode = "EUR" + lParams.AddHide("accountsOnFile") - param, _ := communicator.NewRequestParam("currencyCode", "EUR") + param, _ := communicator.NewRequestParam("hide", "accountsOnFile") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) @@ -78,7 +79,7 @@ func TestFindParamsToRequestParameters(t *testing.T) { { lParams.Amount = nil - paramList = paramList[1:] + paramList = append(paramList[0:3], paramList[4:]...) } paramRequestCmp(t, lParams, paramList) } @@ -87,7 +88,9 @@ func paramRequestCmp(t *testing.T, a communicator.ParamRequest, b communicator.R params := a.ToRequestParameters() if requestParamsCmp(params, b) == false { - t.Fatal("paramRequestCmp failed on equality") + buf := make([]byte, 1<<16) + runtime.Stack(buf, true) + t.Fatal("paramRequestCmp failed on equality", params, b, string(buf)) } } diff --git a/merchant/products/GetParams.go b/merchant/products/GetParams.go index 0d3b813..0401253 100644 --- a/merchant/products/GetParams.go +++ b/merchant/products/GetParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package products @@ -8,14 +8,14 @@ import ( ) // GetParams represents query parameters for Get payment product -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/get.html type GetParams struct { - Amount *int64 - Hide []string - IsRecurring *bool CountryCode *string - Locale *string CurrencyCode *string + Locale *string + Amount *int64 + IsRecurring *bool + Hide []string } // AddHide adds an element to the Hide array. @@ -28,12 +28,12 @@ func (params *GetParams) AddHide(value string) { func (params *GetParams) ToRequestParameters() communicator.RequestParams { reqParams := communicator.RequestParams{} - communicator.AddRequestParameter(&reqParams, "amount", params.Amount) - communicator.AddRequestParameter(&reqParams, "hide", params.Hide) - communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) communicator.AddRequestParameter(&reqParams, "countryCode", params.CountryCode) - communicator.AddRequestParameter(&reqParams, "locale", params.Locale) communicator.AddRequestParameter(&reqParams, "currencyCode", params.CurrencyCode) + communicator.AddRequestParameter(&reqParams, "locale", params.Locale) + communicator.AddRequestParameter(&reqParams, "amount", params.Amount) + communicator.AddRequestParameter(&reqParams, "isRecurring", params.IsRecurring) + communicator.AddRequestParameter(&reqParams, "hide", params.Hide) return reqParams } diff --git a/merchant/products/GetParams_test.go b/merchant/products/GetParams_test.go index a19269e..ac2aba0 100644 --- a/merchant/products/GetParams_test.go +++ b/merchant/products/GetParams_test.go @@ -13,64 +13,64 @@ func TestGetParamsToRequestParameters(t *testing.T) { paramRequestCmp(t, lParams, paramList) { - amount := new(int64) - *amount = 1000 - lParams.Amount = amount + lParams.CountryCode = new(string) + *lParams.CountryCode = "NL" - param, _ := communicator.NewRequestParam("amount", "1000") + param, _ := communicator.NewRequestParam("countryCode", "NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("fields") + lParams.CurrencyCode = new(string) + *lParams.CurrencyCode = "EUR" - param, _ := communicator.NewRequestParam("hide", "fields") + param, _ := communicator.NewRequestParam("currencyCode", "EUR") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.AddHide("accountsOnFile") + lParams.Locale = new(string) + *lParams.Locale = "nl_NL" - param, _ := communicator.NewRequestParam("hide", "accountsOnFile") + param, _ := communicator.NewRequestParam("locale", "nl_NL") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - isRecurring := new(bool) - *isRecurring = true - lParams.IsRecurring = isRecurring + amount := new(int64) + *amount = 1000 + lParams.Amount = amount - param, _ := communicator.NewRequestParam("isRecurring", "true") + param, _ := communicator.NewRequestParam("amount", "1000") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CountryCode = new(string) - *lParams.CountryCode = "NL" + isRecurring := new(bool) + *isRecurring = true + lParams.IsRecurring = isRecurring - param, _ := communicator.NewRequestParam("countryCode", "NL") + param, _ := communicator.NewRequestParam("isRecurring", "true") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.Locale = new(string) - *lParams.Locale = "nl_NL" + lParams.AddHide("fields") - param, _ := communicator.NewRequestParam("locale", "nl_NL") + param, _ := communicator.NewRequestParam("hide", "fields") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.CurrencyCode = new(string) - *lParams.CurrencyCode = "EUR" + lParams.AddHide("accountsOnFile") - param, _ := communicator.NewRequestParam("currencyCode", "EUR") + param, _ := communicator.NewRequestParam("hide", "accountsOnFile") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) @@ -78,7 +78,7 @@ func TestGetParamsToRequestParameters(t *testing.T) { { lParams.Amount = nil - paramList = paramList[1:] + paramList = append(paramList[0:3], paramList[4:]...) } paramRequestCmp(t, lParams, paramList) } diff --git a/merchant/products/NetworksParams.go b/merchant/products/NetworksParams.go index 4918357..979b413 100644 --- a/merchant/products/NetworksParams.go +++ b/merchant/products/NetworksParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package products @@ -8,7 +8,7 @@ import ( ) // NetworksParams represents query parameters for Get payment product networks -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__networks_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/products/networks.html type NetworksParams struct { CountryCode *string CurrencyCode *string diff --git a/merchant/refunds/Client.go b/merchant/refunds/Client.go index 6b19bfd..6c78a8e 100644 --- a/merchant/refunds/Client.go +++ b/merchant/refunds/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package refunds @@ -18,18 +18,18 @@ type Client struct { // Get represents the resource /{merchantId}/refunds/{refundId} // Get refund -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__refunds__refundId__get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/refunds/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Get(refundID string, context communication.CallContext) (refund.Response, error) { var resultObject refund.Response @@ -50,17 +50,10 @@ func (c *Client) Get(refundID string, context communication.CallContext) (refund if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -79,18 +72,18 @@ func (c *Client) Get(refundID string, context communication.CallContext) (refund // Approve represents the resource /{merchantId}/refunds/{refundId}/approve // Approve refund -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__refunds__refundId__approve_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/refunds/approve.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Approve(refundID string, body refund.ApproveRequest, context communication.CallContext) error { pathContext := map[string]string{ "refundId": refundID, @@ -110,17 +103,10 @@ func (c *Client) Approve(refundID string, body refund.ApproveRequest, context co if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -139,18 +125,18 @@ func (c *Client) Approve(refundID string, body refund.ApproveRequest, context co // Cancel represents the resource /{merchantId}/refunds/{refundId}/cancel // Cancel refund -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__refunds__refundId__cancel_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/refunds/cancel.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cancel(refundID string, context communication.CallContext) error { pathContext := map[string]string{ "refundId": refundID, @@ -170,17 +156,10 @@ func (c *Client) Cancel(refundID string, context communication.CallContext) erro if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -199,18 +178,18 @@ func (c *Client) Cancel(refundID string, context communication.CallContext) erro // Cancelapproval represents the resource /{merchantId}/refunds/{refundId}/cancelapproval // Undo approve refund -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__refunds__refundId__cancelapproval_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/refunds/cancelapproval.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cancelapproval(refundID string, context communication.CallContext) error { pathContext := map[string]string{ "refundId": refundID, @@ -230,17 +209,10 @@ func (c *Client) Cancelapproval(refundID string, context communication.CallConte if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/riskassessments/Client.go b/merchant/riskassessments/Client.go index a6fd04c..edab772 100644 --- a/merchant/riskassessments/Client.go +++ b/merchant/riskassessments/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package riskassessments @@ -17,19 +17,19 @@ type Client struct { } // Bankaccounts represents the resource /{merchantId}/riskassessments/bankaccounts -// Risk-assess bank account -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__riskassessments_bankaccounts_post +// Risk-assess bankaccount +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/riskassessments/bankaccounts.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Bankaccounts(body riskassessments.RiskAssessmentBankAccount, context communication.CallContext) (riskassessments.RiskAssessmentResponse, error) { var resultObject riskassessments.RiskAssessmentResponse @@ -46,17 +46,10 @@ func (c *Client) Bankaccounts(body riskassessments.RiskAssessmentBankAccount, co if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -75,18 +68,18 @@ func (c *Client) Bankaccounts(body riskassessments.RiskAssessmentBankAccount, co // Cards represents the resource /{merchantId}/riskassessments/cards // Risk-assess card -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__riskassessments_cards_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/riskassessments/cards.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Cards(body riskassessments.RiskAssessmentCard, context communication.CallContext) (riskassessments.RiskAssessmentResponse, error) { var resultObject riskassessments.RiskAssessmentResponse @@ -103,17 +96,10 @@ func (c *Client) Cards(body riskassessments.RiskAssessmentCard, context communic if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/services/Client.go b/merchant/services/Client.go index 2627bd8..8147555 100644 --- a/merchant/services/Client.go +++ b/merchant/services/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services @@ -18,18 +18,18 @@ type Client struct { // ConvertAmount represents the resource /{merchantId}/services/convert/amount // Convert amount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__services_convert_amount_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/services/convertAmount.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) ConvertAmount(query ConvertAmountParams, context communication.CallContext) (services.ConvertAmount, error) { var resultObject services.ConvertAmount @@ -46,17 +46,10 @@ func (c *Client) ConvertAmount(query ConvertAmountParams, context communication. if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -74,19 +67,19 @@ func (c *Client) ConvertAmount(query ConvertAmountParams, context communication. } // Bankaccount represents the resource /{merchantId}/services/convert/bankaccount -// Convert Bankaccount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__services_convert_bankaccount_post +// Convert bankaccount +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/services/bankaccount.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Bankaccount(body services.BankDetailsRequest, context communication.CallContext) (services.BankDetailsResponse, error) { var resultObject services.BankDetailsResponse @@ -103,17 +96,10 @@ func (c *Client) Bankaccount(body services.BankDetailsRequest, context communica if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -132,18 +118,18 @@ func (c *Client) Bankaccount(body services.BankDetailsRequest, context communica // GetIINdetails represents the resource /{merchantId}/services/getIINdetails // Get IIN details -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__services_getIINdetails_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/services/getIINdetails.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) GetIINdetails(body services.GetIINDetailsRequest, context communication.CallContext) (services.GetIINDetailsResponse, error) { var resultObject services.GetIINDetailsResponse @@ -160,17 +146,10 @@ func (c *Client) GetIINdetails(body services.GetIINDetailsRequest, context commu if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -189,18 +168,18 @@ func (c *Client) GetIINdetails(body services.GetIINDetailsRequest, context commu // Testconnection represents the resource /{merchantId}/services/testconnection // Test connection -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__services_testconnection_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/services/testconnection.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Testconnection(context communication.CallContext) (services.TestConnection, error) { var resultObject services.TestConnection @@ -217,17 +196,10 @@ func (c *Client) Testconnection(context communication.CallContext) (services.Tes if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/services/ConvertAmountParams.go b/merchant/services/ConvertAmountParams.go index dd8d3ad..68bd2ab 100644 --- a/merchant/services/ConvertAmountParams.go +++ b/merchant/services/ConvertAmountParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package services @@ -8,11 +8,11 @@ import ( ) // ConvertAmountParams represents query parameters for Convert amount -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__services_convert_amount_get +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/services/convertAmount.html type ConvertAmountParams struct { Source *string - Amount *int64 Target *string + Amount *int64 } // ToRequestParameters converts the query to communicator.RequestParams @@ -20,8 +20,8 @@ func (params *ConvertAmountParams) ToRequestParameters() communicator.RequestPar reqParams := communicator.RequestParams{} communicator.AddRequestParameter(&reqParams, "source", params.Source) - communicator.AddRequestParameter(&reqParams, "amount", params.Amount) communicator.AddRequestParameter(&reqParams, "target", params.Target) + communicator.AddRequestParameter(&reqParams, "amount", params.Amount) return reqParams } diff --git a/merchant/services/ConvertAmountParams_test.go b/merchant/services/ConvertAmountParams_test.go index 9aa9c45..729d93c 100644 --- a/merchant/services/ConvertAmountParams_test.go +++ b/merchant/services/ConvertAmountParams_test.go @@ -23,19 +23,19 @@ func TestToRequestParameters(t *testing.T) { paramRequestCmp(t, lParams, paramList) { - lParams.Amount = new(int64) - *lParams.Amount = 1000 + lParams.Target = new(string) + *lParams.Target = "USD" - param, _ := communicator.NewRequestParam("amount", "1000") + param, _ := communicator.NewRequestParam("target", "USD") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) { - lParams.Target = new(string) - *lParams.Target = "USD" + lParams.Amount = new(int64) + *lParams.Amount = 1000 - param, _ := communicator.NewRequestParam("target", "USD") + param, _ := communicator.NewRequestParam("amount", "1000") paramList = append(paramList, *param) } paramRequestCmp(t, lParams, paramList) diff --git a/merchant/sessions/Client.go b/merchant/sessions/Client.go index d891a74..00af011 100644 --- a/merchant/sessions/Client.go +++ b/merchant/sessions/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package sessions @@ -17,19 +17,19 @@ type Client struct { } // Create represents the resource /{merchantId}/sessions -// Create Session -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__sessions_post +// Create session +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/sessions/create.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Create(body sessions.SessionRequest, context communication.CallContext) (sessions.SessionResponse, error) { var resultObject sessions.SessionResponse @@ -46,17 +46,10 @@ func (c *Client) Create(body sessions.SessionRequest, context communication.Call if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/tokens/Client.go b/merchant/tokens/Client.go index 1ba70bf..e74172b 100644 --- a/merchant/tokens/Client.go +++ b/merchant/tokens/Client.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package tokens @@ -18,18 +18,18 @@ type Client struct { // Create represents the resource /{merchantId}/tokens // Create token -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__tokens_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/tokens/create.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Create(body token.CreateRequest, context communication.CallContext) (token.CreateResponse, error) { var resultObject token.CreateResponse @@ -46,17 +46,10 @@ func (c *Client) Create(body token.CreateRequest, context communication.CallCont if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -73,142 +66,128 @@ func (c *Client) Create(body token.CreateRequest, context communication.CallCont return resultObject, nil } -// Delete represents the resource /{merchantId}/tokens/{tokenId} -// Delete token -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__tokens__tokenId__delete +// Get represents the resource /{merchantId}/tokens/{tokenId} +// Get token +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/tokens/get.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error -func (c *Client) Delete(tokenID string, query DeleteParams, context communication.CallContext) error { +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error +func (c *Client) Get(tokenID string, context communication.CallContext) (token.Response, error) { + var resultObject token.Response + pathContext := map[string]string{ "tokenId": tokenID, } uri, err := c.apiResource.InstantiateURIWithContext("/{apiVersion}/{merchantId}/tokens/{tokenId}", pathContext) if err != nil { - return err + return resultObject, err } clientHeaders := c.apiResource.ClientHeaders() - var resultObject map[string]interface{} - deleteErr := c.apiResource.Communicator().Delete(uri, clientHeaders, &query, context, &resultObject) - if deleteErr != nil { - responseError, isResponseError := deleteErr.(*sdkErrors.ResponseError) + getErr := c.apiResource.Communicator().Get(uri, clientHeaders, nil, context, &resultObject) + if getErr != nil { + responseError, isResponseError := getErr.(*sdkErrors.ResponseError) if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return resultObject, err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) if createErr != nil { - return createErr + return resultObject, createErr } - return err + return resultObject, err } - return deleteErr + return resultObject, getErr } - return nil + return resultObject, nil } -// Get represents the resource /{merchantId}/tokens/{tokenId} -// Get token -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__tokens__tokenId__get +// Update represents the resource /{merchantId}/tokens/{tokenId} +// Update token +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/tokens/update.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error -func (c *Client) Get(tokenID string, context communication.CallContext) (token.Response, error) { - var resultObject token.Response - +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error +func (c *Client) Update(tokenID string, body token.UpdateRequest, context communication.CallContext) error { pathContext := map[string]string{ "tokenId": tokenID, } uri, err := c.apiResource.InstantiateURIWithContext("/{apiVersion}/{merchantId}/tokens/{tokenId}", pathContext) if err != nil { - return resultObject, err + return err } clientHeaders := c.apiResource.ClientHeaders() - getErr := c.apiResource.Communicator().Get(uri, clientHeaders, nil, context, &resultObject) - if getErr != nil { - responseError, isResponseError := getErr.(*sdkErrors.ResponseError) + var resultObject map[string]interface{} + putErr := c.apiResource.Communicator().Put(uri, clientHeaders, nil, body, context, &resultObject) + if putErr != nil { + responseError, isResponseError := putErr.(*sdkErrors.ResponseError) if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return resultObject, err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) if createErr != nil { - return resultObject, createErr + return createErr } - return resultObject, err + return err } - return resultObject, getErr + return putErr } - return resultObject, nil + return nil } -// Update represents the resource /{merchantId}/tokens/{tokenId} -// Update token -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__tokens__tokenId__put +// Delete represents the resource /{merchantId}/tokens/{tokenId} +// Delete token +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/tokens/delete.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error -func (c *Client) Update(tokenID string, body token.UpdateRequest, context communication.CallContext) error { +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error +func (c *Client) Delete(tokenID string, query DeleteParams, context communication.CallContext) error { pathContext := map[string]string{ "tokenId": tokenID, } @@ -221,23 +200,16 @@ func (c *Client) Update(tokenID string, body token.UpdateRequest, context commun clientHeaders := c.apiResource.ClientHeaders() var resultObject map[string]interface{} - putErr := c.apiResource.Communicator().Put(uri, clientHeaders, nil, body, context, &resultObject) - if putErr != nil { - responseError, isResponseError := putErr.(*sdkErrors.ResponseError) + deleteErr := c.apiResource.Communicator().Delete(uri, clientHeaders, &query, context, &resultObject) + if deleteErr != nil { + responseError, isResponseError := deleteErr.(*sdkErrors.ResponseError) if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) @@ -248,7 +220,7 @@ func (c *Client) Update(tokenID string, body token.UpdateRequest, context commun return err } - return putErr + return deleteErr } return nil @@ -256,18 +228,18 @@ func (c *Client) Update(tokenID string, body token.UpdateRequest, context commun // Approvesepadirectdebit represents the resource /{merchantId}/tokens/{tokenId}/approvesepadirectdebit // Approve SEPA DD mandate -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__tokens__tokenId__approvesepadirectdebit_post +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/tokens/approvesepadirectdebit.html // // Can return any of the following errors: -// ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) -// AuthorizationError if the request was not allowed (HTTP status code 403) -// IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) -// ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, -// or there was a conflict (HTTP status code 404, 409 or 410) -// GlobalCollectError if something went wrong at the GlobalCollect platform, -// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, -// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) -// APIError if the GlobalCollect platform returned any other error +// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) +// * AuthorizationError if the request was not allowed (HTTP status code 403) +// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) +// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, +// or there was a conflict (HTTP status code 404, 409 or 410) +// * GlobalCollectError if something went wrong at the GlobalCollect platform, +// the GlobalCollect platform was unable to process a message from a downstream partner/acquirer, +// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) +// * APIError if the GlobalCollect platform returned any other error func (c *Client) Approvesepadirectdebit(tokenID string, body token.ApproveRequest, context communication.CallContext) error { pathContext := map[string]string{ "tokenId": tokenID, @@ -287,17 +259,10 @@ func (c *Client) Approvesepadirectdebit(tokenID string, body token.ApproveReques if isResponseError { var errorObject interface{} - switch responseError.StatusCode() { - default: - { - errorObject = &errors.ErrorResponse{} - err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) - if err != nil { - return err - } - - break - } + errorObject = &errors.ErrorResponse{} + err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject) + if err != nil { + return err } err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context) diff --git a/merchant/tokens/DeleteParams.go b/merchant/tokens/DeleteParams.go index 5f9f4ae..7aa1fbc 100644 --- a/merchant/tokens/DeleteParams.go +++ b/merchant/tokens/DeleteParams.go @@ -1,5 +1,5 @@ // This class was auto-generated from the API references found at -// https://developer.globalcollect.com/documentation/api/server/ +// https://epayments-api.developer-ingenico.com/s2sapi/v1/ package tokens @@ -8,7 +8,7 @@ import ( ) // DeleteParams represents query parameters for Delete token -// Documentation can be found at https://developer.globalcollect.com/documentation/api/server/#__merchantId__tokens__tokenId__delete +// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/tokens/delete.html type DeleteParams struct { MandateCancelDate *string } diff --git a/merchant/tokens/DeleteParams_test.go b/merchant/tokens/DeleteParams_test.go index 3cb9d5e..ddc2d04 100644 --- a/merchant/tokens/DeleteParams_test.go +++ b/merchant/tokens/DeleteParams_test.go @@ -1,6 +1,7 @@ package tokens import ( + "runtime" "testing" "github.com/Ingenico-ePayments/connect-sdk-go/communicator" @@ -34,7 +35,9 @@ func paramRequestCmp(t *testing.T, a communicator.ParamRequest, b communicator.R params := a.ToRequestParameters() if requestParamsCmp(params, b) == false { - t.Fatal("paramRequestCmp failed on equality") + buf := make([]byte, 1<<16) + runtime.Stack(buf, true) + t.Fatal("paramRequestCmp failed on equality", params, b, string(buf)) } }