diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 6a56ba9..f89c242 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -160,9 +160,11 @@ docs/PaymentMethodCardResponse.md docs/PaymentMethodCash.md docs/PaymentMethodCashRequest.md docs/PaymentMethodCashResponse.md +docs/PaymentMethodGeneralRequest.md docs/PaymentMethodResponse.md docs/PaymentMethodSpeiRecurrent.md docs/PaymentMethodSpeiRequest.md +docs/PaymentMethodTokenRequest.md docs/PaymentMethodsAPI.md docs/Payout.md docs/PayoutMethod.md @@ -346,9 +348,11 @@ model_payment_method_card_response.go model_payment_method_cash.go model_payment_method_cash_request.go model_payment_method_cash_response.go +model_payment_method_general_request.go model_payment_method_response.go model_payment_method_spei_recurrent.go model_payment_method_spei_request.go +model_payment_method_token_request.go model_payout.go model_payout_method.go model_payout_order.go diff --git a/README.md b/README.md index 04e7e49..9e666ba 100644 --- a/README.md +++ b/README.md @@ -331,9 +331,11 @@ Class | Method | HTTP request | Description - [PaymentMethodCash](docs/PaymentMethodCash.md) - [PaymentMethodCashRequest](docs/PaymentMethodCashRequest.md) - [PaymentMethodCashResponse](docs/PaymentMethodCashResponse.md) + - [PaymentMethodGeneralRequest](docs/PaymentMethodGeneralRequest.md) - [PaymentMethodResponse](docs/PaymentMethodResponse.md) - [PaymentMethodSpeiRecurrent](docs/PaymentMethodSpeiRecurrent.md) - [PaymentMethodSpeiRequest](docs/PaymentMethodSpeiRequest.md) + - [PaymentMethodTokenRequest](docs/PaymentMethodTokenRequest.md) - [Payout](docs/Payout.md) - [PayoutMethod](docs/PayoutMethod.md) - [PayoutOrder](docs/PayoutOrder.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 78a626b..9acc743 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12071,6 +12071,7 @@ components: expires_at: 1656634070 store_name: OXXO reference: 98000013217610 + customer_ip_address: 0.0.0.0 object: charge description: Payment from order status: paid @@ -12133,6 +12134,7 @@ components: type: card token_id: tok_2897348234 payment_source_id: src_2tLkkyfMPh6v7pFry + customer_ip_address: 0.0.0.0 reference_id: string currency: MXN customer_info: @@ -13318,17 +13320,24 @@ components: es sospechoso. type: string id: + description: Charge ID example: 63efa757cf65380001aec040 type: string livemode: + description: Whether the charge was made in live mode or not + example: false type: boolean object: + example: charge type: string order_id: + description: Order ID example: ord_2tN73UdUSNrYRPD9r type: string paid_at: + description: Payment date example: 1676390742 + format: int64 nullable: true type: integer payment_method: @@ -14245,6 +14254,11 @@ components: format: int64 nullable: true type: integer + canceled_reason: + description: Reason for cancellation. This field appears when the subscription + status is 'canceled'. + example: user_cancelation + type: string card_id: example: src_2tKcHxhTz7xU5SymL type: string @@ -14689,6 +14703,7 @@ components: description: The charges to be made properties: amount: + description: Amount to be charged in cents example: 40000 type: integer payment_method: @@ -14953,7 +14968,7 @@ components: type: string return_url: description: Indicates the redirection callback upon completion of the 3DS2 - flow. + flow. Do not use this parameter if your order has a checkout parameter example: https://my-website.com format: uri type: string @@ -15210,6 +15225,9 @@ components: format: int8 type: integer type: array + three_ds_mode: + description: "Indicates the 3DS2 mode for the order, either smart or strict." + type: string name: description: Reason for charge example: Payment Link Name 1594138857 @@ -15249,7 +15267,7 @@ components: - type title: checkout_request type: object - payment_method_card_request: + payment_method_token_request: allOf: - $ref: '#/components/schemas/customer_payment_method_request' - properties: @@ -15262,7 +15280,7 @@ components: required: - token_id type: object - title: payment_method_card_request + title: payment_method_token_request payment_method_cash_request: allOf: - $ref: '#/components/schemas/customer_payment_method_request' @@ -15652,6 +15670,9 @@ components: store_name: example: OXXO type: string + customer_ip_address: + example: 0.0.0.0 + type: string title: charge_data_payment_method_cash_response type: object payment_method_card: @@ -15660,12 +15681,14 @@ components: - description: use for card responses properties: account_type: + description: Account type of the card example: Credit type: string auth_code: example: "867372" type: string brand: + description: Brand of the card example: visa type: string contract_id: @@ -15673,26 +15696,37 @@ components: example: S781317595 type: string country: + description: Country of the card example: MX type: string exp_month: + description: Expiration month of the card example: "02" type: string exp_year: - example: "30" + description: Expiration year of the card + example: "2026" type: string fraud_indicators: items: {} type: array issuer: + description: Issuer of the card example: BANAMEX type: string last4: + description: Last 4 digits of the card example: "4242" type: string name: + description: Name of the cardholder example: Fulanito Perez type: string + customer_ip_address: + description: Optional field used to capture the customer's IP address + for fraud prevention and security monitoring purposes + example: 0.0.0.0 + type: string title: charge_data_payment_method_card_response type: object payment_method_bank_transfer: @@ -15749,6 +15783,9 @@ components: tracking_code: nullable: true type: string + customer_ip_address: + example: 0.0.0.0 + type: string title: charge_data_payment_method_bank_transfer_response type: object company_payout_destination_response: @@ -15940,6 +15977,49 @@ components: - object - type type: object + payment_method_card_request: + allOf: + - $ref: '#/components/schemas/customer_payment_method_request' + - properties: + cvc: + description: Card security code + example: "198" + maxLength: 4 + minLength: 3 + type: string + exp_month: + description: Card expiration month + example: "12" + maxLength: 2 + minLength: 2 + type: string + exp_year: + description: Card expiration year + example: "2025" + maxLength: 4 + minLength: 4 + type: string + name: + description: Cardholder name + example: John Doe + type: string + number: + description: Card number + example: "4242424242424242" + type: string + customer_ip_address: + description: Optional field used to capture the customer's IP address + for fraud prevention and security monitoring purposes + example: 0.0.0.0 + type: string + required: + - cvc + - exp_month + - exp_year + - name + - number + type: object + title: payment_method_card_request checkout_request: description: | [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details @@ -16344,6 +16424,7 @@ components: orderRefund_request: properties: amount: + description: Amount to be refunded in cents example: 500 type: integer expires_at: @@ -16352,6 +16433,7 @@ components: nullable: true type: integer reason: + description: Reason for the refund example: suspected_fraud type: string required: @@ -16426,7 +16508,7 @@ components: description: Contains details of the payment methods that the customer has active or has used in Conekta oneOf: - - $ref: '#/components/schemas/payment_method_card_request' + - $ref: '#/components/schemas/payment_method_token_request' - $ref: '#/components/schemas/payment_method_cash_request' - $ref: '#/components/schemas/payment_method_spei_request' create_customer_payment_methods_response: @@ -17420,7 +17502,7 @@ components: type: string title: transfer_destination_response type: object - charge_request_payment_method: + payment_method_general_request: description: | Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details properties: @@ -17435,6 +17517,7 @@ components: format: int8 type: integer type: + description: Type of payment method example: card type: string token_id: @@ -17443,14 +17526,30 @@ components: payment_source_id: example: src_2tLkkyfMPh6v7pFry type: string + cvc: + description: "Optional, It is a value that allows identifying the security\ + \ code of the card. Only for PCI merchants" + example: "123" + type: string contract_id: description: Optional id sent to indicate the bank contract for recurrent card charges. example: S781317595 type: string + customer_ip_address: + description: Optional field used to capture the customer's IP address for + fraud prevention and security monitoring purposes + example: 0.0.0.0 + type: string required: - type + title: payment_method_general_request type: object + charge_request_payment_method: + oneOf: + - $ref: '#/components/schemas/payment_method_card_request' + - $ref: '#/components/schemas/payment_method_general_request' + title: charge_request_payment_method customer_antifraud_info: nullable: true properties: @@ -17465,7 +17564,7 @@ components: type: object customer_payment_methods_request: oneOf: - - $ref: '#/components/schemas/payment_method_card_request' + - $ref: '#/components/schemas/payment_method_token_request' - $ref: '#/components/schemas/payment_method_cash_request' - $ref: '#/components/schemas/payment_method_spei_request' title: customer_payment_methods_request diff --git a/docs/ChargeOrderResponsePaymentMethod.md b/docs/ChargeOrderResponsePaymentMethod.md index 5e5f006..6787956 100644 --- a/docs/ChargeOrderResponsePaymentMethod.md +++ b/docs/ChargeOrderResponsePaymentMethod.md @@ -14,16 +14,17 @@ Name | Type | Description | Notes **ServiceName** | Pointer to **string** | | [optional] **Store** | Pointer to **NullableString** | | [optional] **StoreName** | Pointer to **string** | | [optional] -**AccountType** | Pointer to **string** | | [optional] -**Brand** | Pointer to **string** | | [optional] +**CustomerIpAddress** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | Account type of the card | [optional] +**Brand** | Pointer to **string** | Brand of the card | [optional] **ContractId** | Pointer to **string** | Id sent for recurrent charges. | [optional] -**Country** | Pointer to **string** | | [optional] -**ExpMonth** | Pointer to **string** | | [optional] -**ExpYear** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | Country of the card | [optional] +**ExpMonth** | Pointer to **string** | Expiration month of the card | [optional] +**ExpYear** | Pointer to **string** | Expiration year of the card | [optional] **FraudIndicators** | Pointer to **[]map[string]interface{}** | | [optional] -**Issuer** | Pointer to **string** | | [optional] -**Last4** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | | [optional] +**Issuer** | Pointer to **string** | Issuer of the card | [optional] +**Last4** | Pointer to **string** | Last 4 digits of the card | [optional] +**Name** | Pointer to **string** | Name of the cardholder | [optional] **Bank** | Pointer to **string** | | [optional] **Clabe** | Pointer to **string** | | [optional] **Description** | Pointer to **NullableString** | | [optional] @@ -324,6 +325,31 @@ SetStoreName sets StoreName field to given value. HasStoreName returns a boolean if a field has been set. +### GetCustomerIpAddress + +`func (o *ChargeOrderResponsePaymentMethod) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *ChargeOrderResponsePaymentMethod) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *ChargeOrderResponsePaymentMethod) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *ChargeOrderResponsePaymentMethod) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + ### GetAccountType `func (o *ChargeOrderResponsePaymentMethod) GetAccountType() string` diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md index 39a1e0a..50de250 100644 --- a/docs/ChargeRequest.md +++ b/docs/ChargeRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Amount** | Pointer to **int32** | | [optional] +**Amount** | Pointer to **int32** | Amount to be charged in cents | [optional] **PaymentMethod** | [**ChargeRequestPaymentMethod**](ChargeRequestPaymentMethod.md) | | **ReferenceId** | Pointer to **string** | Custom reference to add to the charge | [optional] diff --git a/docs/ChargeRequestPaymentMethod.md b/docs/ChargeRequestPaymentMethod.md index 6b9bfea..520e113 100644 --- a/docs/ChargeRequestPaymentMethod.md +++ b/docs/ChargeRequestPaymentMethod.md @@ -4,9 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type of payment method | +**Cvc** | **string** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants | +**ExpMonth** | **string** | Card expiration month | +**ExpYear** | **string** | Card expiration year | +**Name** | **string** | Cardholder name | +**Number** | **string** | Card number | +**CustomerIpAddress** | Pointer to **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] **ExpiresAt** | Pointer to **int64** | Method expiration date as unix timestamp | [optional] **MonthlyInstallments** | Pointer to **int32** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] -**Type** | **string** | | **TokenId** | Pointer to **string** | | [optional] **PaymentSourceId** | Pointer to **string** | | [optional] **ContractId** | Pointer to **string** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] @@ -15,7 +21,7 @@ Name | Type | Description | Notes ### NewChargeRequestPaymentMethod -`func NewChargeRequestPaymentMethod(type_ string, ) *ChargeRequestPaymentMethod` +`func NewChargeRequestPaymentMethod(type_ string, cvc string, expMonth string, expYear string, name string, number string, ) *ChargeRequestPaymentMethod` NewChargeRequestPaymentMethod instantiates a new ChargeRequestPaymentMethod object This constructor will assign default values to properties that have it defined, @@ -30,6 +36,151 @@ NewChargeRequestPaymentMethodWithDefaults instantiates a new ChargeRequestPaymen This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetType + +`func (o *ChargeRequestPaymentMethod) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ChargeRequestPaymentMethod) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ChargeRequestPaymentMethod) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCvc + +`func (o *ChargeRequestPaymentMethod) GetCvc() string` + +GetCvc returns the Cvc field if non-nil, zero value otherwise. + +### GetCvcOk + +`func (o *ChargeRequestPaymentMethod) GetCvcOk() (*string, bool)` + +GetCvcOk returns a tuple with the Cvc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCvc + +`func (o *ChargeRequestPaymentMethod) SetCvc(v string)` + +SetCvc sets Cvc field to given value. + + +### GetExpMonth + +`func (o *ChargeRequestPaymentMethod) GetExpMonth() string` + +GetExpMonth returns the ExpMonth field if non-nil, zero value otherwise. + +### GetExpMonthOk + +`func (o *ChargeRequestPaymentMethod) GetExpMonthOk() (*string, bool)` + +GetExpMonthOk returns a tuple with the ExpMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpMonth + +`func (o *ChargeRequestPaymentMethod) SetExpMonth(v string)` + +SetExpMonth sets ExpMonth field to given value. + + +### GetExpYear + +`func (o *ChargeRequestPaymentMethod) GetExpYear() string` + +GetExpYear returns the ExpYear field if non-nil, zero value otherwise. + +### GetExpYearOk + +`func (o *ChargeRequestPaymentMethod) GetExpYearOk() (*string, bool)` + +GetExpYearOk returns a tuple with the ExpYear field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpYear + +`func (o *ChargeRequestPaymentMethod) SetExpYear(v string)` + +SetExpYear sets ExpYear field to given value. + + +### GetName + +`func (o *ChargeRequestPaymentMethod) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ChargeRequestPaymentMethod) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ChargeRequestPaymentMethod) SetName(v string)` + +SetName sets Name field to given value. + + +### GetNumber + +`func (o *ChargeRequestPaymentMethod) GetNumber() string` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *ChargeRequestPaymentMethod) GetNumberOk() (*string, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNumber + +`func (o *ChargeRequestPaymentMethod) SetNumber(v string)` + +SetNumber sets Number field to given value. + + +### GetCustomerIpAddress + +`func (o *ChargeRequestPaymentMethod) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *ChargeRequestPaymentMethod) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *ChargeRequestPaymentMethod) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *ChargeRequestPaymentMethod) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + ### GetExpiresAt `func (o *ChargeRequestPaymentMethod) GetExpiresAt() int64` @@ -80,26 +231,6 @@ SetMonthlyInstallments sets MonthlyInstallments field to given value. HasMonthlyInstallments returns a boolean if a field has been set. -### GetType - -`func (o *ChargeRequestPaymentMethod) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *ChargeRequestPaymentMethod) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *ChargeRequestPaymentMethod) SetType(v string)` - -SetType sets Type field to given value. - - ### GetTokenId `func (o *ChargeRequestPaymentMethod) GetTokenId() string` diff --git a/docs/ChargeResponse.md b/docs/ChargeResponse.md index ff6ac7d..bae1cdc 100644 --- a/docs/ChargeResponse.md +++ b/docs/ChargeResponse.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **DeviceFingerprint** | Pointer to **string** | | [optional] **FailureCode** | Pointer to **string** | | [optional] **FailureMessage** | Pointer to **string** | | [optional] -**Id** | Pointer to **string** | | [optional] -**Livemode** | Pointer to **bool** | | [optional] +**Id** | Pointer to **string** | Charge ID | [optional] +**Livemode** | Pointer to **bool** | Whether the charge was made in live mode or not | [optional] **Object** | Pointer to **string** | | [optional] -**OrderId** | Pointer to **string** | | [optional] -**PaidAt** | Pointer to **NullableInt32** | | [optional] +**OrderId** | Pointer to **string** | Order ID | [optional] +**PaidAt** | Pointer to **NullableInt64** | Payment date | [optional] **PaymentMethod** | Pointer to [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional] **ReferenceId** | Pointer to **NullableString** | Reference ID of the charge | [optional] **Refunds** | Pointer to [**NullableChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional] @@ -369,20 +369,20 @@ HasOrderId returns a boolean if a field has been set. ### GetPaidAt -`func (o *ChargeResponse) GetPaidAt() int32` +`func (o *ChargeResponse) GetPaidAt() int64` GetPaidAt returns the PaidAt field if non-nil, zero value otherwise. ### GetPaidAtOk -`func (o *ChargeResponse) GetPaidAtOk() (*int32, bool)` +`func (o *ChargeResponse) GetPaidAtOk() (*int64, bool)` GetPaidAtOk returns a tuple with the PaidAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPaidAt -`func (o *ChargeResponse) SetPaidAt(v int32)` +`func (o *ChargeResponse) SetPaidAt(v int64)` SetPaidAt sets PaidAt field to given value. diff --git a/docs/ChargeResponsePaymentMethod.md b/docs/ChargeResponsePaymentMethod.md index b12f73a..35c32fd 100644 --- a/docs/ChargeResponsePaymentMethod.md +++ b/docs/ChargeResponsePaymentMethod.md @@ -14,16 +14,17 @@ Name | Type | Description | Notes **ServiceName** | Pointer to **string** | | [optional] **Store** | Pointer to **NullableString** | | [optional] **StoreName** | Pointer to **string** | | [optional] -**AccountType** | Pointer to **string** | | [optional] -**Brand** | Pointer to **string** | | [optional] +**CustomerIpAddress** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | Account type of the card | [optional] +**Brand** | Pointer to **string** | Brand of the card | [optional] **ContractId** | Pointer to **string** | Id sent for recurrent charges. | [optional] -**Country** | Pointer to **string** | | [optional] -**ExpMonth** | Pointer to **string** | | [optional] -**ExpYear** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | Country of the card | [optional] +**ExpMonth** | Pointer to **string** | Expiration month of the card | [optional] +**ExpYear** | Pointer to **string** | Expiration year of the card | [optional] **FraudIndicators** | Pointer to **[]map[string]interface{}** | | [optional] -**Issuer** | Pointer to **string** | | [optional] -**Last4** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | | [optional] +**Issuer** | Pointer to **string** | Issuer of the card | [optional] +**Last4** | Pointer to **string** | Last 4 digits of the card | [optional] +**Name** | Pointer to **string** | Name of the cardholder | [optional] **Bank** | Pointer to **string** | | [optional] **Clabe** | Pointer to **string** | | [optional] **Description** | Pointer to **NullableString** | | [optional] @@ -324,6 +325,31 @@ SetStoreName sets StoreName field to given value. HasStoreName returns a boolean if a field has been set. +### GetCustomerIpAddress + +`func (o *ChargeResponsePaymentMethod) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *ChargeResponsePaymentMethod) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *ChargeResponsePaymentMethod) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *ChargeResponsePaymentMethod) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + ### GetAccountType `func (o *ChargeResponsePaymentMethod) GetAccountType() string` diff --git a/docs/ChargesApi.md b/docs/ChargesApi.md index 6f40a50..a817b28 100644 --- a/docs/ChargesApi.md +++ b/docs/ChargesApi.md @@ -106,7 +106,7 @@ import ( func main() { id := "6307a60c41de27127515a575" // string | Identifier of the resource - chargeRequest := *openapiclient.NewChargeRequest(*openapiclient.NewChargeRequestPaymentMethod("card")) // ChargeRequest | requested field for a charge + chargeRequest := *openapiclient.NewChargeRequest(openapiclient.charge_request_payment_method{PaymentMethodCardRequest: openapiclient.NewPaymentMethodCardRequest("card | cash | spei", "198", "12", "2025", "John Doe", "4242424242424242")}) // ChargeRequest | requested field for a charge acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") xChildCompanyId := "6441b6376b60c3a638da80af" // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) diff --git a/docs/ChargesDataResponse.md b/docs/ChargesDataResponse.md index fd4e200..47e30b2 100644 --- a/docs/ChargesDataResponse.md +++ b/docs/ChargesDataResponse.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **DeviceFingerprint** | Pointer to **string** | | [optional] **FailureCode** | Pointer to **string** | | [optional] **FailureMessage** | Pointer to **string** | | [optional] -**Id** | Pointer to **string** | | [optional] -**Livemode** | Pointer to **bool** | | [optional] +**Id** | Pointer to **string** | Charge ID | [optional] +**Livemode** | Pointer to **bool** | Whether the charge was made in live mode or not | [optional] **Object** | Pointer to **string** | | [optional] -**OrderId** | Pointer to **string** | | [optional] -**PaidAt** | Pointer to **NullableInt32** | | [optional] +**OrderId** | Pointer to **string** | Order ID | [optional] +**PaidAt** | Pointer to **NullableInt64** | Payment date | [optional] **PaymentMethod** | Pointer to [**ChargeResponsePaymentMethod**](ChargeResponsePaymentMethod.md) | | [optional] **ReferenceId** | Pointer to **NullableString** | Reference ID of the charge | [optional] **Refunds** | Pointer to [**NullableChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional] @@ -369,20 +369,20 @@ HasOrderId returns a boolean if a field has been set. ### GetPaidAt -`func (o *ChargesDataResponse) GetPaidAt() int32` +`func (o *ChargesDataResponse) GetPaidAt() int64` GetPaidAt returns the PaidAt field if non-nil, zero value otherwise. ### GetPaidAtOk -`func (o *ChargesDataResponse) GetPaidAtOk() (*int32, bool)` +`func (o *ChargesDataResponse) GetPaidAtOk() (*int64, bool)` GetPaidAtOk returns a tuple with the PaidAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPaidAt -`func (o *ChargesDataResponse) SetPaidAt(v int32)` +`func (o *ChargesDataResponse) SetPaidAt(v int64)` SetPaidAt sets PaidAt field to given value. diff --git a/docs/Checkout.md b/docs/Checkout.md index 0ebf09e..acd939b 100644 --- a/docs/Checkout.md +++ b/docs/Checkout.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **ExpiresAt** | **int64** | It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) | **MonthlyInstallmentsEnabled** | Pointer to **bool** | This flag allows you to specify if months without interest will be active. | [optional] **MonthlyInstallmentsOptions** | Pointer to **[]int32** | This field allows you to specify the number of months without interest. | [optional] +**ThreeDsMode** | Pointer to **string** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional] **Name** | **string** | Reason for charge | **NeedsShippingContact** | Pointer to **bool** | This flag allows you to fill in the shipping information at checkout. | [optional] **OnDemandEnabled** | Pointer to **NullableBool** | This flag allows you to specify if the link will be on demand. | [optional] @@ -125,6 +126,31 @@ SetMonthlyInstallmentsOptions sets MonthlyInstallmentsOptions field to given val HasMonthlyInstallmentsOptions returns a boolean if a field has been set. +### GetThreeDsMode + +`func (o *Checkout) GetThreeDsMode() string` + +GetThreeDsMode returns the ThreeDsMode field if non-nil, zero value otherwise. + +### GetThreeDsModeOk + +`func (o *Checkout) GetThreeDsModeOk() (*string, bool)` + +GetThreeDsModeOk returns a tuple with the ThreeDsMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreeDsMode + +`func (o *Checkout) SetThreeDsMode(v string)` + +SetThreeDsMode sets ThreeDsMode field to given value. + +### HasThreeDsMode + +`func (o *Checkout) HasThreeDsMode() bool` + +HasThreeDsMode returns a boolean if a field has been set. + ### GetName `func (o *Checkout) GetName() string` diff --git a/docs/OrderRefundRequest.md b/docs/OrderRefundRequest.md index 5f32596..168d610 100644 --- a/docs/OrderRefundRequest.md +++ b/docs/OrderRefundRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Amount** | **int32** | | +**Amount** | **int32** | Amount to be refunded in cents | **ExpiresAt** | Pointer to **NullableInt64** | | [optional] -**Reason** | **string** | | +**Reason** | **string** | Reason for the refund | ## Methods diff --git a/docs/OrderRequest.md b/docs/OrderRequest.md index 3f69613..cfea955 100644 --- a/docs/OrderRequest.md +++ b/docs/OrderRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **NeedsShippingContact** | Pointer to **bool** | Allows you to fill out the shipping information at checkout | [optional] **PreAuthorize** | Pointer to **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to false] **ProcessingMode** | Pointer to **string** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] -**ReturnUrl** | Pointer to **string** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] +**ReturnUrl** | Pointer to **string** | Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter | [optional] **ShippingContact** | Pointer to [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] **ShippingLines** | Pointer to [**[]ShippingRequest**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] **TaxLines** | Pointer to [**[]OrderTaxRequest**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] diff --git a/docs/PaymentMethodBankTransfer.md b/docs/PaymentMethodBankTransfer.md index 6dcad66..cc623f7 100644 --- a/docs/PaymentMethodBankTransfer.md +++ b/docs/PaymentMethodBankTransfer.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **ReceivingAccountTaxId** | Pointer to **NullableString** | | [optional] **ReferenceNumber** | Pointer to **NullableString** | | [optional] **TrackingCode** | Pointer to **NullableString** | | [optional] +**CustomerIpAddress** | Pointer to **string** | | [optional] ## Methods @@ -587,6 +588,31 @@ HasTrackingCode returns a boolean if a field has been set. `func (o *PaymentMethodBankTransfer) UnsetTrackingCode()` UnsetTrackingCode ensures that no value is present for TrackingCode, not even an explicit nil +### GetCustomerIpAddress + +`func (o *PaymentMethodBankTransfer) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *PaymentMethodBankTransfer) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *PaymentMethodBankTransfer) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *PaymentMethodBankTransfer) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCard.md b/docs/PaymentMethodCard.md index 3109451..5ab8520 100644 --- a/docs/PaymentMethodCard.md +++ b/docs/PaymentMethodCard.md @@ -6,17 +6,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | Pointer to **string** | | [optional] **Object** | **string** | | -**AccountType** | Pointer to **string** | | [optional] +**AccountType** | Pointer to **string** | Account type of the card | [optional] **AuthCode** | Pointer to **string** | | [optional] -**Brand** | Pointer to **string** | | [optional] +**Brand** | Pointer to **string** | Brand of the card | [optional] **ContractId** | Pointer to **string** | Id sent for recurrent charges. | [optional] -**Country** | Pointer to **string** | | [optional] -**ExpMonth** | Pointer to **string** | | [optional] -**ExpYear** | Pointer to **string** | | [optional] +**Country** | Pointer to **string** | Country of the card | [optional] +**ExpMonth** | Pointer to **string** | Expiration month of the card | [optional] +**ExpYear** | Pointer to **string** | Expiration year of the card | [optional] **FraudIndicators** | Pointer to **[]interface{}** | | [optional] -**Issuer** | Pointer to **string** | | [optional] -**Last4** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | | [optional] +**Issuer** | Pointer to **string** | Issuer of the card | [optional] +**Last4** | Pointer to **string** | Last 4 digits of the card | [optional] +**Name** | Pointer to **string** | Name of the cardholder | [optional] +**CustomerIpAddress** | Pointer to **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] ## Methods @@ -357,6 +358,31 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. +### GetCustomerIpAddress + +`func (o *PaymentMethodCard) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *PaymentMethodCard) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *PaymentMethodCard) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *PaymentMethodCard) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCardRequest.md b/docs/PaymentMethodCardRequest.md index 335e7e6..553335b 100644 --- a/docs/PaymentMethodCardRequest.md +++ b/docs/PaymentMethodCardRequest.md @@ -5,13 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | Type of payment method | -**TokenId** | **string** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. | +**Cvc** | **string** | Card security code | +**ExpMonth** | **string** | Card expiration month | +**ExpYear** | **string** | Card expiration year | +**Name** | **string** | Cardholder name | +**Number** | **string** | Card number | +**CustomerIpAddress** | Pointer to **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] ## Methods ### NewPaymentMethodCardRequest -`func NewPaymentMethodCardRequest(type_ string, tokenId string, ) *PaymentMethodCardRequest` +`func NewPaymentMethodCardRequest(type_ string, cvc string, expMonth string, expYear string, name string, number string, ) *PaymentMethodCardRequest` NewPaymentMethodCardRequest instantiates a new PaymentMethodCardRequest object This constructor will assign default values to properties that have it defined, @@ -46,26 +51,131 @@ and a boolean to check if the value has been set. SetType sets Type field to given value. -### GetTokenId +### GetCvc -`func (o *PaymentMethodCardRequest) GetTokenId() string` +`func (o *PaymentMethodCardRequest) GetCvc() string` -GetTokenId returns the TokenId field if non-nil, zero value otherwise. +GetCvc returns the Cvc field if non-nil, zero value otherwise. -### GetTokenIdOk +### GetCvcOk -`func (o *PaymentMethodCardRequest) GetTokenIdOk() (*string, bool)` +`func (o *PaymentMethodCardRequest) GetCvcOk() (*string, bool)` -GetTokenIdOk returns a tuple with the TokenId field if it's non-nil, zero value otherwise +GetCvcOk returns a tuple with the Cvc field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetTokenId +### SetCvc -`func (o *PaymentMethodCardRequest) SetTokenId(v string)` +`func (o *PaymentMethodCardRequest) SetCvc(v string)` -SetTokenId sets TokenId field to given value. +SetCvc sets Cvc field to given value. +### GetExpMonth + +`func (o *PaymentMethodCardRequest) GetExpMonth() string` + +GetExpMonth returns the ExpMonth field if non-nil, zero value otherwise. + +### GetExpMonthOk + +`func (o *PaymentMethodCardRequest) GetExpMonthOk() (*string, bool)` + +GetExpMonthOk returns a tuple with the ExpMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpMonth + +`func (o *PaymentMethodCardRequest) SetExpMonth(v string)` + +SetExpMonth sets ExpMonth field to given value. + + +### GetExpYear + +`func (o *PaymentMethodCardRequest) GetExpYear() string` + +GetExpYear returns the ExpYear field if non-nil, zero value otherwise. + +### GetExpYearOk + +`func (o *PaymentMethodCardRequest) GetExpYearOk() (*string, bool)` + +GetExpYearOk returns a tuple with the ExpYear field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpYear + +`func (o *PaymentMethodCardRequest) SetExpYear(v string)` + +SetExpYear sets ExpYear field to given value. + + +### GetName + +`func (o *PaymentMethodCardRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PaymentMethodCardRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PaymentMethodCardRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetNumber + +`func (o *PaymentMethodCardRequest) GetNumber() string` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *PaymentMethodCardRequest) GetNumberOk() (*string, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNumber + +`func (o *PaymentMethodCardRequest) SetNumber(v string)` + +SetNumber sets Number field to given value. + + +### GetCustomerIpAddress + +`func (o *PaymentMethodCardRequest) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *PaymentMethodCardRequest) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *PaymentMethodCardRequest) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *PaymentMethodCardRequest) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCash.md b/docs/PaymentMethodCash.md index 78c009d..5bc0ada 100644 --- a/docs/PaymentMethodCash.md +++ b/docs/PaymentMethodCash.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **ServiceName** | Pointer to **string** | | [optional] **Store** | Pointer to **NullableString** | | [optional] **StoreName** | Pointer to **string** | | [optional] +**CustomerIpAddress** | Pointer to **string** | | [optional] ## Methods @@ -309,6 +310,31 @@ SetStoreName sets StoreName field to given value. HasStoreName returns a boolean if a field has been set. +### GetCustomerIpAddress + +`func (o *PaymentMethodCash) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *PaymentMethodCash) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *PaymentMethodCash) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *PaymentMethodCash) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodGeneralRequest.md b/docs/PaymentMethodGeneralRequest.md new file mode 100644 index 0000000..c85dbb5 --- /dev/null +++ b/docs/PaymentMethodGeneralRequest.md @@ -0,0 +1,233 @@ +# PaymentMethodGeneralRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExpiresAt** | Pointer to **int64** | Method expiration date as unix timestamp | [optional] +**MonthlyInstallments** | Pointer to **int32** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] +**Type** | **string** | Type of payment method | +**TokenId** | Pointer to **string** | | [optional] +**PaymentSourceId** | Pointer to **string** | | [optional] +**Cvc** | Pointer to **string** | Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants | [optional] +**ContractId** | Pointer to **string** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] +**CustomerIpAddress** | Pointer to **string** | Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes | [optional] + +## Methods + +### NewPaymentMethodGeneralRequest + +`func NewPaymentMethodGeneralRequest(type_ string, ) *PaymentMethodGeneralRequest` + +NewPaymentMethodGeneralRequest instantiates a new PaymentMethodGeneralRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaymentMethodGeneralRequestWithDefaults + +`func NewPaymentMethodGeneralRequestWithDefaults() *PaymentMethodGeneralRequest` + +NewPaymentMethodGeneralRequestWithDefaults instantiates a new PaymentMethodGeneralRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExpiresAt + +`func (o *PaymentMethodGeneralRequest) GetExpiresAt() int64` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *PaymentMethodGeneralRequest) GetExpiresAtOk() (*int64, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *PaymentMethodGeneralRequest) SetExpiresAt(v int64)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *PaymentMethodGeneralRequest) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetMonthlyInstallments + +`func (o *PaymentMethodGeneralRequest) GetMonthlyInstallments() int32` + +GetMonthlyInstallments returns the MonthlyInstallments field if non-nil, zero value otherwise. + +### GetMonthlyInstallmentsOk + +`func (o *PaymentMethodGeneralRequest) GetMonthlyInstallmentsOk() (*int32, bool)` + +GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonthlyInstallments + +`func (o *PaymentMethodGeneralRequest) SetMonthlyInstallments(v int32)` + +SetMonthlyInstallments sets MonthlyInstallments field to given value. + +### HasMonthlyInstallments + +`func (o *PaymentMethodGeneralRequest) HasMonthlyInstallments() bool` + +HasMonthlyInstallments returns a boolean if a field has been set. + +### GetType + +`func (o *PaymentMethodGeneralRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PaymentMethodGeneralRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PaymentMethodGeneralRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTokenId + +`func (o *PaymentMethodGeneralRequest) GetTokenId() string` + +GetTokenId returns the TokenId field if non-nil, zero value otherwise. + +### GetTokenIdOk + +`func (o *PaymentMethodGeneralRequest) GetTokenIdOk() (*string, bool)` + +GetTokenIdOk returns a tuple with the TokenId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenId + +`func (o *PaymentMethodGeneralRequest) SetTokenId(v string)` + +SetTokenId sets TokenId field to given value. + +### HasTokenId + +`func (o *PaymentMethodGeneralRequest) HasTokenId() bool` + +HasTokenId returns a boolean if a field has been set. + +### GetPaymentSourceId + +`func (o *PaymentMethodGeneralRequest) GetPaymentSourceId() string` + +GetPaymentSourceId returns the PaymentSourceId field if non-nil, zero value otherwise. + +### GetPaymentSourceIdOk + +`func (o *PaymentMethodGeneralRequest) GetPaymentSourceIdOk() (*string, bool)` + +GetPaymentSourceIdOk returns a tuple with the PaymentSourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentSourceId + +`func (o *PaymentMethodGeneralRequest) SetPaymentSourceId(v string)` + +SetPaymentSourceId sets PaymentSourceId field to given value. + +### HasPaymentSourceId + +`func (o *PaymentMethodGeneralRequest) HasPaymentSourceId() bool` + +HasPaymentSourceId returns a boolean if a field has been set. + +### GetCvc + +`func (o *PaymentMethodGeneralRequest) GetCvc() string` + +GetCvc returns the Cvc field if non-nil, zero value otherwise. + +### GetCvcOk + +`func (o *PaymentMethodGeneralRequest) GetCvcOk() (*string, bool)` + +GetCvcOk returns a tuple with the Cvc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCvc + +`func (o *PaymentMethodGeneralRequest) SetCvc(v string)` + +SetCvc sets Cvc field to given value. + +### HasCvc + +`func (o *PaymentMethodGeneralRequest) HasCvc() bool` + +HasCvc returns a boolean if a field has been set. + +### GetContractId + +`func (o *PaymentMethodGeneralRequest) GetContractId() string` + +GetContractId returns the ContractId field if non-nil, zero value otherwise. + +### GetContractIdOk + +`func (o *PaymentMethodGeneralRequest) GetContractIdOk() (*string, bool)` + +GetContractIdOk returns a tuple with the ContractId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContractId + +`func (o *PaymentMethodGeneralRequest) SetContractId(v string)` + +SetContractId sets ContractId field to given value. + +### HasContractId + +`func (o *PaymentMethodGeneralRequest) HasContractId() bool` + +HasContractId returns a boolean if a field has been set. + +### GetCustomerIpAddress + +`func (o *PaymentMethodGeneralRequest) GetCustomerIpAddress() string` + +GetCustomerIpAddress returns the CustomerIpAddress field if non-nil, zero value otherwise. + +### GetCustomerIpAddressOk + +`func (o *PaymentMethodGeneralRequest) GetCustomerIpAddressOk() (*string, bool)` + +GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerIpAddress + +`func (o *PaymentMethodGeneralRequest) SetCustomerIpAddress(v string)` + +SetCustomerIpAddress sets CustomerIpAddress field to given value. + +### HasCustomerIpAddress + +`func (o *PaymentMethodGeneralRequest) HasCustomerIpAddress() bool` + +HasCustomerIpAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaymentMethodTokenRequest.md b/docs/PaymentMethodTokenRequest.md new file mode 100644 index 0000000..3f232dd --- /dev/null +++ b/docs/PaymentMethodTokenRequest.md @@ -0,0 +1,72 @@ +# PaymentMethodTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type of payment method | +**TokenId** | **string** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. | + +## Methods + +### NewPaymentMethodTokenRequest + +`func NewPaymentMethodTokenRequest(type_ string, tokenId string, ) *PaymentMethodTokenRequest` + +NewPaymentMethodTokenRequest instantiates a new PaymentMethodTokenRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaymentMethodTokenRequestWithDefaults + +`func NewPaymentMethodTokenRequestWithDefaults() *PaymentMethodTokenRequest` + +NewPaymentMethodTokenRequestWithDefaults instantiates a new PaymentMethodTokenRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *PaymentMethodTokenRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PaymentMethodTokenRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PaymentMethodTokenRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTokenId + +`func (o *PaymentMethodTokenRequest) GetTokenId() string` + +GetTokenId returns the TokenId field if non-nil, zero value otherwise. + +### GetTokenIdOk + +`func (o *PaymentMethodTokenRequest) GetTokenIdOk() (*string, bool)` + +GetTokenIdOk returns a tuple with the TokenId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenId + +`func (o *PaymentMethodTokenRequest) SetTokenId(v string)` + +SetTokenId sets TokenId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaymentMethodsApi.md b/docs/PaymentMethodsApi.md index 55a0c50..4118c11 100644 --- a/docs/PaymentMethodsApi.md +++ b/docs/PaymentMethodsApi.md @@ -33,7 +33,7 @@ import ( func main() { id := "6307a60c41de27127515a575" // string | Identifier of the resource - createCustomerPaymentMethodsRequest := openapiclient.CreateCustomerPaymentMethods_request{PaymentMethodCardRequest: openapiclient.NewPaymentMethodCardRequest("card | cash | spei", "tok_32hj4g234as")} // CreateCustomerPaymentMethodsRequest | requested field for customer payment methods + createCustomerPaymentMethodsRequest := openapiclient.CreateCustomerPaymentMethods_request{PaymentMethodCashRequest: openapiclient.NewPaymentMethodCashRequest("card | cash | spei")} // CreateCustomerPaymentMethodsRequest | requested field for customer payment methods acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") xChildCompanyId := "6441b6376b60c3a638da80af" // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) diff --git a/docs/SubscriptionResponse.md b/docs/SubscriptionResponse.md index 22c31c9..239f640 100644 --- a/docs/SubscriptionResponse.md +++ b/docs/SubscriptionResponse.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **BillingCycleStart** | Pointer to **NullableInt64** | | [optional] **BillingCycleEnd** | Pointer to **NullableInt64** | | [optional] **CanceledAt** | Pointer to **NullableInt64** | | [optional] +**CanceledReason** | Pointer to **string** | Reason for cancellation. This field appears when the subscription status is 'canceled'. | [optional] **CardId** | Pointer to **string** | | [optional] **ChargeId** | Pointer to **NullableString** | | [optional] **CreatedAt** | Pointer to **int64** | | [optional] @@ -146,6 +147,31 @@ HasCanceledAt returns a boolean if a field has been set. `func (o *SubscriptionResponse) UnsetCanceledAt()` UnsetCanceledAt ensures that no value is present for CanceledAt, not even an explicit nil +### GetCanceledReason + +`func (o *SubscriptionResponse) GetCanceledReason() string` + +GetCanceledReason returns the CanceledReason field if non-nil, zero value otherwise. + +### GetCanceledReasonOk + +`func (o *SubscriptionResponse) GetCanceledReasonOk() (*string, bool)` + +GetCanceledReasonOk returns a tuple with the CanceledReason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanceledReason + +`func (o *SubscriptionResponse) SetCanceledReason(v string)` + +SetCanceledReason sets CanceledReason field to given value. + +### HasCanceledReason + +`func (o *SubscriptionResponse) HasCanceledReason() bool` + +HasCanceledReason returns a boolean if a field has been set. + ### GetCardId `func (o *SubscriptionResponse) GetCardId() string` diff --git a/model_api_key_create_response.go b/model_api_key_create_response.go index 17183cb..f03058f 100644 --- a/model_api_key_create_response.go +++ b/model_api_key_create_response.go @@ -43,7 +43,7 @@ type ApiKeyCreateResponse struct { // Indicates if the api key is private or public Role *string `json:"role,omitempty"` // It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. - AuthenticationToken *string `json:"authentication_token,omitempty"` + AuthenticationToken *string `json:"authentication_token,omitempty"` AdditionalProperties map[string]interface{} } @@ -194,7 +194,6 @@ func (o *ApiKeyCreateResponse) HasDeactivatedAt() bool { func (o *ApiKeyCreateResponse) SetDeactivatedAt(v int64) { o.DeactivatedAt.Set(&v) } - // SetDeactivatedAtNil sets the value for DeactivatedAt to be an explicit nil func (o *ApiKeyCreateResponse) SetDeactivatedAtNil() { o.DeactivatedAt.Set(nil) @@ -462,7 +461,7 @@ func (o *ApiKeyCreateResponse) SetAuthenticationToken(v string) { } func (o ApiKeyCreateResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -582,3 +581,5 @@ func (v *NullableApiKeyCreateResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_api_key_request.go b/model_api_key_request.go index 4ebff51..2ce4862 100644 --- a/model_api_key_request.go +++ b/model_api_key_request.go @@ -22,8 +22,8 @@ var _ MappedNullable = &ApiKeyRequest{} // ApiKeyRequest struct for ApiKeyRequest type ApiKeyRequest struct { // A name or brief explanation of what this api key is used for - Description *string `json:"description,omitempty"` - Role string `json:"role"` + Description *string `json:"description,omitempty"` + Role string `json:"role"` AdditionalProperties map[string]interface{} } @@ -104,7 +104,7 @@ func (o *ApiKeyRequest) SetRole(v string) { } func (o ApiKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -138,10 +138,10 @@ func (o *ApiKeyRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -203,3 +203,5 @@ func (v *NullableApiKeyRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_api_key_response.go b/model_api_key_response.go index 4f28345..207b22e 100644 --- a/model_api_key_response.go +++ b/model_api_key_response.go @@ -41,7 +41,7 @@ type ApiKeyResponse struct { // The first few characters of the authentication_token Prefix *string `json:"prefix,omitempty"` // Indicates if the api key is private or public - Role *string `json:"role,omitempty"` + Role *string `json:"role,omitempty"` AdditionalProperties map[string]interface{} } @@ -192,7 +192,6 @@ func (o *ApiKeyResponse) HasDeactivatedAt() bool { func (o *ApiKeyResponse) SetDeactivatedAt(v int64) { o.DeactivatedAt.Set(&v) } - // SetDeactivatedAtNil sets the value for DeactivatedAt to be an explicit nil func (o *ApiKeyResponse) SetDeactivatedAtNil() { o.DeactivatedAt.Set(nil) @@ -428,7 +427,7 @@ func (o *ApiKeyResponse) SetRole(v string) { } func (o ApiKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -544,3 +543,5 @@ func (v *NullableApiKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_api_key_response_on_delete.go b/model_api_key_response_on_delete.go index 64fa14c..9eb8076 100644 --- a/model_api_key_response_on_delete.go +++ b/model_api_key_response_on_delete.go @@ -37,7 +37,7 @@ type ApiKeyResponseOnDelete struct { // Indicates if the api key was deleted Deleted *bool `json:"deleted,omitempty"` // Indicates if the api key is private or public - Role *string `json:"role,omitempty"` + Role *string `json:"role,omitempty"` AdditionalProperties map[string]interface{} } @@ -349,7 +349,7 @@ func (o *ApiKeyResponseOnDelete) SetRole(v string) { } func (o ApiKeyResponseOnDelete) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -457,3 +457,5 @@ func (v *NullableApiKeyResponseOnDelete) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_api_key_update_request.go b/model_api_key_update_request.go index 929b7a3..08da41d 100644 --- a/model_api_key_update_request.go +++ b/model_api_key_update_request.go @@ -23,7 +23,7 @@ type ApiKeyUpdateRequest struct { // Indicates if the webhook key is active Active *bool `json:"active,omitempty"` // A name or brief explanation of what this api key is used for - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` AdditionalProperties map[string]interface{} } @@ -111,7 +111,7 @@ func (o *ApiKeyUpdateRequest) SetDescription(v string) { } func (o ApiKeyUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -191,3 +191,5 @@ func (v *NullableApiKeyUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_balance_common_field.go b/model_balance_common_field.go index 82dfd35..0c1bf64 100644 --- a/model_balance_common_field.go +++ b/model_balance_common_field.go @@ -23,7 +23,7 @@ type BalanceCommonField struct { // The balance's amount Amount *int64 `json:"amount,omitempty"` // The balance's currency - Currency *string `json:"currency,omitempty"` + Currency *string `json:"currency,omitempty"` AdditionalProperties map[string]interface{} } @@ -111,7 +111,7 @@ func (o *BalanceCommonField) SetCurrency(v string) { } func (o BalanceCommonField) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -191,3 +191,5 @@ func (v *NullableBalanceCommonField) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_balance_response.go b/model_balance_response.go index 61d5035..ad65b9c 100644 --- a/model_balance_response.go +++ b/model_balance_response.go @@ -39,7 +39,7 @@ type BalanceResponse struct { // The balance's target retention amount TargetRetentionAmount []BalanceCommonField `json:"target_retention_amount,omitempty"` // The balance's temporarily retained - TemporarilyRetained []BalanceCommonField `json:"temporarily_retained,omitempty"` + TemporarilyRetained []BalanceCommonField `json:"temporarily_retained,omitempty"` AdditionalProperties map[string]interface{} } @@ -383,7 +383,7 @@ func (o *BalanceResponse) SetTemporarilyRetained(v []BalanceCommonField) { } func (o BalanceResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -495,3 +495,5 @@ func (v *NullableBalanceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_blacklist_rule_response.go b/model_blacklist_rule_response.go index 675f3d9..60d5599 100644 --- a/model_blacklist_rule_response.go +++ b/model_blacklist_rule_response.go @@ -27,7 +27,7 @@ type BlacklistRuleResponse struct { // value used for blacklists rule Value *string `json:"value,omitempty"` // use an description for blacklisted rule - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` AdditionalProperties map[string]interface{} } @@ -179,7 +179,7 @@ func (o *BlacklistRuleResponse) SetDescription(v string) { } func (o BlacklistRuleResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -267,3 +267,5 @@ func (v *NullableBlacklistRuleResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_order_response.go b/model_charge_order_response.go index f41f73d..8fec0d7 100644 --- a/model_charge_order_response.go +++ b/model_charge_order_response.go @@ -20,26 +20,26 @@ var _ MappedNullable = &ChargeOrderResponse{} // ChargeOrderResponse struct for ChargeOrderResponse type ChargeOrderResponse struct { - Amount *int32 `json:"amount,omitempty"` - Channel *ChargeResponseChannel `json:"channel,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - Currency *string `json:"currency,omitempty"` - CustomerId *string `json:"customer_id,omitempty"` - Description *string `json:"description,omitempty"` - DeviceFingerprint NullableString `json:"device_fingerprint,omitempty"` - FailureCode *string `json:"failure_code,omitempty"` - FailureMessage *string `json:"failure_message,omitempty"` - Id *string `json:"id,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - MonthlyInstallments NullableInt32 `json:"monthly_installments,omitempty"` - Object *string `json:"object,omitempty"` - OrderId *string `json:"order_id,omitempty"` - PaidAt NullableInt32 `json:"paid_at,omitempty"` - PaymentMethod *ChargeOrderResponsePaymentMethod `json:"payment_method,omitempty"` + Amount *int32 `json:"amount,omitempty"` + Channel *ChargeResponseChannel `json:"channel,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + Currency *string `json:"currency,omitempty"` + CustomerId *string `json:"customer_id,omitempty"` + Description *string `json:"description,omitempty"` + DeviceFingerprint NullableString `json:"device_fingerprint,omitempty"` + FailureCode *string `json:"failure_code,omitempty"` + FailureMessage *string `json:"failure_message,omitempty"` + Id *string `json:"id,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + MonthlyInstallments NullableInt32 `json:"monthly_installments,omitempty"` + Object *string `json:"object,omitempty"` + OrderId *string `json:"order_id,omitempty"` + PaidAt NullableInt32 `json:"paid_at,omitempty"` + PaymentMethod *ChargeOrderResponsePaymentMethod `json:"payment_method,omitempty"` // Reference ID of the charge - ReferenceId NullableString `json:"reference_id,omitempty"` - Refunds []map[string]interface{} `json:"refunds,omitempty"` - Status *string `json:"status,omitempty"` + ReferenceId NullableString `json:"reference_id,omitempty"` + Refunds []map[string]interface{} `json:"refunds,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -286,7 +286,6 @@ func (o *ChargeOrderResponse) HasDeviceFingerprint() bool { func (o *ChargeOrderResponse) SetDeviceFingerprint(v string) { o.DeviceFingerprint.Set(&v) } - // SetDeviceFingerprintNil sets the value for DeviceFingerprint to be an explicit nil func (o *ChargeOrderResponse) SetDeviceFingerprintNil() { o.DeviceFingerprint.Set(nil) @@ -457,7 +456,6 @@ func (o *ChargeOrderResponse) HasMonthlyInstallments() bool { func (o *ChargeOrderResponse) SetMonthlyInstallments(v int32) { o.MonthlyInstallments.Set(&v) } - // SetMonthlyInstallmentsNil sets the value for MonthlyInstallments to be an explicit nil func (o *ChargeOrderResponse) SetMonthlyInstallmentsNil() { o.MonthlyInstallments.Set(nil) @@ -564,7 +562,6 @@ func (o *ChargeOrderResponse) HasPaidAt() bool { func (o *ChargeOrderResponse) SetPaidAt(v int32) { o.PaidAt.Set(&v) } - // SetPaidAtNil sets the value for PaidAt to be an explicit nil func (o *ChargeOrderResponse) SetPaidAtNil() { o.PaidAt.Set(nil) @@ -639,7 +636,6 @@ func (o *ChargeOrderResponse) HasReferenceId() bool { func (o *ChargeOrderResponse) SetReferenceId(v string) { o.ReferenceId.Set(&v) } - // SetReferenceIdNil sets the value for ReferenceId to be an explicit nil func (o *ChargeOrderResponse) SetReferenceIdNil() { o.ReferenceId.Set(nil) @@ -715,7 +711,7 @@ func (o *ChargeOrderResponse) SetStatus(v string) { } func (o ChargeOrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -863,3 +859,5 @@ func (v *NullableChargeOrderResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_request.go b/model_charge_request.go index 80238c3..a9e79ff 100644 --- a/model_charge_request.go +++ b/model_charge_request.go @@ -21,10 +21,11 @@ var _ MappedNullable = &ChargeRequest{} // ChargeRequest The charges to be made type ChargeRequest struct { - Amount *int32 `json:"amount,omitempty"` + // Amount to be charged in cents + Amount *int32 `json:"amount,omitempty"` PaymentMethod ChargeRequestPaymentMethod `json:"payment_method"` // Custom reference to add to the charge - ReferenceId *string `json:"reference_id,omitempty"` + ReferenceId *string `json:"reference_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -137,7 +138,7 @@ func (o *ChargeRequest) SetReferenceId(v string) { } func (o ChargeRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -174,10 +175,10 @@ func (o *ChargeRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -240,3 +241,5 @@ func (v *NullableChargeRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_request_payment_method.go b/model_charge_request_payment_method.go index 5702476..4d61d0b 100644 --- a/model_charge_request_payment_method.go +++ b/model_charge_request_payment_method.go @@ -16,306 +16,98 @@ import ( "fmt" ) -// checks if the ChargeRequestPaymentMethod type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ChargeRequestPaymentMethod{} - -// ChargeRequestPaymentMethod Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details +// ChargeRequestPaymentMethod - struct for ChargeRequestPaymentMethod type ChargeRequestPaymentMethod struct { - // Method expiration date as unix timestamp - ExpiresAt *int64 `json:"expires_at,omitempty"` - // How many months without interest to apply, it can be 3, 6, 9, 12 or 18 - MonthlyInstallments *int32 `json:"monthly_installments,omitempty"` - Type string `json:"type"` - TokenId *string `json:"token_id,omitempty"` - PaymentSourceId *string `json:"payment_source_id,omitempty"` - // Optional id sent to indicate the bank contract for recurrent card charges. - ContractId *string `json:"contract_id,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ChargeRequestPaymentMethod ChargeRequestPaymentMethod - -// NewChargeRequestPaymentMethod instantiates a new ChargeRequestPaymentMethod object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewChargeRequestPaymentMethod(type_ string) *ChargeRequestPaymentMethod { - this := ChargeRequestPaymentMethod{} - this.Type = type_ - return &this -} - -// NewChargeRequestPaymentMethodWithDefaults instantiates a new ChargeRequestPaymentMethod object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewChargeRequestPaymentMethodWithDefaults() *ChargeRequestPaymentMethod { - this := ChargeRequestPaymentMethod{} - return &this -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *ChargeRequestPaymentMethod) GetExpiresAt() int64 { - if o == nil || IsNil(o.ExpiresAt) { - var ret int64 - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeRequestPaymentMethod) GetExpiresAtOk() (*int64, bool) { - if o == nil || IsNil(o.ExpiresAt) { - return nil, false - } - return o.ExpiresAt, true + PaymentMethodCardRequest *PaymentMethodCardRequest + PaymentMethodGeneralRequest *PaymentMethodGeneralRequest } -// HasExpiresAt returns a boolean if a field has been set. -func (o *ChargeRequestPaymentMethod) HasExpiresAt() bool { - if o != nil && !IsNil(o.ExpiresAt) { - return true +// PaymentMethodCardRequestAsChargeRequestPaymentMethod is a convenience function that returns PaymentMethodCardRequest wrapped in ChargeRequestPaymentMethod +func PaymentMethodCardRequestAsChargeRequestPaymentMethod(v *PaymentMethodCardRequest) ChargeRequestPaymentMethod { + return ChargeRequestPaymentMethod{ + PaymentMethodCardRequest: v, } - - return false -} - -// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field. -func (o *ChargeRequestPaymentMethod) SetExpiresAt(v int64) { - o.ExpiresAt = &v } -// GetMonthlyInstallments returns the MonthlyInstallments field value if set, zero value otherwise. -func (o *ChargeRequestPaymentMethod) GetMonthlyInstallments() int32 { - if o == nil || IsNil(o.MonthlyInstallments) { - var ret int32 - return ret +// PaymentMethodGeneralRequestAsChargeRequestPaymentMethod is a convenience function that returns PaymentMethodGeneralRequest wrapped in ChargeRequestPaymentMethod +func PaymentMethodGeneralRequestAsChargeRequestPaymentMethod(v *PaymentMethodGeneralRequest) ChargeRequestPaymentMethod { + return ChargeRequestPaymentMethod{ + PaymentMethodGeneralRequest: v, } - return *o.MonthlyInstallments } -// GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeRequestPaymentMethod) GetMonthlyInstallmentsOk() (*int32, bool) { - if o == nil || IsNil(o.MonthlyInstallments) { - return nil, false - } - return o.MonthlyInstallments, true -} -// HasMonthlyInstallments returns a boolean if a field has been set. -func (o *ChargeRequestPaymentMethod) HasMonthlyInstallments() bool { - if o != nil && !IsNil(o.MonthlyInstallments) { - return true - } - - return false -} - -// SetMonthlyInstallments gets a reference to the given int32 and assigns it to the MonthlyInstallments field. -func (o *ChargeRequestPaymentMethod) SetMonthlyInstallments(v int32) { - o.MonthlyInstallments = &v -} - -// GetType returns the Type field value -func (o *ChargeRequestPaymentMethod) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *ChargeRequestPaymentMethod) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *ChargeRequestPaymentMethod) SetType(v string) { - o.Type = v -} - -// GetTokenId returns the TokenId field value if set, zero value otherwise. -func (o *ChargeRequestPaymentMethod) GetTokenId() string { - if o == nil || IsNil(o.TokenId) { - var ret string - return ret - } - return *o.TokenId -} - -// GetTokenIdOk returns a tuple with the TokenId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeRequestPaymentMethod) GetTokenIdOk() (*string, bool) { - if o == nil || IsNil(o.TokenId) { - return nil, false - } - return o.TokenId, true -} - -// HasTokenId returns a boolean if a field has been set. -func (o *ChargeRequestPaymentMethod) HasTokenId() bool { - if o != nil && !IsNil(o.TokenId) { - return true - } - - return false -} - -// SetTokenId gets a reference to the given string and assigns it to the TokenId field. -func (o *ChargeRequestPaymentMethod) SetTokenId(v string) { - o.TokenId = &v -} - -// GetPaymentSourceId returns the PaymentSourceId field value if set, zero value otherwise. -func (o *ChargeRequestPaymentMethod) GetPaymentSourceId() string { - if o == nil || IsNil(o.PaymentSourceId) { - var ret string - return ret - } - return *o.PaymentSourceId -} - -// GetPaymentSourceIdOk returns a tuple with the PaymentSourceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeRequestPaymentMethod) GetPaymentSourceIdOk() (*string, bool) { - if o == nil || IsNil(o.PaymentSourceId) { - return nil, false - } - return o.PaymentSourceId, true -} - -// HasPaymentSourceId returns a boolean if a field has been set. -func (o *ChargeRequestPaymentMethod) HasPaymentSourceId() bool { - if o != nil && !IsNil(o.PaymentSourceId) { - return true - } - - return false -} - -// SetPaymentSourceId gets a reference to the given string and assigns it to the PaymentSourceId field. -func (o *ChargeRequestPaymentMethod) SetPaymentSourceId(v string) { - o.PaymentSourceId = &v -} - -// GetContractId returns the ContractId field value if set, zero value otherwise. -func (o *ChargeRequestPaymentMethod) GetContractId() string { - if o == nil || IsNil(o.ContractId) { - var ret string - return ret - } - return *o.ContractId -} - -// GetContractIdOk returns a tuple with the ContractId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeRequestPaymentMethod) GetContractIdOk() (*string, bool) { - if o == nil || IsNil(o.ContractId) { - return nil, false - } - return o.ContractId, true -} - -// HasContractId returns a boolean if a field has been set. -func (o *ChargeRequestPaymentMethod) HasContractId() bool { - if o != nil && !IsNil(o.ContractId) { - return true +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ChargeRequestPaymentMethod) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into PaymentMethodCardRequest + err = json.Unmarshal(data, &dst.PaymentMethodCardRequest) + if err == nil { + jsonPaymentMethodCardRequest, _ := json.Marshal(dst.PaymentMethodCardRequest) + if string(jsonPaymentMethodCardRequest) == "{}" { // empty struct + dst.PaymentMethodCardRequest = nil + } else { + match++ + } + } else { + dst.PaymentMethodCardRequest = nil + } + + // try to unmarshal data into PaymentMethodGeneralRequest + err = json.Unmarshal(data, &dst.PaymentMethodGeneralRequest) + if err == nil { + jsonPaymentMethodGeneralRequest, _ := json.Marshal(dst.PaymentMethodGeneralRequest) + if string(jsonPaymentMethodGeneralRequest) == "{}" { // empty struct + dst.PaymentMethodGeneralRequest = nil + } else { + match++ + } + } else { + dst.PaymentMethodGeneralRequest = nil } - return false -} - -// SetContractId gets a reference to the given string and assigns it to the ContractId field. -func (o *ChargeRequestPaymentMethod) SetContractId(v string) { - o.ContractId = &v -} + if match > 1 { // more than 1 match + // reset to nil + dst.PaymentMethodCardRequest = nil + dst.PaymentMethodGeneralRequest = nil -func (o ChargeRequestPaymentMethod) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err + return fmt.Errorf("data matches more than one schema in oneOf(ChargeRequestPaymentMethod)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ChargeRequestPaymentMethod)") } - return json.Marshal(toSerialize) } -func (o ChargeRequestPaymentMethod) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ExpiresAt) { - toSerialize["expires_at"] = o.ExpiresAt - } - if !IsNil(o.MonthlyInstallments) { - toSerialize["monthly_installments"] = o.MonthlyInstallments - } - toSerialize["type"] = o.Type - if !IsNil(o.TokenId) { - toSerialize["token_id"] = o.TokenId - } - if !IsNil(o.PaymentSourceId) { - toSerialize["payment_source_id"] = o.PaymentSourceId - } - if !IsNil(o.ContractId) { - toSerialize["contract_id"] = o.ContractId +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ChargeRequestPaymentMethod) MarshalJSON() ([]byte, error) { + if src.PaymentMethodCardRequest != nil { + return json.Marshal(&src.PaymentMethodCardRequest) } - for key, value := range o.AdditionalProperties { - toSerialize[key] = value + if src.PaymentMethodGeneralRequest != nil { + return json.Marshal(&src.PaymentMethodGeneralRequest) } - return toSerialize, nil + return nil, nil // no data in oneOf schemas } -func (o *ChargeRequestPaymentMethod) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "type", +// Get the actual instance +func (obj *ChargeRequestPaymentMethod) GetActualInstance() (interface{}) { + if obj == nil { + return nil } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err + if obj.PaymentMethodCardRequest != nil { + return obj.PaymentMethodCardRequest } - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } + if obj.PaymentMethodGeneralRequest != nil { + return obj.PaymentMethodGeneralRequest } - varChargeRequestPaymentMethod := _ChargeRequestPaymentMethod{} - - err = json.Unmarshal(data, &varChargeRequestPaymentMethod) - - if err != nil { - return err - } - - *o = ChargeRequestPaymentMethod(varChargeRequestPaymentMethod) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "expires_at") - delete(additionalProperties, "monthly_installments") - delete(additionalProperties, "type") - delete(additionalProperties, "token_id") - delete(additionalProperties, "payment_source_id") - delete(additionalProperties, "contract_id") - o.AdditionalProperties = additionalProperties - } - - return err + // all schemas are nil + return nil } type NullableChargeRequestPaymentMethod struct { @@ -353,3 +145,5 @@ func (v *NullableChargeRequestPaymentMethod) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_response.go b/model_charge_response.go index d6aa7a9..d794eff 100644 --- a/model_charge_response.go +++ b/model_charge_response.go @@ -20,25 +20,29 @@ var _ MappedNullable = &ChargeResponse{} // ChargeResponse struct for ChargeResponse type ChargeResponse struct { - Amount *int32 `json:"amount,omitempty"` - Channel *ChargeResponseChannel `json:"channel,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - Currency *string `json:"currency,omitempty"` - CustomerId *string `json:"customer_id,omitempty"` - Description *string `json:"description,omitempty"` - DeviceFingerprint *string `json:"device_fingerprint,omitempty"` - FailureCode *string `json:"failure_code,omitempty"` - FailureMessage *string `json:"failure_message,omitempty"` - Id *string `json:"id,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Object *string `json:"object,omitempty"` - OrderId *string `json:"order_id,omitempty"` - PaidAt NullableInt32 `json:"paid_at,omitempty"` - PaymentMethod *ChargeResponsePaymentMethod `json:"payment_method,omitempty"` + Amount *int32 `json:"amount,omitempty"` + Channel *ChargeResponseChannel `json:"channel,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + Currency *string `json:"currency,omitempty"` + CustomerId *string `json:"customer_id,omitempty"` + Description *string `json:"description,omitempty"` + DeviceFingerprint *string `json:"device_fingerprint,omitempty"` + FailureCode *string `json:"failure_code,omitempty"` + FailureMessage *string `json:"failure_message,omitempty"` + // Charge ID + Id *string `json:"id,omitempty"` + // Whether the charge was made in live mode or not + Livemode *bool `json:"livemode,omitempty"` + Object *string `json:"object,omitempty"` + // Order ID + OrderId *string `json:"order_id,omitempty"` + // Payment date + PaidAt NullableInt64 `json:"paid_at,omitempty"` + PaymentMethod *ChargeResponsePaymentMethod `json:"payment_method,omitempty"` // Reference ID of the charge - ReferenceId NullableString `json:"reference_id,omitempty"` - Refunds NullableChargeResponseRefunds `json:"refunds,omitempty"` - Status *string `json:"status,omitempty"` + ReferenceId NullableString `json:"reference_id,omitempty"` + Refunds NullableChargeResponseRefunds `json:"refunds,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -478,9 +482,9 @@ func (o *ChargeResponse) SetOrderId(v string) { } // GetPaidAt returns the PaidAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ChargeResponse) GetPaidAt() int32 { +func (o *ChargeResponse) GetPaidAt() int64 { if o == nil || IsNil(o.PaidAt.Get()) { - var ret int32 + var ret int64 return ret } return *o.PaidAt.Get() @@ -489,7 +493,7 @@ func (o *ChargeResponse) GetPaidAt() int32 { // GetPaidAtOk returns a tuple with the PaidAt field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ChargeResponse) GetPaidAtOk() (*int32, bool) { +func (o *ChargeResponse) GetPaidAtOk() (*int64, bool) { if o == nil { return nil, false } @@ -505,11 +509,10 @@ func (o *ChargeResponse) HasPaidAt() bool { return false } -// SetPaidAt gets a reference to the given NullableInt32 and assigns it to the PaidAt field. -func (o *ChargeResponse) SetPaidAt(v int32) { +// SetPaidAt gets a reference to the given NullableInt64 and assigns it to the PaidAt field. +func (o *ChargeResponse) SetPaidAt(v int64) { o.PaidAt.Set(&v) } - // SetPaidAtNil sets the value for PaidAt to be an explicit nil func (o *ChargeResponse) SetPaidAtNil() { o.PaidAt.Set(nil) @@ -584,7 +587,6 @@ func (o *ChargeResponse) HasReferenceId() bool { func (o *ChargeResponse) SetReferenceId(v string) { o.ReferenceId.Set(&v) } - // SetReferenceIdNil sets the value for ReferenceId to be an explicit nil func (o *ChargeResponse) SetReferenceIdNil() { o.ReferenceId.Set(nil) @@ -627,7 +629,6 @@ func (o *ChargeResponse) HasRefunds() bool { func (o *ChargeResponse) SetRefunds(v ChargeResponseRefunds) { o.Refunds.Set(&v) } - // SetRefundsNil sets the value for Refunds to be an explicit nil func (o *ChargeResponse) SetRefundsNil() { o.Refunds.Set(nil) @@ -671,7 +672,7 @@ func (o *ChargeResponse) SetStatus(v string) { } func (o ChargeResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -815,3 +816,5 @@ func (v *NullableChargeResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_response_channel.go b/model_charge_response_channel.go index f4f1c47..c841d4b 100644 --- a/model_charge_response_channel.go +++ b/model_charge_response_channel.go @@ -20,10 +20,10 @@ var _ MappedNullable = &ChargeResponseChannel{} // ChargeResponseChannel struct for ChargeResponseChannel type ChargeResponseChannel struct { - Segment *string `json:"segment,omitempty"` - CheckoutRequestId *string `json:"checkout_request_id,omitempty"` - CheckoutRequestType *string `json:"checkout_request_type,omitempty"` - Id *string `json:"id,omitempty"` + Segment *string `json:"segment,omitempty"` + CheckoutRequestId *string `json:"checkout_request_id,omitempty"` + CheckoutRequestType *string `json:"checkout_request_type,omitempty"` + Id *string `json:"id,omitempty"` AdditionalProperties map[string]interface{} } @@ -175,7 +175,7 @@ func (o *ChargeResponseChannel) SetId(v string) { } func (o ChargeResponseChannel) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,3 +263,5 @@ func (v *NullableChargeResponseChannel) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_response_refunds.go b/model_charge_response_refunds.go index 9ced0fe..85d099d 100644 --- a/model_charge_response_refunds.go +++ b/model_charge_response_refunds.go @@ -30,7 +30,7 @@ type ChargeResponseRefunds struct { // Url of the previous page. PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` // refunds - Data []ChargeResponseRefundsData `json:"data,omitempty"` + Data []ChargeResponseRefundsData `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -135,7 +135,6 @@ func (o *ChargeResponseRefunds) HasNextPageUrl() bool { func (o *ChargeResponseRefunds) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *ChargeResponseRefunds) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -178,7 +177,6 @@ func (o *ChargeResponseRefunds) HasPreviousPageUrl() bool { func (o *ChargeResponseRefunds) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *ChargeResponseRefunds) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -222,7 +220,7 @@ func (o *ChargeResponseRefunds) SetData(v []ChargeResponseRefundsData) { } func (o ChargeResponseRefunds) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,10 +262,10 @@ func (o *ChargeResponseRefunds) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -332,3 +330,5 @@ func (v *NullableChargeResponseRefunds) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_response_refunds_data.go b/model_charge_response_refunds_data.go index 96d8f30..fb31cfa 100644 --- a/model_charge_response_refunds_data.go +++ b/model_charge_response_refunds_data.go @@ -21,15 +21,15 @@ var _ MappedNullable = &ChargeResponseRefundsData{} // ChargeResponseRefundsData struct for ChargeResponseRefundsData type ChargeResponseRefundsData struct { - Amount int64 `json:"amount"` - AuthCode *string `json:"auth_code,omitempty"` - CreatedAt int64 `json:"created_at"` + Amount int64 `json:"amount"` + AuthCode *string `json:"auth_code,omitempty"` + CreatedAt int64 `json:"created_at"` // refund expiration date ExpiresAt *int64 `json:"expires_at,omitempty"` - Id string `json:"id"` - Object string `json:"object"` + Id string `json:"id"` + Object string `json:"object"` // refund status - Status *string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -249,7 +249,7 @@ func (o *ChargeResponseRefundsData) SetStatus(v string) { } func (o ChargeResponseRefundsData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -295,10 +295,10 @@ func (o *ChargeResponseRefundsData) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -365,3 +365,5 @@ func (v *NullableChargeResponseRefundsData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charge_update_request.go b/model_charge_update_request.go index 6fa2951..7a9a6a1 100644 --- a/model_charge_update_request.go +++ b/model_charge_update_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &ChargeUpdateRequest{} // ChargeUpdateRequest requested field for update a charge type ChargeUpdateRequest struct { // custom reference id - ReferenceId *string `json:"reference_id,omitempty"` + ReferenceId *string `json:"reference_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -77,7 +77,7 @@ func (o *ChargeUpdateRequest) SetReferenceId(v string) { } func (o ChargeUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -153,3 +153,5 @@ func (v *NullableChargeUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_charges_data_response.go b/model_charges_data_response.go index 7ba6b2f..168b1c2 100644 --- a/model_charges_data_response.go +++ b/model_charges_data_response.go @@ -20,25 +20,29 @@ var _ MappedNullable = &ChargesDataResponse{} // ChargesDataResponse struct for ChargesDataResponse type ChargesDataResponse struct { - Amount *int32 `json:"amount,omitempty"` - Channel *ChargeResponseChannel `json:"channel,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - Currency *string `json:"currency,omitempty"` - CustomerId *string `json:"customer_id,omitempty"` - Description *string `json:"description,omitempty"` - DeviceFingerprint *string `json:"device_fingerprint,omitempty"` - FailureCode *string `json:"failure_code,omitempty"` - FailureMessage *string `json:"failure_message,omitempty"` - Id *string `json:"id,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Object *string `json:"object,omitempty"` - OrderId *string `json:"order_id,omitempty"` - PaidAt NullableInt32 `json:"paid_at,omitempty"` - PaymentMethod *ChargeResponsePaymentMethod `json:"payment_method,omitempty"` + Amount *int32 `json:"amount,omitempty"` + Channel *ChargeResponseChannel `json:"channel,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + Currency *string `json:"currency,omitempty"` + CustomerId *string `json:"customer_id,omitempty"` + Description *string `json:"description,omitempty"` + DeviceFingerprint *string `json:"device_fingerprint,omitempty"` + FailureCode *string `json:"failure_code,omitempty"` + FailureMessage *string `json:"failure_message,omitempty"` + // Charge ID + Id *string `json:"id,omitempty"` + // Whether the charge was made in live mode or not + Livemode *bool `json:"livemode,omitempty"` + Object *string `json:"object,omitempty"` + // Order ID + OrderId *string `json:"order_id,omitempty"` + // Payment date + PaidAt NullableInt64 `json:"paid_at,omitempty"` + PaymentMethod *ChargeResponsePaymentMethod `json:"payment_method,omitempty"` // Reference ID of the charge - ReferenceId NullableString `json:"reference_id,omitempty"` - Refunds NullableChargeResponseRefunds `json:"refunds,omitempty"` - Status *string `json:"status,omitempty"` + ReferenceId NullableString `json:"reference_id,omitempty"` + Refunds NullableChargeResponseRefunds `json:"refunds,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -478,9 +482,9 @@ func (o *ChargesDataResponse) SetOrderId(v string) { } // GetPaidAt returns the PaidAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ChargesDataResponse) GetPaidAt() int32 { +func (o *ChargesDataResponse) GetPaidAt() int64 { if o == nil || IsNil(o.PaidAt.Get()) { - var ret int32 + var ret int64 return ret } return *o.PaidAt.Get() @@ -489,7 +493,7 @@ func (o *ChargesDataResponse) GetPaidAt() int32 { // GetPaidAtOk returns a tuple with the PaidAt field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ChargesDataResponse) GetPaidAtOk() (*int32, bool) { +func (o *ChargesDataResponse) GetPaidAtOk() (*int64, bool) { if o == nil { return nil, false } @@ -505,11 +509,10 @@ func (o *ChargesDataResponse) HasPaidAt() bool { return false } -// SetPaidAt gets a reference to the given NullableInt32 and assigns it to the PaidAt field. -func (o *ChargesDataResponse) SetPaidAt(v int32) { +// SetPaidAt gets a reference to the given NullableInt64 and assigns it to the PaidAt field. +func (o *ChargesDataResponse) SetPaidAt(v int64) { o.PaidAt.Set(&v) } - // SetPaidAtNil sets the value for PaidAt to be an explicit nil func (o *ChargesDataResponse) SetPaidAtNil() { o.PaidAt.Set(nil) @@ -584,7 +587,6 @@ func (o *ChargesDataResponse) HasReferenceId() bool { func (o *ChargesDataResponse) SetReferenceId(v string) { o.ReferenceId.Set(&v) } - // SetReferenceIdNil sets the value for ReferenceId to be an explicit nil func (o *ChargesDataResponse) SetReferenceIdNil() { o.ReferenceId.Set(nil) @@ -627,7 +629,6 @@ func (o *ChargesDataResponse) HasRefunds() bool { func (o *ChargesDataResponse) SetRefunds(v ChargeResponseRefunds) { o.Refunds.Set(&v) } - // SetRefundsNil sets the value for Refunds to be an explicit nil func (o *ChargesDataResponse) SetRefundsNil() { o.Refunds.Set(nil) @@ -671,7 +672,7 @@ func (o *ChargesDataResponse) SetStatus(v string) { } func (o ChargesDataResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -815,3 +816,5 @@ func (v *NullableChargesDataResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_checkout.go b/model_checkout.go index 923cc2d..1ee5cf4 100644 --- a/model_checkout.go +++ b/model_checkout.go @@ -23,25 +23,27 @@ var _ MappedNullable = &Checkout{} type Checkout struct { // Those are the payment methods that will be available for the link AllowedPaymentMethods []string `json:"allowed_payment_methods"` - // It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) + // It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) ExpiresAt int64 `json:"expires_at"` // This flag allows you to specify if months without interest will be active. MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` // This field allows you to specify the number of months without interest. MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` + // Indicates the 3DS2 mode for the order, either smart or strict. + ThreeDsMode *string `json:"three_ds_mode,omitempty"` // Reason for charge Name string `json:"name"` // This flag allows you to fill in the shipping information at checkout. NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` // This flag allows you to specify if the link will be on demand. - OnDemandEnabled NullableBool `json:"on_demand_enabled,omitempty"` - OrderTemplate CheckoutOrderTemplate `json:"order_template"` + OnDemandEnabled NullableBool `json:"on_demand_enabled,omitempty"` + OrderTemplate CheckoutOrderTemplate `json:"order_template"` // It is the number of payments that can be made through the link. PaymentsLimitCount *int32 `json:"payments_limit_count,omitempty"` // false: single use. true: multiple payments Recurrent bool `json:"recurrent"` // It is the type of link that will be created. It must be a valid type. - Type string `json:"type"` + Type string `json:"type"` AdditionalProperties map[string]interface{} } @@ -182,6 +184,38 @@ func (o *Checkout) SetMonthlyInstallmentsOptions(v []int32) { o.MonthlyInstallmentsOptions = v } +// GetThreeDsMode returns the ThreeDsMode field value if set, zero value otherwise. +func (o *Checkout) GetThreeDsMode() string { + if o == nil || IsNil(o.ThreeDsMode) { + var ret string + return ret + } + return *o.ThreeDsMode +} + +// GetThreeDsModeOk returns a tuple with the ThreeDsMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Checkout) GetThreeDsModeOk() (*string, bool) { + if o == nil || IsNil(o.ThreeDsMode) { + return nil, false + } + return o.ThreeDsMode, true +} + +// HasThreeDsMode returns a boolean if a field has been set. +func (o *Checkout) HasThreeDsMode() bool { + if o != nil && !IsNil(o.ThreeDsMode) { + return true + } + + return false +} + +// SetThreeDsMode gets a reference to the given string and assigns it to the ThreeDsMode field. +func (o *Checkout) SetThreeDsMode(v string) { + o.ThreeDsMode = &v +} + // GetName returns the Name field value func (o *Checkout) GetName() string { if o == nil { @@ -270,7 +304,6 @@ func (o *Checkout) HasOnDemandEnabled() bool { func (o *Checkout) SetOnDemandEnabled(v bool) { o.OnDemandEnabled.Set(&v) } - // SetOnDemandEnabledNil sets the value for OnDemandEnabled to be an explicit nil func (o *Checkout) SetOnDemandEnabledNil() { o.OnDemandEnabled.Set(nil) @@ -386,7 +419,7 @@ func (o *Checkout) SetType(v string) { } func (o Checkout) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -403,6 +436,9 @@ func (o Checkout) ToMap() (map[string]interface{}, error) { if !IsNil(o.MonthlyInstallmentsOptions) { toSerialize["monthly_installments_options"] = o.MonthlyInstallmentsOptions } + if !IsNil(o.ThreeDsMode) { + toSerialize["three_ds_mode"] = o.ThreeDsMode + } toSerialize["name"] = o.Name if !IsNil(o.NeedsShippingContact) { toSerialize["needs_shipping_contact"] = o.NeedsShippingContact @@ -442,10 +478,10 @@ func (o *Checkout) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -468,6 +504,7 @@ func (o *Checkout) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "expires_at") delete(additionalProperties, "monthly_installments_enabled") delete(additionalProperties, "monthly_installments_options") + delete(additionalProperties, "three_ds_mode") delete(additionalProperties, "name") delete(additionalProperties, "needs_shipping_contact") delete(additionalProperties, "on_demand_enabled") @@ -516,3 +553,5 @@ func (v *NullableCheckout) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_checkout_order_template.go b/model_checkout_order_template.go index 6753738..4bd6b18 100644 --- a/model_checkout_order_template.go +++ b/model_checkout_order_template.go @@ -22,12 +22,12 @@ var _ MappedNullable = &CheckoutOrderTemplate{} // CheckoutOrderTemplate It maintains the attributes with which the order will be created when receiving a new payment. type CheckoutOrderTemplate struct { // It is the currency in which the order will be created. It must be a valid ISO 4217 currency code. - Currency string `json:"currency"` + Currency string `json:"currency"` CustomerInfo *CheckoutOrderTemplateCustomerInfo `json:"customer_info,omitempty"` // They are the products to buy. Each contains the \"unit price\" and \"quantity\" parameters that are used to calculate the total amount of the order. LineItems []Product `json:"line_items"` // It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format. - Metadata map[string]interface{} `json:"metadata,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` AdditionalProperties map[string]interface{} } @@ -165,7 +165,7 @@ func (o *CheckoutOrderTemplate) SetMetadata(v map[string]interface{}) { } func (o CheckoutOrderTemplate) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -204,10 +204,10 @@ func (o *CheckoutOrderTemplate) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -271,3 +271,5 @@ func (v *NullableCheckoutOrderTemplate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_checkout_request.go b/model_checkout_request.go index d13749a..151bb00 100644 --- a/model_checkout_request.go +++ b/model_checkout_request.go @@ -19,25 +19,25 @@ import ( // checks if the CheckoutRequest type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CheckoutRequest{} -// CheckoutRequest [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details +// CheckoutRequest [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details type CheckoutRequest struct { // Are the payment methods available for this link AllowedPaymentMethods []string `json:"allowed_payment_methods"` // Unix timestamp of checkout expiration ExpiresAt *int64 `json:"expires_at,omitempty"` // Redirection url back to the site in case of failed payment, applies only to HostedPayment. - FailureUrl *string `json:"failure_url,omitempty"` - MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` + FailureUrl *string `json:"failure_url,omitempty"` + MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` // Reason for payment - Name *string `json:"name,omitempty"` - OnDemandEnabled *bool `json:"on_demand_enabled,omitempty"` + Name *string `json:"name,omitempty"` + OnDemandEnabled *bool `json:"on_demand_enabled,omitempty"` // number of seconds to wait before redirecting to the success_url RedirectionTime *int32 `json:"redirection_time,omitempty"` // Redirection url back to the site in case of successful payment, applies only to HostedPayment SuccessUrl *string `json:"success_url,omitempty"` // This field represents the type of checkout - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` AdditionalProperties map[string]interface{} } @@ -374,7 +374,7 @@ func (o *CheckoutRequest) SetType(v string) { } func (o CheckoutRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -432,10 +432,10 @@ func (o *CheckoutRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -505,3 +505,5 @@ func (v *NullableCheckoutRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_checkout_response.go b/model_checkout_response.go index 0fc7e38..a7ba59a 100644 --- a/model_checkout_response.go +++ b/model_checkout_response.go @@ -21,32 +21,32 @@ var _ MappedNullable = &CheckoutResponse{} // CheckoutResponse checkout response type CheckoutResponse struct { - AllowedPaymentMethods []string `json:"allowed_payment_methods,omitempty"` - CanNotExpire *bool `json:"can_not_expire,omitempty"` - EmailsSent *int32 `json:"emails_sent,omitempty"` - ExcludeCardNetworks []map[string]interface{} `json:"exclude_card_networks,omitempty"` - ExpiresAt *int64 `json:"expires_at,omitempty"` - FailureUrl *string `json:"failure_url,omitempty"` - Force3dsFlow *bool `json:"force_3ds_flow,omitempty"` - Id string `json:"id"` - Livemode bool `json:"livemode"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` - MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` + AllowedPaymentMethods []string `json:"allowed_payment_methods,omitempty"` + CanNotExpire *bool `json:"can_not_expire,omitempty"` + EmailsSent *int32 `json:"emails_sent,omitempty"` + ExcludeCardNetworks []map[string]interface{} `json:"exclude_card_networks,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + FailureUrl *string `json:"failure_url,omitempty"` + Force3dsFlow *bool `json:"force_3ds_flow,omitempty"` + Id string `json:"id"` + Livemode bool `json:"livemode"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` + MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` // Reason for charge - Name string `json:"name"` - NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` - Object string `json:"object"` - PaidPaymentsCount *int32 `json:"paid_payments_count,omitempty"` - PaymentsLimitCount NullableInt32 `json:"payments_limit_count,omitempty"` - Recurrent *bool `json:"recurrent,omitempty"` - Slug *string `json:"slug,omitempty"` - SmsSent *int32 `json:"sms_sent,omitempty"` - StartsAt *int32 `json:"starts_at,omitempty"` - Status *string `json:"status,omitempty"` - SuccessUrl *string `json:"success_url,omitempty"` - Type *string `json:"type,omitempty"` - Url *string `json:"url,omitempty"` + Name string `json:"name"` + NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` + Object string `json:"object"` + PaidPaymentsCount *int32 `json:"paid_payments_count,omitempty"` + PaymentsLimitCount NullableInt32 `json:"payments_limit_count,omitempty"` + Recurrent *bool `json:"recurrent,omitempty"` + Slug *string `json:"slug,omitempty"` + SmsSent *int32 `json:"sms_sent,omitempty"` + StartsAt *int32 `json:"starts_at,omitempty"` + Status *string `json:"status,omitempty"` + SuccessUrl *string `json:"success_url,omitempty"` + Type *string `json:"type,omitempty"` + Url *string `json:"url,omitempty"` AdditionalProperties map[string]interface{} } @@ -585,7 +585,6 @@ func (o *CheckoutResponse) HasPaymentsLimitCount() bool { func (o *CheckoutResponse) SetPaymentsLimitCount(v int32) { o.PaymentsLimitCount.Set(&v) } - // SetPaymentsLimitCountNil sets the value for PaymentsLimitCount to be an explicit nil func (o *CheckoutResponse) SetPaymentsLimitCountNil() { o.PaymentsLimitCount.Set(nil) @@ -853,7 +852,7 @@ func (o *CheckoutResponse) SetUrl(v string) { } func (o CheckoutResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -953,10 +952,10 @@ func (o *CheckoutResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -1041,3 +1040,5 @@ func (v *NullableCheckoutResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_checkouts_response.go b/model_checkouts_response.go index cbc484d..9c56229 100644 --- a/model_checkouts_response.go +++ b/model_checkouts_response.go @@ -28,8 +28,8 @@ type CheckoutsResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []CheckoutResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []CheckoutResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *CheckoutsResponse) HasNextPageUrl() bool { func (o *CheckoutsResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *CheckoutsResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *CheckoutsResponse) HasPreviousPageUrl() bool { func (o *CheckoutsResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *CheckoutsResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *CheckoutsResponse) SetData(v []CheckoutResponse) { } func (o CheckoutsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *CheckoutsResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableCheckoutsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_company_fiscal_info_address_response.go b/model_company_fiscal_info_address_response.go index c9cdb96..6bad588 100644 --- a/model_company_fiscal_info_address_response.go +++ b/model_company_fiscal_info_address_response.go @@ -37,7 +37,7 @@ type CompanyFiscalInfoAddressResponse struct { // Street number ExternalNumber *string `json:"external_number,omitempty"` // Unit / apartment number - InternalNumber *string `json:"internal_number,omitempty"` + InternalNumber *string `json:"internal_number,omitempty"` AdditionalProperties map[string]interface{} } @@ -349,7 +349,7 @@ func (o *CompanyFiscalInfoAddressResponse) SetInternalNumber(v string) { } func (o CompanyFiscalInfoAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -457,3 +457,5 @@ func (v *NullableCompanyFiscalInfoAddressResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_company_fiscal_info_response.go b/model_company_fiscal_info_response.go index b63bd5e..3ebbd14 100644 --- a/model_company_fiscal_info_response.go +++ b/model_company_fiscal_info_response.go @@ -31,9 +31,9 @@ type CompanyFiscalInfoResponse struct { // Phone number of the company Phone *string `json:"phone,omitempty"` // Business type if 'persona_fisica' - PhysicalPersonBusinessType *string `json:"physical_person_business_type,omitempty"` - Address *CompanyFiscalInfoAddressResponse `json:"address,omitempty"` - AdditionalProperties map[string]interface{} + PhysicalPersonBusinessType *string `json:"physical_person_business_type,omitempty"` + Address *CompanyFiscalInfoAddressResponse `json:"address,omitempty"` + AdditionalProperties map[string]interface{} } type _CompanyFiscalInfoResponse CompanyFiscalInfoResponse @@ -280,7 +280,7 @@ func (o *CompanyFiscalInfoResponse) SetAddress(v CompanyFiscalInfoAddressRespons } func (o CompanyFiscalInfoResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -380,3 +380,5 @@ func (v *NullableCompanyFiscalInfoResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_company_payout_destination_response.go b/model_company_payout_destination_response.go index 9da7d21..7311eba 100644 --- a/model_company_payout_destination_response.go +++ b/model_company_payout_destination_response.go @@ -31,7 +31,7 @@ type CompanyPayoutDestinationResponse struct { // Type of the payout destination Type *string `json:"type,omitempty"` // Account number of the receiving account - AccountNumber *string `json:"account_number,omitempty"` + AccountNumber *string `json:"account_number,omitempty"` AdditionalProperties map[string]interface{} } @@ -247,7 +247,7 @@ func (o *CompanyPayoutDestinationResponse) SetAccountNumber(v string) { } func (o CompanyPayoutDestinationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -343,3 +343,5 @@ func (v *NullableCompanyPayoutDestinationResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_company_response.go b/model_company_response.go index daaadb6..7d5e5c8 100644 --- a/model_company_response.go +++ b/model_company_response.go @@ -31,9 +31,9 @@ type CompanyResponse struct { // Id of the parent company ParentCompanyId *string `json:"parent_company_id,omitempty"` // Whether the parent company's fiscal data is to be used for liquidation and tax purposes - UseParentFiscalData *bool `json:"use_parent_fiscal_data,omitempty"` - PayoutDestination *CompanyPayoutDestinationResponse `json:"payout_destination,omitempty"` - FiscalInfo *CompanyFiscalInfoResponse `json:"fiscal_info,omitempty"` + UseParentFiscalData *bool `json:"use_parent_fiscal_data,omitempty"` + PayoutDestination *CompanyPayoutDestinationResponse `json:"payout_destination,omitempty"` + FiscalInfo *CompanyFiscalInfoResponse `json:"fiscal_info,omitempty"` AdditionalProperties map[string]interface{} } @@ -313,7 +313,7 @@ func (o *CompanyResponse) SetFiscalInfo(v CompanyFiscalInfoResponse) { } func (o CompanyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -417,3 +417,5 @@ func (v *NullableCompanyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_create_customer_fiscal_entities_response.go b/model_create_customer_fiscal_entities_response.go index 57db18a..93e35d5 100644 --- a/model_create_customer_fiscal_entities_response.go +++ b/model_create_customer_fiscal_entities_response.go @@ -21,17 +21,17 @@ var _ MappedNullable = &CreateCustomerFiscalEntitiesResponse{} // CreateCustomerFiscalEntitiesResponse struct for CreateCustomerFiscalEntitiesResponse type CreateCustomerFiscalEntitiesResponse struct { - Address CustomerAddress `json:"address"` - TaxId *string `json:"tax_id,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` - CompanyName *string `json:"company_name,omitempty"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` - Default *bool `json:"default,omitempty"` + Address CustomerAddress `json:"address"` + TaxId *string `json:"tax_id,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` + CompanyName *string `json:"company_name,omitempty"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` + Default *bool `json:"default,omitempty"` AdditionalProperties map[string]interface{} } @@ -379,7 +379,7 @@ func (o *CreateCustomerFiscalEntitiesResponse) SetDefault(v bool) { } func (o CreateCustomerFiscalEntitiesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -437,10 +437,10 @@ func (o *CreateCustomerFiscalEntitiesResponse) UnmarshalJSON(data []byte) (err e err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -511,3 +511,5 @@ func (v *NullableCreateCustomerFiscalEntitiesResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_create_customer_payment_methods_request.go b/model_create_customer_payment_methods_request.go index ce5dba4..0bbd1ab 100644 --- a/model_create_customer_payment_methods_request.go +++ b/model_create_customer_payment_methods_request.go @@ -18,16 +18,9 @@ import ( // CreateCustomerPaymentMethodsRequest - Contains details of the payment methods that the customer has active or has used in Conekta type CreateCustomerPaymentMethodsRequest struct { - PaymentMethodCardRequest *PaymentMethodCardRequest PaymentMethodCashRequest *PaymentMethodCashRequest PaymentMethodSpeiRequest *PaymentMethodSpeiRequest -} - -// PaymentMethodCardRequestAsCreateCustomerPaymentMethodsRequest is a convenience function that returns PaymentMethodCardRequest wrapped in CreateCustomerPaymentMethodsRequest -func PaymentMethodCardRequestAsCreateCustomerPaymentMethodsRequest(v *PaymentMethodCardRequest) CreateCustomerPaymentMethodsRequest { - return CreateCustomerPaymentMethodsRequest{ - PaymentMethodCardRequest: v, - } + PaymentMethodTokenRequest *PaymentMethodTokenRequest } // PaymentMethodCashRequestAsCreateCustomerPaymentMethodsRequest is a convenience function that returns PaymentMethodCashRequest wrapped in CreateCustomerPaymentMethodsRequest @@ -44,24 +37,18 @@ func PaymentMethodSpeiRequestAsCreateCustomerPaymentMethodsRequest(v *PaymentMet } } +// PaymentMethodTokenRequestAsCreateCustomerPaymentMethodsRequest is a convenience function that returns PaymentMethodTokenRequest wrapped in CreateCustomerPaymentMethodsRequest +func PaymentMethodTokenRequestAsCreateCustomerPaymentMethodsRequest(v *PaymentMethodTokenRequest) CreateCustomerPaymentMethodsRequest { + return CreateCustomerPaymentMethodsRequest{ + PaymentMethodTokenRequest: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *CreateCustomerPaymentMethodsRequest) UnmarshalJSON(data []byte) error { var err error match := 0 - // try to unmarshal data into PaymentMethodCardRequest - err = json.Unmarshal(data, &dst.PaymentMethodCardRequest) - if err == nil { - jsonPaymentMethodCardRequest, _ := json.Marshal(dst.PaymentMethodCardRequest) - if string(jsonPaymentMethodCardRequest) == "{}" { // empty struct - dst.PaymentMethodCardRequest = nil - } else { - match++ - } - } else { - dst.PaymentMethodCardRequest = nil - } - // try to unmarshal data into PaymentMethodCashRequest err = json.Unmarshal(data, &dst.PaymentMethodCashRequest) if err == nil { @@ -88,11 +75,24 @@ func (dst *CreateCustomerPaymentMethodsRequest) UnmarshalJSON(data []byte) error dst.PaymentMethodSpeiRequest = nil } + // try to unmarshal data into PaymentMethodTokenRequest + err = json.Unmarshal(data, &dst.PaymentMethodTokenRequest) + if err == nil { + jsonPaymentMethodTokenRequest, _ := json.Marshal(dst.PaymentMethodTokenRequest) + if string(jsonPaymentMethodTokenRequest) == "{}" { // empty struct + dst.PaymentMethodTokenRequest = nil + } else { + match++ + } + } else { + dst.PaymentMethodTokenRequest = nil + } + if match > 1 { // more than 1 match // reset to nil - dst.PaymentMethodCardRequest = nil dst.PaymentMethodCashRequest = nil dst.PaymentMethodSpeiRequest = nil + dst.PaymentMethodTokenRequest = nil return fmt.Errorf("data matches more than one schema in oneOf(CreateCustomerPaymentMethodsRequest)") } else if match == 1 { @@ -104,10 +104,6 @@ func (dst *CreateCustomerPaymentMethodsRequest) UnmarshalJSON(data []byte) error // Marshal data from the first non-nil pointers in the struct to JSON func (src CreateCustomerPaymentMethodsRequest) MarshalJSON() ([]byte, error) { - if src.PaymentMethodCardRequest != nil { - return json.Marshal(&src.PaymentMethodCardRequest) - } - if src.PaymentMethodCashRequest != nil { return json.Marshal(&src.PaymentMethodCashRequest) } @@ -116,6 +112,10 @@ func (src CreateCustomerPaymentMethodsRequest) MarshalJSON() ([]byte, error) { return json.Marshal(&src.PaymentMethodSpeiRequest) } + if src.PaymentMethodTokenRequest != nil { + return json.Marshal(&src.PaymentMethodTokenRequest) + } + return nil, nil // no data in oneOf schemas } @@ -124,10 +124,6 @@ func (obj *CreateCustomerPaymentMethodsRequest) GetActualInstance() (interface{} if obj == nil { return nil } - if obj.PaymentMethodCardRequest != nil { - return obj.PaymentMethodCardRequest - } - if obj.PaymentMethodCashRequest != nil { return obj.PaymentMethodCashRequest } @@ -136,6 +132,10 @@ func (obj *CreateCustomerPaymentMethodsRequest) GetActualInstance() (interface{} return obj.PaymentMethodSpeiRequest } + if obj.PaymentMethodTokenRequest != nil { + return obj.PaymentMethodTokenRequest + } + // all schemas are nil return nil } diff --git a/model_create_risk_rules_data.go b/model_create_risk_rules_data.go index 9f311bb..2fff755 100644 --- a/model_create_risk_rules_data.go +++ b/model_create_risk_rules_data.go @@ -26,7 +26,7 @@ type CreateRiskRulesData struct { // Field to be used for the rule Field string `json:"field"` // Value to be used for the rule - Value string `json:"value"` + Value string `json:"value"` AdditionalProperties map[string]interface{} } @@ -125,7 +125,7 @@ func (o *CreateRiskRulesData) SetValue(v string) { } func (o CreateRiskRulesData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,10 +160,10 @@ func (o *CreateRiskRulesData) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -226,3 +226,5 @@ func (v *NullableCreateRiskRulesData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer.go b/model_customer.go index 1158360..d0d04bd 100644 --- a/model_customer.go +++ b/model_customer.go @@ -31,9 +31,9 @@ type Customer struct { // It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id) DefaultPaymentSourceId *string `json:"default_payment_source_id,omitempty"` // It is a parameter that allows to identify in the response, the Conekta ID of the shipping address (shipping_contact) - DefaultShippingContactId *string `json:"default_shipping_contact_id,omitempty"` - FiscalEntities []CustomerFiscalEntitiesRequest `json:"fiscal_entities,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` + DefaultShippingContactId *string `json:"default_shipping_contact_id,omitempty"` + FiscalEntities []CustomerFiscalEntitiesRequest `json:"fiscal_entities,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` // Client's name Name string `json:"name"` // Contains details of the payment methods that the customer has active or has used in Conekta @@ -43,8 +43,8 @@ type Customer struct { // Contains the ID of a plan, which could together with name, email and phone create a client directly to a subscription PlanId *string `json:"plan_id,omitempty"` // Contains the detail of the shipping addresses that the client has active or has used in Conekta - ShippingContacts []CustomerShippingContacts `json:"shipping_contacts,omitempty"` - Subscription *SubscriptionRequest `json:"subscription,omitempty"` + ShippingContacts []CustomerShippingContacts `json:"shipping_contacts,omitempty"` + Subscription *SubscriptionRequest `json:"subscription,omitempty"` AdditionalProperties map[string]interface{} } @@ -106,7 +106,6 @@ func (o *Customer) HasAntifraudInfo() bool { func (o *Customer) SetAntifraudInfo(v CustomerAntifraudInfo) { o.AntifraudInfo.Set(&v) } - // SetAntifraudInfoNil sets the value for AntifraudInfo to be an explicit nil func (o *Customer) SetAntifraudInfoNil() { o.AntifraudInfo.Set(nil) @@ -510,7 +509,7 @@ func (o *Customer) SetSubscription(v SubscriptionRequest) { } func (o Customer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -578,10 +577,10 @@ func (o *Customer) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -655,3 +654,5 @@ func (v *NullableCustomer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_address.go b/model_customer_address.go index e99b53b..a3b3e2a 100644 --- a/model_customer_address.go +++ b/model_customer_address.go @@ -21,15 +21,15 @@ var _ MappedNullable = &CustomerAddress{} // CustomerAddress struct for CustomerAddress type CustomerAddress struct { - Street1 string `json:"street1"` - Street2 *string `json:"street2,omitempty"` - PostalCode string `json:"postal_code"` - City string `json:"city"` - State *string `json:"state,omitempty"` + Street1 string `json:"street1"` + Street2 *string `json:"street2,omitempty"` + PostalCode string `json:"postal_code"` + City string `json:"city"` + State *string `json:"state,omitempty"` // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - Country *string `json:"country,omitempty"` - Residential *bool `json:"residential,omitempty"` - ExternalNumber *string `json:"external_number,omitempty"` + Country *string `json:"country,omitempty"` + Residential *bool `json:"residential,omitempty"` + ExternalNumber *string `json:"external_number,omitempty"` AdditionalProperties map[string]interface{} } @@ -292,7 +292,7 @@ func (o *CustomerAddress) SetExternalNumber(v string) { } func (o CustomerAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -342,10 +342,10 @@ func (o *CustomerAddress) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -413,3 +413,5 @@ func (v *NullableCustomerAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_antifraud_info.go b/model_customer_antifraud_info.go index b23dfca..a0bace2 100644 --- a/model_customer_antifraud_info.go +++ b/model_customer_antifraud_info.go @@ -20,8 +20,8 @@ var _ MappedNullable = &CustomerAntifraudInfo{} // CustomerAntifraudInfo struct for CustomerAntifraudInfo type CustomerAntifraudInfo struct { - AccountCreatedAt *int64 `json:"account_created_at,omitempty"` - FirstPaidAt *int64 `json:"first_paid_at,omitempty"` + AccountCreatedAt *int64 `json:"account_created_at,omitempty"` + FirstPaidAt *int64 `json:"first_paid_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -109,7 +109,7 @@ func (o *CustomerAntifraudInfo) SetFirstPaidAt(v int64) { } func (o CustomerAntifraudInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -189,3 +189,5 @@ func (v *NullableCustomerAntifraudInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_antifraud_info_response.go b/model_customer_antifraud_info_response.go index 5d6a1ee..4c92173 100644 --- a/model_customer_antifraud_info_response.go +++ b/model_customer_antifraud_info_response.go @@ -20,8 +20,8 @@ var _ MappedNullable = &CustomerAntifraudInfoResponse{} // CustomerAntifraudInfoResponse struct for CustomerAntifraudInfoResponse type CustomerAntifraudInfoResponse struct { - FirstPaidAt *int32 `json:"first_paid_at,omitempty"` - AccountCreatedAt *int64 `json:"account_created_at,omitempty"` + FirstPaidAt *int32 `json:"first_paid_at,omitempty"` + AccountCreatedAt *int64 `json:"account_created_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -109,7 +109,7 @@ func (o *CustomerAntifraudInfoResponse) SetAccountCreatedAt(v int64) { } func (o CustomerAntifraudInfoResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -189,3 +189,5 @@ func (v *NullableCustomerAntifraudInfoResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_fiscal_entities_data_response.go b/model_customer_fiscal_entities_data_response.go index 002c774..d62639b 100644 --- a/model_customer_fiscal_entities_data_response.go +++ b/model_customer_fiscal_entities_data_response.go @@ -21,17 +21,17 @@ var _ MappedNullable = &CustomerFiscalEntitiesDataResponse{} // CustomerFiscalEntitiesDataResponse struct for CustomerFiscalEntitiesDataResponse type CustomerFiscalEntitiesDataResponse struct { - Address CustomerAddress `json:"address"` - TaxId *string `json:"tax_id,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` - CompanyName *string `json:"company_name,omitempty"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` - Default *bool `json:"default,omitempty"` + Address CustomerAddress `json:"address"` + TaxId *string `json:"tax_id,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` + CompanyName *string `json:"company_name,omitempty"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` + Default *bool `json:"default,omitempty"` AdditionalProperties map[string]interface{} } @@ -379,7 +379,7 @@ func (o *CustomerFiscalEntitiesDataResponse) SetDefault(v bool) { } func (o CustomerFiscalEntitiesDataResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -437,10 +437,10 @@ func (o *CustomerFiscalEntitiesDataResponse) UnmarshalJSON(data []byte) (err err err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -511,3 +511,5 @@ func (v *NullableCustomerFiscalEntitiesDataResponse) UnmarshalJSON(src []byte) e v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_fiscal_entities_request.go b/model_customer_fiscal_entities_request.go index a08d548..9df8e1f 100644 --- a/model_customer_fiscal_entities_request.go +++ b/model_customer_fiscal_entities_request.go @@ -21,12 +21,12 @@ var _ MappedNullable = &CustomerFiscalEntitiesRequest{} // CustomerFiscalEntitiesRequest struct for CustomerFiscalEntitiesRequest type CustomerFiscalEntitiesRequest struct { - Address CustomerAddress `json:"address"` - TaxId *string `json:"tax_id,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` - CompanyName *string `json:"company_name,omitempty"` + Address CustomerAddress `json:"address"` + TaxId *string `json:"tax_id,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` + CompanyName *string `json:"company_name,omitempty"` AdditionalProperties map[string]interface{} } @@ -235,7 +235,7 @@ func (o *CustomerFiscalEntitiesRequest) SetCompanyName(v string) { } func (o CustomerFiscalEntitiesRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -281,10 +281,10 @@ func (o *CustomerFiscalEntitiesRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -350,3 +350,5 @@ func (v *NullableCustomerFiscalEntitiesRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_fiscal_entities_response.go b/model_customer_fiscal_entities_response.go index e84c65f..33bf37d 100644 --- a/model_customer_fiscal_entities_response.go +++ b/model_customer_fiscal_entities_response.go @@ -24,8 +24,8 @@ type CustomerFiscalEntitiesResponse struct { // Indicates if there are more pages to be requested HasMore bool `json:"has_more"` // Object type, in this case is list - Object string `json:"object"` - Data []CustomerFiscalEntitiesDataResponse `json:"data,omitempty"` + Object string `json:"object"` + Data []CustomerFiscalEntitiesDataResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -131,7 +131,7 @@ func (o *CustomerFiscalEntitiesResponse) SetData(v []CustomerFiscalEntitiesDataR } func (o CustomerFiscalEntitiesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -167,10 +167,10 @@ func (o *CustomerFiscalEntitiesResponse) UnmarshalJSON(data []byte) (err error) err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -233,3 +233,5 @@ func (v *NullableCustomerFiscalEntitiesResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_info.go b/model_customer_info.go index 6274fd8..cc39e4c 100644 --- a/model_customer_info.go +++ b/model_customer_info.go @@ -21,11 +21,11 @@ var _ MappedNullable = &CustomerInfo{} // CustomerInfo struct for CustomerInfo type CustomerInfo struct { - Name string `json:"name"` - Email string `json:"email"` - Phone string `json:"phone"` - Corporate *bool `json:"corporate,omitempty"` - Object *string `json:"object,omitempty"` + Name string `json:"name"` + Email string `json:"email"` + Phone string `json:"phone"` + Corporate *bool `json:"corporate,omitempty"` + Object *string `json:"object,omitempty"` AdditionalProperties map[string]interface{} } @@ -188,7 +188,7 @@ func (o *CustomerInfo) SetObject(v string) { } func (o CustomerInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -229,10 +229,10 @@ func (o *CustomerInfo) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -297,3 +297,5 @@ func (v *NullableCustomerInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_info_just_customer_id.go b/model_customer_info_just_customer_id.go index ac49a57..a2de3fc 100644 --- a/model_customer_info_just_customer_id.go +++ b/model_customer_info_just_customer_id.go @@ -21,7 +21,7 @@ var _ MappedNullable = &CustomerInfoJustCustomerId{} // CustomerInfoJustCustomerId struct for CustomerInfoJustCustomerId type CustomerInfoJustCustomerId struct { - CustomerId string `json:"customer_id"` + CustomerId string `json:"customer_id"` AdditionalProperties map[string]interface{} } @@ -70,7 +70,7 @@ func (o *CustomerInfoJustCustomerId) SetCustomerId(v string) { } func (o CustomerInfoJustCustomerId) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -101,10 +101,10 @@ func (o *CustomerInfoJustCustomerId) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -165,3 +165,5 @@ func (v *NullableCustomerInfoJustCustomerId) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_info_just_customer_id_response.go b/model_customer_info_just_customer_id_response.go index 5baefdb..dc17835 100644 --- a/model_customer_info_just_customer_id_response.go +++ b/model_customer_info_just_customer_id_response.go @@ -20,7 +20,7 @@ var _ MappedNullable = &CustomerInfoJustCustomerIdResponse{} // CustomerInfoJustCustomerIdResponse struct for CustomerInfoJustCustomerIdResponse type CustomerInfoJustCustomerIdResponse struct { - CustomerId *string `json:"customer_id,omitempty"` + CustomerId *string `json:"customer_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,7 +76,7 @@ func (o *CustomerInfoJustCustomerIdResponse) SetCustomerId(v string) { } func (o CustomerInfoJustCustomerIdResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -152,3 +152,5 @@ func (v *NullableCustomerInfoJustCustomerIdResponse) UnmarshalJSON(src []byte) e v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_payment_method_request.go b/model_customer_payment_method_request.go index b120db6..862c304 100644 --- a/model_customer_payment_method_request.go +++ b/model_customer_payment_method_request.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CustomerPaymentMethodRequest{} // CustomerPaymentMethodRequest Contains details of the payment methods that the customer has active or has used in Conekta type CustomerPaymentMethodRequest struct { // Type of payment method - Type string `json:"type"` + Type string `json:"type"` AdditionalProperties map[string]interface{} } @@ -71,7 +71,7 @@ func (o *CustomerPaymentMethodRequest) SetType(v string) { } func (o CustomerPaymentMethodRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -102,10 +102,10 @@ func (o *CustomerPaymentMethodRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -166,3 +166,5 @@ func (v *NullableCustomerPaymentMethodRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_payment_methods_request.go b/model_customer_payment_methods_request.go index ddf91ee..b3a5986 100644 --- a/model_customer_payment_methods_request.go +++ b/model_customer_payment_methods_request.go @@ -18,16 +18,9 @@ import ( // CustomerPaymentMethodsRequest - struct for CustomerPaymentMethodsRequest type CustomerPaymentMethodsRequest struct { - PaymentMethodCardRequest *PaymentMethodCardRequest PaymentMethodCashRequest *PaymentMethodCashRequest PaymentMethodSpeiRequest *PaymentMethodSpeiRequest -} - -// PaymentMethodCardRequestAsCustomerPaymentMethodsRequest is a convenience function that returns PaymentMethodCardRequest wrapped in CustomerPaymentMethodsRequest -func PaymentMethodCardRequestAsCustomerPaymentMethodsRequest(v *PaymentMethodCardRequest) CustomerPaymentMethodsRequest { - return CustomerPaymentMethodsRequest{ - PaymentMethodCardRequest: v, - } + PaymentMethodTokenRequest *PaymentMethodTokenRequest } // PaymentMethodCashRequestAsCustomerPaymentMethodsRequest is a convenience function that returns PaymentMethodCashRequest wrapped in CustomerPaymentMethodsRequest @@ -44,24 +37,18 @@ func PaymentMethodSpeiRequestAsCustomerPaymentMethodsRequest(v *PaymentMethodSpe } } +// PaymentMethodTokenRequestAsCustomerPaymentMethodsRequest is a convenience function that returns PaymentMethodTokenRequest wrapped in CustomerPaymentMethodsRequest +func PaymentMethodTokenRequestAsCustomerPaymentMethodsRequest(v *PaymentMethodTokenRequest) CustomerPaymentMethodsRequest { + return CustomerPaymentMethodsRequest{ + PaymentMethodTokenRequest: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *CustomerPaymentMethodsRequest) UnmarshalJSON(data []byte) error { var err error match := 0 - // try to unmarshal data into PaymentMethodCardRequest - err = json.Unmarshal(data, &dst.PaymentMethodCardRequest) - if err == nil { - jsonPaymentMethodCardRequest, _ := json.Marshal(dst.PaymentMethodCardRequest) - if string(jsonPaymentMethodCardRequest) == "{}" { // empty struct - dst.PaymentMethodCardRequest = nil - } else { - match++ - } - } else { - dst.PaymentMethodCardRequest = nil - } - // try to unmarshal data into PaymentMethodCashRequest err = json.Unmarshal(data, &dst.PaymentMethodCashRequest) if err == nil { @@ -88,11 +75,24 @@ func (dst *CustomerPaymentMethodsRequest) UnmarshalJSON(data []byte) error { dst.PaymentMethodSpeiRequest = nil } + // try to unmarshal data into PaymentMethodTokenRequest + err = json.Unmarshal(data, &dst.PaymentMethodTokenRequest) + if err == nil { + jsonPaymentMethodTokenRequest, _ := json.Marshal(dst.PaymentMethodTokenRequest) + if string(jsonPaymentMethodTokenRequest) == "{}" { // empty struct + dst.PaymentMethodTokenRequest = nil + } else { + match++ + } + } else { + dst.PaymentMethodTokenRequest = nil + } + if match > 1 { // more than 1 match // reset to nil - dst.PaymentMethodCardRequest = nil dst.PaymentMethodCashRequest = nil dst.PaymentMethodSpeiRequest = nil + dst.PaymentMethodTokenRequest = nil return fmt.Errorf("data matches more than one schema in oneOf(CustomerPaymentMethodsRequest)") } else if match == 1 { @@ -104,10 +104,6 @@ func (dst *CustomerPaymentMethodsRequest) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src CustomerPaymentMethodsRequest) MarshalJSON() ([]byte, error) { - if src.PaymentMethodCardRequest != nil { - return json.Marshal(&src.PaymentMethodCardRequest) - } - if src.PaymentMethodCashRequest != nil { return json.Marshal(&src.PaymentMethodCashRequest) } @@ -116,6 +112,10 @@ func (src CustomerPaymentMethodsRequest) MarshalJSON() ([]byte, error) { return json.Marshal(&src.PaymentMethodSpeiRequest) } + if src.PaymentMethodTokenRequest != nil { + return json.Marshal(&src.PaymentMethodTokenRequest) + } + return nil, nil // no data in oneOf schemas } @@ -124,10 +124,6 @@ func (obj *CustomerPaymentMethodsRequest) GetActualInstance() (interface{}) { if obj == nil { return nil } - if obj.PaymentMethodCardRequest != nil { - return obj.PaymentMethodCardRequest - } - if obj.PaymentMethodCashRequest != nil { return obj.PaymentMethodCashRequest } @@ -136,6 +132,10 @@ func (obj *CustomerPaymentMethodsRequest) GetActualInstance() (interface{}) { return obj.PaymentMethodSpeiRequest } + if obj.PaymentMethodTokenRequest != nil { + return obj.PaymentMethodTokenRequest + } + // all schemas are nil return nil } diff --git a/model_customer_payment_methods_response.go b/model_customer_payment_methods_response.go index e63684b..b7896a0 100644 --- a/model_customer_payment_methods_response.go +++ b/model_customer_payment_methods_response.go @@ -28,8 +28,8 @@ type CustomerPaymentMethodsResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []CustomerPaymentMethodsData `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []CustomerPaymentMethodsData `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *CustomerPaymentMethodsResponse) HasNextPageUrl() bool { func (o *CustomerPaymentMethodsResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *CustomerPaymentMethodsResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *CustomerPaymentMethodsResponse) HasPreviousPageUrl() bool { func (o *CustomerPaymentMethodsResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *CustomerPaymentMethodsResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *CustomerPaymentMethodsResponse) SetData(v []CustomerPaymentMethodsData) } func (o CustomerPaymentMethodsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *CustomerPaymentMethodsResponse) UnmarshalJSON(data []byte) (err error) err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableCustomerPaymentMethodsResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_response.go b/model_customer_response.go index 40437cf..e3d97ee 100644 --- a/model_customer_response.go +++ b/model_customer_response.go @@ -27,25 +27,25 @@ type CustomerResponse struct { // Creation date of the object CreatedAt int64 `json:"created_at"` // Custom reference - CustomReference *string `json:"custom_reference,omitempty"` - DefaultFiscalEntityId NullableString `json:"default_fiscal_entity_id,omitempty"` - DefaultShippingContactId *string `json:"default_shipping_contact_id,omitempty"` - DefaultPaymentSourceId NullableString `json:"default_payment_source_id,omitempty"` - Email *string `json:"email,omitempty"` - FiscalEntities *CustomerFiscalEntitiesResponse `json:"fiscal_entities,omitempty"` + CustomReference *string `json:"custom_reference,omitempty"` + DefaultFiscalEntityId NullableString `json:"default_fiscal_entity_id,omitempty"` + DefaultShippingContactId *string `json:"default_shipping_contact_id,omitempty"` + DefaultPaymentSourceId NullableString `json:"default_payment_source_id,omitempty"` + Email *string `json:"email,omitempty"` + FiscalEntities *CustomerFiscalEntitiesResponse `json:"fiscal_entities,omitempty"` // Customer's ID Id string `json:"id"` // true if the object exists in live mode or the value false if the object exists in test mode Livemode bool `json:"livemode"` // Customer's name - Name string `json:"name"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Object string `json:"object"` + Name string `json:"name"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Object string `json:"object"` PaymentSources *CustomerPaymentMethodsResponse `json:"payment_sources,omitempty"` // Customer's phone number - Phone *string `json:"phone,omitempty"` - ShippingContacts *CustomerResponseShippingContacts `json:"shipping_contacts,omitempty"` - Subscription *SubscriptionResponse `json:"subscription,omitempty"` + Phone *string `json:"phone,omitempty"` + ShippingContacts *CustomerResponseShippingContacts `json:"shipping_contacts,omitempty"` + Subscription *SubscriptionResponse `json:"subscription,omitempty"` AdditionalProperties map[string]interface{} } @@ -105,7 +105,6 @@ func (o *CustomerResponse) HasAntifraudInfo() bool { func (o *CustomerResponse) SetAntifraudInfo(v CustomerAntifraudInfoResponse) { o.AntifraudInfo.Set(&v) } - // SetAntifraudInfoNil sets the value for AntifraudInfo to be an explicit nil func (o *CustomerResponse) SetAntifraudInfoNil() { o.AntifraudInfo.Set(nil) @@ -236,7 +235,6 @@ func (o *CustomerResponse) HasDefaultFiscalEntityId() bool { func (o *CustomerResponse) SetDefaultFiscalEntityId(v string) { o.DefaultFiscalEntityId.Set(&v) } - // SetDefaultFiscalEntityIdNil sets the value for DefaultFiscalEntityId to be an explicit nil func (o *CustomerResponse) SetDefaultFiscalEntityIdNil() { o.DefaultFiscalEntityId.Set(nil) @@ -311,7 +309,6 @@ func (o *CustomerResponse) HasDefaultPaymentSourceId() bool { func (o *CustomerResponse) SetDefaultPaymentSourceId(v string) { o.DefaultPaymentSourceId.Set(&v) } - // SetDefaultPaymentSourceIdNil sets the value for DefaultPaymentSourceId to be an explicit nil func (o *CustomerResponse) SetDefaultPaymentSourceIdNil() { o.DefaultPaymentSourceId.Set(nil) @@ -643,7 +640,7 @@ func (o *CustomerResponse) SetSubscription(v SubscriptionResponse) { } func (o CustomerResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -721,10 +718,10 @@ func (o *CustomerResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -802,3 +799,5 @@ func (v *NullableCustomerResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_response_shipping_contacts.go b/model_customer_response_shipping_contacts.go index a05a387..0cd5ca6 100644 --- a/model_customer_response_shipping_contacts.go +++ b/model_customer_response_shipping_contacts.go @@ -24,8 +24,8 @@ type CustomerResponseShippingContacts struct { // Indicates if there are more pages to be requested HasMore bool `json:"has_more"` // Object type, in this case is list - Object string `json:"object"` - Data []CustomerShippingContactsDataResponse `json:"data,omitempty"` + Object string `json:"object"` + Data []CustomerShippingContactsDataResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -131,7 +131,7 @@ func (o *CustomerResponseShippingContacts) SetData(v []CustomerShippingContactsD } func (o CustomerResponseShippingContacts) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -167,10 +167,10 @@ func (o *CustomerResponseShippingContacts) UnmarshalJSON(data []byte) (err error err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -233,3 +233,5 @@ func (v *NullableCustomerResponseShippingContacts) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_shipping_contacts.go b/model_customer_shipping_contacts.go index 713d42e..cb84d0c 100644 --- a/model_customer_shipping_contacts.go +++ b/model_customer_shipping_contacts.go @@ -26,13 +26,13 @@ type CustomerShippingContacts struct { // Name of the person who will receive the order Receiver *string `json:"receiver,omitempty"` // The street names between which the order will be delivered. - BetweenStreets *string `json:"between_streets,omitempty"` - Address CustomerShippingContactsAddress `json:"address"` - ParentId *string `json:"parent_id,omitempty"` - Default NullableBool `json:"default,omitempty"` - Deleted NullableBool `json:"deleted,omitempty"` + BetweenStreets *string `json:"between_streets,omitempty"` + Address CustomerShippingContactsAddress `json:"address"` + ParentId *string `json:"parent_id,omitempty"` + Default NullableBool `json:"default,omitempty"` + Deleted NullableBool `json:"deleted,omitempty"` // Metadata associated with the shipping contact - Metadata map[string]interface{} `json:"metadata,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` AdditionalProperties map[string]interface{} } @@ -240,7 +240,6 @@ func (o *CustomerShippingContacts) HasDefault() bool { func (o *CustomerShippingContacts) SetDefault(v bool) { o.Default.Set(&v) } - // SetDefaultNil sets the value for Default to be an explicit nil func (o *CustomerShippingContacts) SetDefaultNil() { o.Default.Set(nil) @@ -283,7 +282,6 @@ func (o *CustomerShippingContacts) HasDeleted() bool { func (o *CustomerShippingContacts) SetDeleted(v bool) { o.Deleted.Set(&v) } - // SetDeletedNil sets the value for Deleted to be an explicit nil func (o *CustomerShippingContacts) SetDeletedNil() { o.Deleted.Set(nil) @@ -327,7 +325,7 @@ func (o *CustomerShippingContacts) SetMetadata(v map[string]interface{}) { } func (o CustomerShippingContacts) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -379,10 +377,10 @@ func (o *CustomerShippingContacts) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -450,3 +448,5 @@ func (v *NullableCustomerShippingContacts) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_shipping_contacts_address.go b/model_customer_shipping_contacts_address.go index 639689c..3ec91bc 100644 --- a/model_customer_shipping_contacts_address.go +++ b/model_customer_shipping_contacts_address.go @@ -20,14 +20,14 @@ var _ MappedNullable = &CustomerShippingContactsAddress{} // CustomerShippingContactsAddress Address of the person who will receive the order type CustomerShippingContactsAddress struct { - Street1 *string `json:"street1,omitempty"` - Street2 *string `json:"street2,omitempty"` + Street1 *string `json:"street1,omitempty"` + Street2 *string `json:"street2,omitempty"` PostalCode *string `json:"postal_code,omitempty"` - City *string `json:"city,omitempty"` - State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` + State *string `json:"state,omitempty"` // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - Country *string `json:"country,omitempty"` - Residential NullableBool `json:"residential,omitempty"` + Country *string `json:"country,omitempty"` + Residential NullableBool `json:"residential,omitempty"` AdditionalProperties map[string]interface{} } @@ -274,7 +274,6 @@ func (o *CustomerShippingContactsAddress) HasResidential() bool { func (o *CustomerShippingContactsAddress) SetResidential(v bool) { o.Residential.Set(&v) } - // SetResidentialNil sets the value for Residential to be an explicit nil func (o *CustomerShippingContactsAddress) SetResidentialNil() { o.Residential.Set(nil) @@ -286,7 +285,7 @@ func (o *CustomerShippingContactsAddress) UnsetResidential() { } func (o CustomerShippingContactsAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -386,3 +385,5 @@ func (v *NullableCustomerShippingContactsAddress) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_shipping_contacts_data_response.go b/model_customer_shipping_contacts_data_response.go index 75ded1a..8f7c2c0 100644 --- a/model_customer_shipping_contacts_data_response.go +++ b/model_customer_shipping_contacts_data_response.go @@ -26,16 +26,16 @@ type CustomerShippingContactsDataResponse struct { // Name of the person who will receive the order Receiver *string `json:"receiver,omitempty"` // The street names between which the order will be delivered. - BetweenStreets *string `json:"between_streets,omitempty"` - Address CustomerShippingContactsAddress `json:"address"` - ParentId *string `json:"parent_id,omitempty"` - Default NullableBool `json:"default,omitempty"` - Deleted NullableBool `json:"deleted,omitempty"` + BetweenStreets *string `json:"between_streets,omitempty"` + Address CustomerShippingContactsAddress `json:"address"` + ParentId *string `json:"parent_id,omitempty"` + Default NullableBool `json:"default,omitempty"` + Deleted NullableBool `json:"deleted,omitempty"` // Metadata associated with the shipping contact - Metadata map[string]interface{} `json:"metadata,omitempty"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` AdditionalProperties map[string]interface{} } @@ -246,7 +246,6 @@ func (o *CustomerShippingContactsDataResponse) HasDefault() bool { func (o *CustomerShippingContactsDataResponse) SetDefault(v bool) { o.Default.Set(&v) } - // SetDefaultNil sets the value for Default to be an explicit nil func (o *CustomerShippingContactsDataResponse) SetDefaultNil() { o.Default.Set(nil) @@ -289,7 +288,6 @@ func (o *CustomerShippingContactsDataResponse) HasDeleted() bool { func (o *CustomerShippingContactsDataResponse) SetDeleted(v bool) { o.Deleted.Set(&v) } - // SetDeletedNil sets the value for Deleted to be an explicit nil func (o *CustomerShippingContactsDataResponse) SetDeletedNil() { o.Deleted.Set(nil) @@ -405,7 +403,7 @@ func (o *CustomerShippingContactsDataResponse) SetCreatedAt(v int64) { } func (o CustomerShippingContactsDataResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -463,10 +461,10 @@ func (o *CustomerShippingContactsDataResponse) UnmarshalJSON(data []byte) (err e err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -537,3 +535,5 @@ func (v *NullableCustomerShippingContactsDataResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_shipping_contacts_response.go b/model_customer_shipping_contacts_response.go index ccfbf6d..54a0532 100644 --- a/model_customer_shipping_contacts_response.go +++ b/model_customer_shipping_contacts_response.go @@ -20,18 +20,18 @@ var _ MappedNullable = &CustomerShippingContactsResponse{} // CustomerShippingContactsResponse Contains the detail of the shipping addresses that the client has active or has used in Conekta type CustomerShippingContactsResponse struct { - Phone *string `json:"phone,omitempty"` - Receiver *string `json:"receiver,omitempty"` - BetweenStreets NullableString `json:"between_streets,omitempty"` - Address *CustomerShippingContactsResponseAddress `json:"address,omitempty"` - ParentId *string `json:"parent_id,omitempty"` - Default *bool `json:"default,omitempty"` - Id *string `json:"id,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` + Phone *string `json:"phone,omitempty"` + Receiver *string `json:"receiver,omitempty"` + BetweenStreets NullableString `json:"between_streets,omitempty"` + Address *CustomerShippingContactsResponseAddress `json:"address,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + Default *bool `json:"default,omitempty"` + Id *string `json:"id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` // Metadata associated with the shipping contact - Metadata map[string]interface{} `json:"metadata,omitempty"` - Object *string `json:"object,omitempty"` - Deleted *bool `json:"deleted,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Object *string `json:"object,omitempty"` + Deleted *bool `json:"deleted,omitempty"` AdditionalProperties map[string]interface{} } @@ -150,7 +150,6 @@ func (o *CustomerShippingContactsResponse) HasBetweenStreets() bool { func (o *CustomerShippingContactsResponse) SetBetweenStreets(v string) { o.BetweenStreets.Set(&v) } - // SetBetweenStreetsNil sets the value for BetweenStreets to be an explicit nil func (o *CustomerShippingContactsResponse) SetBetweenStreetsNil() { o.BetweenStreets.Set(nil) @@ -418,7 +417,7 @@ func (o *CustomerShippingContactsResponse) SetDeleted(v bool) { } func (o CustomerShippingContactsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -534,3 +533,5 @@ func (v *NullableCustomerShippingContactsResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_shipping_contacts_response_address.go b/model_customer_shipping_contacts_response_address.go index 7fc389d..664e02a 100644 --- a/model_customer_shipping_contacts_response_address.go +++ b/model_customer_shipping_contacts_response_address.go @@ -20,14 +20,14 @@ var _ MappedNullable = &CustomerShippingContactsResponseAddress{} // CustomerShippingContactsResponseAddress struct for CustomerShippingContactsResponseAddress type CustomerShippingContactsResponseAddress struct { - Object *string `json:"object,omitempty"` - Street1 *string `json:"street1,omitempty"` - Street2 *string `json:"street2,omitempty"` - PostalCode *string `json:"postal_code,omitempty"` - City *string `json:"city,omitempty"` - State *string `json:"state,omitempty"` - Country *string `json:"country,omitempty"` - Residential NullableBool `json:"residential,omitempty"` + Object *string `json:"object,omitempty"` + Street1 *string `json:"street1,omitempty"` + Street2 *string `json:"street2,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + City *string `json:"city,omitempty"` + State *string `json:"state,omitempty"` + Country *string `json:"country,omitempty"` + Residential NullableBool `json:"residential,omitempty"` AdditionalProperties map[string]interface{} } @@ -306,7 +306,6 @@ func (o *CustomerShippingContactsResponseAddress) HasResidential() bool { func (o *CustomerShippingContactsResponseAddress) SetResidential(v bool) { o.Residential.Set(&v) } - // SetResidentialNil sets the value for Residential to be an explicit nil func (o *CustomerShippingContactsResponseAddress) SetResidentialNil() { o.Residential.Set(nil) @@ -318,7 +317,7 @@ func (o *CustomerShippingContactsResponseAddress) UnsetResidential() { } func (o CustomerShippingContactsResponseAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -422,3 +421,5 @@ func (v *NullableCustomerShippingContactsResponseAddress) UnmarshalJSON(src []by v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_update_fiscal_entities_request.go b/model_customer_update_fiscal_entities_request.go index 1ae6ed0..19aa7d7 100644 --- a/model_customer_update_fiscal_entities_request.go +++ b/model_customer_update_fiscal_entities_request.go @@ -20,12 +20,12 @@ var _ MappedNullable = &CustomerUpdateFiscalEntitiesRequest{} // CustomerUpdateFiscalEntitiesRequest struct for CustomerUpdateFiscalEntitiesRequest type CustomerUpdateFiscalEntitiesRequest struct { - Address *CustomerAddress `json:"address,omitempty"` - TaxId *string `json:"tax_id,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` - CompanyName *string `json:"company_name,omitempty"` + Address *CustomerAddress `json:"address,omitempty"` + TaxId *string `json:"tax_id,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` + CompanyName *string `json:"company_name,omitempty"` AdditionalProperties map[string]interface{} } @@ -241,7 +241,7 @@ func (o *CustomerUpdateFiscalEntitiesRequest) SetCompanyName(v string) { } func (o CustomerUpdateFiscalEntitiesRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -337,3 +337,5 @@ func (v *NullableCustomerUpdateFiscalEntitiesRequest) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customer_update_shipping_contacts.go b/model_customer_update_shipping_contacts.go index 0aab0e6..b3c8305 100644 --- a/model_customer_update_shipping_contacts.go +++ b/model_customer_update_shipping_contacts.go @@ -25,11 +25,11 @@ type CustomerUpdateShippingContacts struct { // Name of the person who will receive the order Receiver *string `json:"receiver,omitempty"` // The street names between which the order will be delivered. - BetweenStreets *string `json:"between_streets,omitempty"` - Address *CustomerShippingContactsAddress `json:"address,omitempty"` - ParentId *string `json:"parent_id,omitempty"` - Default NullableBool `json:"default,omitempty"` - Deleted NullableBool `json:"deleted,omitempty"` + BetweenStreets *string `json:"between_streets,omitempty"` + Address *CustomerShippingContactsAddress `json:"address,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + Default NullableBool `json:"default,omitempty"` + Deleted NullableBool `json:"deleted,omitempty"` AdditionalProperties map[string]interface{} } @@ -244,7 +244,6 @@ func (o *CustomerUpdateShippingContacts) HasDefault() bool { func (o *CustomerUpdateShippingContacts) SetDefault(v bool) { o.Default.Set(&v) } - // SetDefaultNil sets the value for Default to be an explicit nil func (o *CustomerUpdateShippingContacts) SetDefaultNil() { o.Default.Set(nil) @@ -287,7 +286,6 @@ func (o *CustomerUpdateShippingContacts) HasDeleted() bool { func (o *CustomerUpdateShippingContacts) SetDeleted(v bool) { o.Deleted.Set(&v) } - // SetDeletedNil sets the value for Deleted to be an explicit nil func (o *CustomerUpdateShippingContacts) SetDeletedNil() { o.Deleted.Set(nil) @@ -299,7 +297,7 @@ func (o *CustomerUpdateShippingContacts) UnsetDeleted() { } func (o CustomerUpdateShippingContacts) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -399,3 +397,5 @@ func (v *NullableCustomerUpdateShippingContacts) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_customers_response.go b/model_customers_response.go index 0bcd293..c59d8e4 100644 --- a/model_customers_response.go +++ b/model_customers_response.go @@ -28,8 +28,8 @@ type CustomersResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []CustomerResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []CustomerResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *CustomersResponse) HasNextPageUrl() bool { func (o *CustomersResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *CustomersResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *CustomersResponse) HasPreviousPageUrl() bool { func (o *CustomersResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *CustomersResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *CustomersResponse) SetData(v []CustomerResponse) { } func (o CustomersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *CustomersResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableCustomersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_delete_api_keys_response.go b/model_delete_api_keys_response.go index b34b148..42e05f9 100644 --- a/model_delete_api_keys_response.go +++ b/model_delete_api_keys_response.go @@ -33,10 +33,10 @@ type DeleteApiKeysResponse struct { // Unique identifier of the api key Id *string `json:"id,omitempty"` // Object name, value is 'api_key' - Object *string `json:"object,omitempty"` - Deleted *bool `json:"deleted,omitempty"` + Object *string `json:"object,omitempty"` + Deleted *bool `json:"deleted,omitempty"` // Indicates if the api key is private or public - Role *string `json:"role,omitempty"` + Role *string `json:"role,omitempty"` AdditionalProperties map[string]interface{} } @@ -348,7 +348,7 @@ func (o *DeleteApiKeysResponse) SetRole(v string) { } func (o DeleteApiKeysResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -456,3 +456,5 @@ func (v *NullableDeleteApiKeysResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_deleted_blacklist_rule_response.go b/model_deleted_blacklist_rule_response.go index d022437..50489f9 100644 --- a/model_deleted_blacklist_rule_response.go +++ b/model_deleted_blacklist_rule_response.go @@ -27,7 +27,7 @@ type DeletedBlacklistRuleResponse struct { // value used for blacklists rule deleted Value *string `json:"value,omitempty"` // use an description for blacklisted rule - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` AdditionalProperties map[string]interface{} } @@ -179,7 +179,7 @@ func (o *DeletedBlacklistRuleResponse) SetDescription(v string) { } func (o DeletedBlacklistRuleResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -267,3 +267,5 @@ func (v *NullableDeletedBlacklistRuleResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_deleted_whitelist_rule_response.go b/model_deleted_whitelist_rule_response.go index 6ac02c5..33f2012 100644 --- a/model_deleted_whitelist_rule_response.go +++ b/model_deleted_whitelist_rule_response.go @@ -27,7 +27,7 @@ type DeletedWhitelistRuleResponse struct { // value used for whitelists rule deleted Value *string `json:"value,omitempty"` // use an description for whitelisted rule - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` AdditionalProperties map[string]interface{} } @@ -179,7 +179,7 @@ func (o *DeletedWhitelistRuleResponse) SetDescription(v string) { } func (o DeletedWhitelistRuleResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -267,3 +267,5 @@ func (v *NullableDeletedWhitelistRuleResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_details.go b/model_details.go index 950281a..7eddc1d 100644 --- a/model_details.go +++ b/model_details.go @@ -20,7 +20,7 @@ var _ MappedNullable = &Details{} // Details struct for Details type Details struct { - Details []DetailsError `json:"details,omitempty"` + Details []DetailsError `json:"details,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,7 +76,7 @@ func (o *Details) SetDetails(v []DetailsError) { } func (o Details) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -152,3 +152,5 @@ func (v *NullableDetails) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_details_error.go b/model_details_error.go index 6b68662..2341be9 100644 --- a/model_details_error.go +++ b/model_details_error.go @@ -20,10 +20,10 @@ var _ MappedNullable = &DetailsError{} // DetailsError struct for DetailsError type DetailsError struct { - Code *string `json:"code,omitempty"` - Param NullableString `json:"param,omitempty"` - Message *string `json:"message,omitempty"` - DebugMessage *string `json:"debug_message,omitempty"` + Code *string `json:"code,omitempty"` + Param NullableString `json:"param,omitempty"` + Message *string `json:"message,omitempty"` + DebugMessage *string `json:"debug_message,omitempty"` AdditionalProperties map[string]interface{} } @@ -110,7 +110,6 @@ func (o *DetailsError) HasParam() bool { func (o *DetailsError) SetParam(v string) { o.Param.Set(&v) } - // SetParamNil sets the value for Param to be an explicit nil func (o *DetailsError) SetParamNil() { o.Param.Set(nil) @@ -186,7 +185,7 @@ func (o *DetailsError) SetDebugMessage(v string) { } func (o DetailsError) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -274,3 +273,5 @@ func (v *NullableDetailsError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_discount_lines_data_response.go b/model_discount_lines_data_response.go index 4f1e7db..e741dea 100644 --- a/model_discount_lines_data_response.go +++ b/model_discount_lines_data_response.go @@ -32,7 +32,7 @@ type DiscountLinesDataResponse struct { // The object name Object string `json:"object"` // The order id - ParentId string `json:"parent_id"` + ParentId string `json:"parent_id"` AdditionalProperties map[string]interface{} } @@ -206,7 +206,7 @@ func (o *DiscountLinesDataResponse) SetParentId(v string) { } func (o DiscountLinesDataResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -247,10 +247,10 @@ func (o *DiscountLinesDataResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -316,3 +316,5 @@ func (v *NullableDiscountLinesDataResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_discount_lines_response.go b/model_discount_lines_response.go index 9c82c27..6693bb3 100644 --- a/model_discount_lines_response.go +++ b/model_discount_lines_response.go @@ -32,7 +32,7 @@ type DiscountLinesResponse struct { // The object name Object string `json:"object"` // The order id - ParentId string `json:"parent_id"` + ParentId string `json:"parent_id"` AdditionalProperties map[string]interface{} } @@ -206,7 +206,7 @@ func (o *DiscountLinesResponse) SetParentId(v string) { } func (o DiscountLinesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -247,10 +247,10 @@ func (o *DiscountLinesResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -316,3 +316,5 @@ func (v *NullableDiscountLinesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_email_checkout_request.go b/model_email_checkout_request.go index 1ea2596..f5511b9 100644 --- a/model_email_checkout_request.go +++ b/model_email_checkout_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &EmailCheckoutRequest{} // EmailCheckoutRequest struct for EmailCheckoutRequest type EmailCheckoutRequest struct { - Email string `json:"email"` + Email string `json:"email"` AdditionalProperties map[string]interface{} } @@ -70,7 +70,7 @@ func (o *EmailCheckoutRequest) SetEmail(v string) { } func (o EmailCheckoutRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -101,10 +101,10 @@ func (o *EmailCheckoutRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -165,3 +165,5 @@ func (v *NullableEmailCheckoutRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_error.go b/model_error.go index 5d386ac..0f34d74 100644 --- a/model_error.go +++ b/model_error.go @@ -22,9 +22,9 @@ var _ MappedNullable = &ModelError{} type ModelError struct { Details []DetailsError `json:"details,omitempty"` // log id - LogId NullableString `json:"log_id,omitempty"` - Type *string `json:"type,omitempty"` - Object *string `json:"object,omitempty"` + LogId NullableString `json:"log_id,omitempty"` + Type *string `json:"type,omitempty"` + Object *string `json:"object,omitempty"` AdditionalProperties map[string]interface{} } @@ -111,7 +111,6 @@ func (o *ModelError) HasLogId() bool { func (o *ModelError) SetLogId(v string) { o.LogId.Set(&v) } - // SetLogIdNil sets the value for LogId to be an explicit nil func (o *ModelError) SetLogIdNil() { o.LogId.Set(nil) @@ -187,7 +186,7 @@ func (o *ModelError) SetObject(v string) { } func (o ModelError) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -275,3 +274,5 @@ func (v *NullableModelError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_event_response.go b/model_event_response.go index 0bd40a3..7b833d7 100644 --- a/model_event_response.go +++ b/model_event_response.go @@ -20,14 +20,14 @@ var _ MappedNullable = &EventResponse{} // EventResponse event model type EventResponse struct { - CreatedAt *int64 `json:"created_at,omitempty"` - Data map[string]interface{} `json:"data,omitempty"` - Id *string `json:"id,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Object *string `json:"object,omitempty"` - Type *string `json:"type,omitempty"` - WebhookLogs []WebhookLog `json:"webhook_logs,omitempty"` - WebhookStatus *string `json:"webhook_status,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` + Id *string `json:"id,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + Object *string `json:"object,omitempty"` + Type *string `json:"type,omitempty"` + WebhookLogs []WebhookLog `json:"webhook_logs,omitempty"` + WebhookStatus *string `json:"webhook_status,omitempty"` AdditionalProperties map[string]interface{} } @@ -307,7 +307,7 @@ func (o *EventResponse) SetWebhookStatus(v string) { } func (o EventResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -411,3 +411,5 @@ func (v *NullableEventResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_events_resend_response.go b/model_events_resend_response.go index 885222b..9123415 100644 --- a/model_events_resend_response.go +++ b/model_events_resend_response.go @@ -20,13 +20,13 @@ var _ MappedNullable = &EventsResendResponse{} // EventsResendResponse event model type EventsResendResponse struct { - FailedAttempts *int32 `json:"failed_attempts,omitempty"` - Id *string `json:"id,omitempty"` - LastAttemptedAt *int32 `json:"last_attempted_at,omitempty"` - LastHttpResponseStatus *int32 `json:"last_http_response_status,omitempty"` - ResponseData map[string]interface{} `json:"response_data,omitempty"` - Url *string `json:"url,omitempty"` - AdditionalProperties map[string]interface{} + FailedAttempts *int32 `json:"failed_attempts,omitempty"` + Id *string `json:"id,omitempty"` + LastAttemptedAt *int32 `json:"last_attempted_at,omitempty"` + LastHttpResponseStatus *int32 `json:"last_http_response_status,omitempty"` + ResponseData map[string]interface{} `json:"response_data,omitempty"` + Url *string `json:"url,omitempty"` + AdditionalProperties map[string]interface{} } type _EventsResendResponse EventsResendResponse @@ -241,7 +241,7 @@ func (o *EventsResendResponse) SetUrl(v string) { } func (o EventsResendResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -337,3 +337,5 @@ func (v *NullableEventsResendResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_fiscal_entity_address.go b/model_fiscal_entity_address.go index ffd907d..28d7e63 100644 --- a/model_fiscal_entity_address.go +++ b/model_fiscal_entity_address.go @@ -34,7 +34,7 @@ type FiscalEntityAddress struct { // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Country string `json:"country"` // External number - ExternalNumber string `json:"external_number"` + ExternalNumber string `json:"external_number"` AdditionalProperties map[string]interface{} } @@ -118,7 +118,6 @@ func (o *FiscalEntityAddress) HasStreet2() bool { func (o *FiscalEntityAddress) SetStreet2(v string) { o.Street2.Set(&v) } - // SetStreet2Nil sets the value for Street2 to be an explicit nil func (o *FiscalEntityAddress) SetStreet2Nil() { o.Street2.Set(nil) @@ -258,7 +257,7 @@ func (o *FiscalEntityAddress) SetExternalNumber(v string) { } func (o FiscalEntityAddress) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -303,10 +302,10 @@ func (o *FiscalEntityAddress) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -373,3 +372,5 @@ func (v *NullableFiscalEntityAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_api_keys_response.go b/model_get_api_keys_response.go index c221a4f..74fad24 100644 --- a/model_get_api_keys_response.go +++ b/model_get_api_keys_response.go @@ -28,8 +28,8 @@ type GetApiKeysResponse struct { // Indicates if there are more pages to be requested HasMore bool `json:"has_more"` // Object type, in this case is list - Object string `json:"object"` - Data []ApiKeyResponse `json:"data,omitempty"` + Object string `json:"object"` + Data []ApiKeyResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -86,7 +86,6 @@ func (o *GetApiKeysResponse) HasNextPageUrl() bool { func (o *GetApiKeysResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetApiKeysResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -129,7 +128,6 @@ func (o *GetApiKeysResponse) HasPreviousPageUrl() bool { func (o *GetApiKeysResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetApiKeysResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetApiKeysResponse) SetData(v []ApiKeyResponse) { } func (o GetApiKeysResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetApiKeysResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetApiKeysResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_charges_response.go b/model_get_charges_response.go index 30a5eb0..0744625 100644 --- a/model_get_charges_response.go +++ b/model_get_charges_response.go @@ -28,8 +28,8 @@ type GetChargesResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []ChargeResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []ChargeResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetChargesResponse) HasNextPageUrl() bool { func (o *GetChargesResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetChargesResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetChargesResponse) HasPreviousPageUrl() bool { func (o *GetChargesResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetChargesResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetChargesResponse) SetData(v []ChargeResponse) { } func (o GetChargesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetChargesResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetChargesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_companies_response.go b/model_get_companies_response.go index 079ad19..f85f010 100644 --- a/model_get_companies_response.go +++ b/model_get_companies_response.go @@ -28,8 +28,8 @@ type GetCompaniesResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []CompanyResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []CompanyResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetCompaniesResponse) HasNextPageUrl() bool { func (o *GetCompaniesResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetCompaniesResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetCompaniesResponse) HasPreviousPageUrl() bool { func (o *GetCompaniesResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetCompaniesResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetCompaniesResponse) SetData(v []CompanyResponse) { } func (o GetCompaniesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetCompaniesResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetCompaniesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_events_response.go b/model_get_events_response.go index e83e7c2..7053fe8 100644 --- a/model_get_events_response.go +++ b/model_get_events_response.go @@ -28,8 +28,8 @@ type GetEventsResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []EventResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []EventResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetEventsResponse) HasNextPageUrl() bool { func (o *GetEventsResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetEventsResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetEventsResponse) HasPreviousPageUrl() bool { func (o *GetEventsResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetEventsResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetEventsResponse) SetData(v []EventResponse) { } func (o GetEventsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetEventsResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetEventsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_order_discount_lines_response.go b/model_get_order_discount_lines_response.go index d69314d..cc7e891 100644 --- a/model_get_order_discount_lines_response.go +++ b/model_get_order_discount_lines_response.go @@ -28,8 +28,8 @@ type GetOrderDiscountLinesResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []DiscountLinesResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []DiscountLinesResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetOrderDiscountLinesResponse) HasNextPageUrl() bool { func (o *GetOrderDiscountLinesResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetOrderDiscountLinesResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetOrderDiscountLinesResponse) HasPreviousPageUrl() bool { func (o *GetOrderDiscountLinesResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetOrderDiscountLinesResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetOrderDiscountLinesResponse) SetData(v []DiscountLinesResponse) { } func (o GetOrderDiscountLinesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetOrderDiscountLinesResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetOrderDiscountLinesResponse) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_orders_response.go b/model_get_orders_response.go index 738e4ab..8b8aafe 100644 --- a/model_get_orders_response.go +++ b/model_get_orders_response.go @@ -29,7 +29,7 @@ type GetOrdersResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` AdditionalProperties map[string]interface{} } @@ -159,7 +159,6 @@ func (o *GetOrdersResponse) HasNextPageUrl() bool { func (o *GetOrdersResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetOrdersResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -202,7 +201,6 @@ func (o *GetOrdersResponse) HasPreviousPageUrl() bool { func (o *GetOrdersResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetOrdersResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -214,7 +212,7 @@ func (o *GetOrdersResponse) UnsetPreviousPageUrl() { } func (o GetOrdersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -255,10 +253,10 @@ func (o *GetOrdersResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -323,3 +321,5 @@ func (v *NullableGetOrdersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_payment_method_response.go b/model_get_payment_method_response.go index d537674..b39c2cd 100644 --- a/model_get_payment_method_response.go +++ b/model_get_payment_method_response.go @@ -28,8 +28,8 @@ type GetPaymentMethodResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []GetCustomerPaymentMethodDataResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []GetCustomerPaymentMethodDataResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetPaymentMethodResponse) HasNextPageUrl() bool { func (o *GetPaymentMethodResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetPaymentMethodResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetPaymentMethodResponse) HasPreviousPageUrl() bool { func (o *GetPaymentMethodResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetPaymentMethodResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetPaymentMethodResponse) SetData(v []GetCustomerPaymentMethodDataRespo } func (o GetPaymentMethodResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetPaymentMethodResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetPaymentMethodResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_plans_response.go b/model_get_plans_response.go index e7abc4f..ab7052e 100644 --- a/model_get_plans_response.go +++ b/model_get_plans_response.go @@ -28,8 +28,8 @@ type GetPlansResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []PlanResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []PlanResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetPlansResponse) HasNextPageUrl() bool { func (o *GetPlansResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetPlansResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetPlansResponse) HasPreviousPageUrl() bool { func (o *GetPlansResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetPlansResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetPlansResponse) SetData(v []PlanResponse) { } func (o GetPlansResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetPlansResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetPlansResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_transactions_response.go b/model_get_transactions_response.go index 663378f..929194e 100644 --- a/model_get_transactions_response.go +++ b/model_get_transactions_response.go @@ -30,7 +30,7 @@ type GetTransactionsResponse struct { // Url of the previous page. PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` // Transactions - Data []TransactionResponse `json:"data,omitempty"` + Data []TransactionResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -135,7 +135,6 @@ func (o *GetTransactionsResponse) HasNextPageUrl() bool { func (o *GetTransactionsResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetTransactionsResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -178,7 +177,6 @@ func (o *GetTransactionsResponse) HasPreviousPageUrl() bool { func (o *GetTransactionsResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetTransactionsResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -222,7 +220,7 @@ func (o *GetTransactionsResponse) SetData(v []TransactionResponse) { } func (o GetTransactionsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,10 +262,10 @@ func (o *GetTransactionsResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -332,3 +330,5 @@ func (v *NullableGetTransactionsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_transfers_response.go b/model_get_transfers_response.go index e7f990f..1538d6d 100644 --- a/model_get_transfers_response.go +++ b/model_get_transfers_response.go @@ -30,7 +30,7 @@ type GetTransfersResponse struct { // Url of the previous page. PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` // Transfers - Data []TransfersResponse `json:"data,omitempty"` + Data []TransfersResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -135,7 +135,6 @@ func (o *GetTransfersResponse) HasNextPageUrl() bool { func (o *GetTransfersResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetTransfersResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -178,7 +177,6 @@ func (o *GetTransfersResponse) HasPreviousPageUrl() bool { func (o *GetTransfersResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetTransfersResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -222,7 +220,7 @@ func (o *GetTransfersResponse) SetData(v []TransfersResponse) { } func (o GetTransfersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -264,10 +262,10 @@ func (o *GetTransfersResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -332,3 +330,5 @@ func (v *NullableGetTransfersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_webhook_keys_response.go b/model_get_webhook_keys_response.go index 7b8393c..19d6729 100644 --- a/model_get_webhook_keys_response.go +++ b/model_get_webhook_keys_response.go @@ -28,8 +28,8 @@ type GetWebhookKeysResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []WebhookKeyResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []WebhookKeyResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetWebhookKeysResponse) HasNextPageUrl() bool { func (o *GetWebhookKeysResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetWebhookKeysResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetWebhookKeysResponse) HasPreviousPageUrl() bool { func (o *GetWebhookKeysResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetWebhookKeysResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetWebhookKeysResponse) SetData(v []WebhookKeyResponse) { } func (o GetWebhookKeysResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetWebhookKeysResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetWebhookKeysResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_get_webhooks_response.go b/model_get_webhooks_response.go index 7e03926..df5f788 100644 --- a/model_get_webhooks_response.go +++ b/model_get_webhooks_response.go @@ -28,8 +28,8 @@ type GetWebhooksResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []WebhookResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []WebhookResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *GetWebhooksResponse) HasNextPageUrl() bool { func (o *GetWebhooksResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *GetWebhooksResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *GetWebhooksResponse) HasPreviousPageUrl() bool { func (o *GetWebhooksResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *GetWebhooksResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *GetWebhooksResponse) SetData(v []WebhookResponse) { } func (o GetWebhooksResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *GetWebhooksResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableGetWebhooksResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_log_response.go b/model_log_response.go index ce18280..6c2d473 100644 --- a/model_log_response.go +++ b/model_log_response.go @@ -21,26 +21,26 @@ var _ MappedNullable = &LogResponse{} // LogResponse log model type LogResponse struct { - CreatedAt int64 `json:"created_at"` - Id string `json:"id"` - IpAddress *string `json:"ip_address,omitempty"` - Livemode bool `json:"livemode"` - LoggableId NullableString `json:"loggable_id,omitempty"` - LoggableType NullableString `json:"loggable_type,omitempty"` - Method *string `json:"method,omitempty"` - OauthTokenId NullableString `json:"oauth_token_id,omitempty"` - QueryString map[string]interface{} `json:"query_string,omitempty"` - Related *string `json:"related,omitempty"` - RequestBody map[string]interface{} `json:"request_body,omitempty"` - RequestHeaders *map[string]string `json:"request_headers,omitempty"` - ResponseBody map[string]interface{} `json:"response_body,omitempty"` - ResponseHeaders *map[string]string `json:"response_headers,omitempty"` - SearchableTags []string `json:"searchable_tags,omitempty"` - Status *string `json:"status,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - Url *string `json:"url,omitempty"` - UserAccountId *string `json:"user_account_id,omitempty"` - Version *string `json:"version,omitempty"` + CreatedAt int64 `json:"created_at"` + Id string `json:"id"` + IpAddress *string `json:"ip_address,omitempty"` + Livemode bool `json:"livemode"` + LoggableId NullableString `json:"loggable_id,omitempty"` + LoggableType NullableString `json:"loggable_type,omitempty"` + Method *string `json:"method,omitempty"` + OauthTokenId NullableString `json:"oauth_token_id,omitempty"` + QueryString map[string]interface{} `json:"query_string,omitempty"` + Related *string `json:"related,omitempty"` + RequestBody map[string]interface{} `json:"request_body,omitempty"` + RequestHeaders *map[string]string `json:"request_headers,omitempty"` + ResponseBody map[string]interface{} `json:"response_body,omitempty"` + ResponseHeaders *map[string]string `json:"response_headers,omitempty"` + SearchableTags []string `json:"searchable_tags,omitempty"` + Status *string `json:"status,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + Url *string `json:"url,omitempty"` + UserAccountId *string `json:"user_account_id,omitempty"` + Version *string `json:"version,omitempty"` AdditionalProperties map[string]interface{} } @@ -202,7 +202,6 @@ func (o *LogResponse) HasLoggableId() bool { func (o *LogResponse) SetLoggableId(v string) { o.LoggableId.Set(&v) } - // SetLoggableIdNil sets the value for LoggableId to be an explicit nil func (o *LogResponse) SetLoggableIdNil() { o.LoggableId.Set(nil) @@ -245,7 +244,6 @@ func (o *LogResponse) HasLoggableType() bool { func (o *LogResponse) SetLoggableType(v string) { o.LoggableType.Set(&v) } - // SetLoggableTypeNil sets the value for LoggableType to be an explicit nil func (o *LogResponse) SetLoggableTypeNil() { o.LoggableType.Set(nil) @@ -320,7 +318,6 @@ func (o *LogResponse) HasOauthTokenId() bool { func (o *LogResponse) SetOauthTokenId(v string) { o.OauthTokenId.Set(&v) } - // SetOauthTokenIdNil sets the value for OauthTokenId to be an explicit nil func (o *LogResponse) SetOauthTokenIdNil() { o.OauthTokenId.Set(nil) @@ -716,7 +713,7 @@ func (o *LogResponse) SetVersion(v string) { } func (o LogResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -802,10 +799,10 @@ func (o *LogResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -885,3 +882,5 @@ func (v *NullableLogResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_logs_response.go b/model_logs_response.go index c9efe23..b61b566 100644 --- a/model_logs_response.go +++ b/model_logs_response.go @@ -29,7 +29,7 @@ type LogsResponse struct { // Url of the previous page. PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` // set to page results. - Data []LogsResponseData `json:"data,omitempty"` + Data []LogsResponseData `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -148,7 +148,6 @@ func (o *LogsResponse) HasNextPageUrl() bool { func (o *LogsResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *LogsResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -191,7 +190,6 @@ func (o *LogsResponse) HasPreviousPageUrl() bool { func (o *LogsResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *LogsResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -236,7 +234,7 @@ func (o *LogsResponse) SetData(v []LogsResponseData) { } func (o LogsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -328,3 +326,5 @@ func (v *NullableLogsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_logs_response_data.go b/model_logs_response_data.go index 235a227..60b9fe1 100644 --- a/model_logs_response_data.go +++ b/model_logs_response_data.go @@ -20,26 +20,26 @@ var _ MappedNullable = &LogsResponseData{} // LogsResponseData struct for LogsResponseData type LogsResponseData struct { - CreatedAt *int64 `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - IpAddress *string `json:"ip_address,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - LoggableId NullableString `json:"loggable_id,omitempty"` - LoggableType NullableString `json:"loggable_type,omitempty"` - Method *string `json:"method,omitempty"` - OauthTokenId NullableString `json:"oauth_token_id,omitempty"` - QueryString map[string]interface{} `json:"query_string,omitempty"` - Related *string `json:"related,omitempty"` - RequestBody map[string]interface{} `json:"request_body,omitempty"` - RequestHeaders *map[string]string `json:"request_headers,omitempty"` - ResponseBody map[string]interface{} `json:"response_body,omitempty"` - ResponseHeaders *map[string]string `json:"response_headers,omitempty"` - SearchableTags []string `json:"searchable_tags,omitempty"` - Status *string `json:"status,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - Url *string `json:"url,omitempty"` - UserAccountId *string `json:"user_account_id,omitempty"` - Version *string `json:"version,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + IpAddress *string `json:"ip_address,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + LoggableId NullableString `json:"loggable_id,omitempty"` + LoggableType NullableString `json:"loggable_type,omitempty"` + Method *string `json:"method,omitempty"` + OauthTokenId NullableString `json:"oauth_token_id,omitempty"` + QueryString map[string]interface{} `json:"query_string,omitempty"` + Related *string `json:"related,omitempty"` + RequestBody map[string]interface{} `json:"request_body,omitempty"` + RequestHeaders *map[string]string `json:"request_headers,omitempty"` + ResponseBody map[string]interface{} `json:"response_body,omitempty"` + ResponseHeaders *map[string]string `json:"response_headers,omitempty"` + SearchableTags []string `json:"searchable_tags,omitempty"` + Status *string `json:"status,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + Url *string `json:"url,omitempty"` + UserAccountId *string `json:"user_account_id,omitempty"` + Version *string `json:"version,omitempty"` AdditionalProperties map[string]interface{} } @@ -222,7 +222,6 @@ func (o *LogsResponseData) HasLoggableId() bool { func (o *LogsResponseData) SetLoggableId(v string) { o.LoggableId.Set(&v) } - // SetLoggableIdNil sets the value for LoggableId to be an explicit nil func (o *LogsResponseData) SetLoggableIdNil() { o.LoggableId.Set(nil) @@ -265,7 +264,6 @@ func (o *LogsResponseData) HasLoggableType() bool { func (o *LogsResponseData) SetLoggableType(v string) { o.LoggableType.Set(&v) } - // SetLoggableTypeNil sets the value for LoggableType to be an explicit nil func (o *LogsResponseData) SetLoggableTypeNil() { o.LoggableType.Set(nil) @@ -340,7 +338,6 @@ func (o *LogsResponseData) HasOauthTokenId() bool { func (o *LogsResponseData) SetOauthTokenId(v string) { o.OauthTokenId.Set(&v) } - // SetOauthTokenIdNil sets the value for OauthTokenId to be an explicit nil func (o *LogsResponseData) SetOauthTokenIdNil() { o.OauthTokenId.Set(nil) @@ -736,7 +733,7 @@ func (o *LogsResponseData) SetVersion(v string) { } func (o LogsResponseData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -888,3 +885,5 @@ func (v *NullableLogsResponseData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_capture_request.go b/model_order_capture_request.go index 92b223a..1433a63 100644 --- a/model_order_capture_request.go +++ b/model_order_capture_request.go @@ -22,7 +22,7 @@ var _ MappedNullable = &OrderCaptureRequest{} // OrderCaptureRequest struct for OrderCaptureRequest type OrderCaptureRequest struct { // Amount to capture - Amount int64 `json:"amount"` + Amount int64 `json:"amount"` AdditionalProperties map[string]interface{} } @@ -71,7 +71,7 @@ func (o *OrderCaptureRequest) SetAmount(v int64) { } func (o OrderCaptureRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -102,10 +102,10 @@ func (o *OrderCaptureRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -166,3 +166,5 @@ func (v *NullableOrderCaptureRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_customer_info_response.go b/model_order_customer_info_response.go index fc59728..2ea85a5 100644 --- a/model_order_customer_info_response.go +++ b/model_order_customer_info_response.go @@ -22,12 +22,12 @@ var _ MappedNullable = &OrderCustomerInfoResponse{} type OrderCustomerInfoResponse struct { // Custom reference CustomerCustomReference NullableString `json:"customer_custom_reference,omitempty"` - Name *string `json:"name,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Corporate *bool `json:"corporate,omitempty"` - Object *string `json:"object,omitempty"` - AdditionalProperties map[string]interface{} + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Corporate *bool `json:"corporate,omitempty"` + Object *string `json:"object,omitempty"` + AdditionalProperties map[string]interface{} } type _OrderCustomerInfoResponse OrderCustomerInfoResponse @@ -85,7 +85,6 @@ func (o *OrderCustomerInfoResponse) HasCustomerCustomReference() bool { func (o *OrderCustomerInfoResponse) SetCustomerCustomReference(v string) { o.CustomerCustomReference.Set(&v) } - // SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil func (o *OrderCustomerInfoResponse) SetCustomerCustomReferenceNil() { o.CustomerCustomReference.Set(nil) @@ -257,7 +256,7 @@ func (o *OrderCustomerInfoResponse) SetObject(v string) { } func (o OrderCustomerInfoResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -353,3 +352,5 @@ func (v *NullableOrderCustomerInfoResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_discount_lines_request.go b/model_order_discount_lines_request.go index 6aff053..1a3e9c0 100644 --- a/model_order_discount_lines_request.go +++ b/model_order_discount_lines_request.go @@ -26,7 +26,7 @@ type OrderDiscountLinesRequest struct { // Discount code. Code string `json:"code"` // It can be 'loyalty', 'campaign', 'coupon' o 'sign' - Type string `json:"type"` + Type string `json:"type"` AdditionalProperties map[string]interface{} } @@ -125,7 +125,7 @@ func (o *OrderDiscountLinesRequest) SetType(v string) { } func (o OrderDiscountLinesRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -160,10 +160,10 @@ func (o *OrderDiscountLinesRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -226,3 +226,5 @@ func (v *NullableOrderDiscountLinesRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_fiscal_entity_address_response.go b/model_order_fiscal_entity_address_response.go index 1608f8e..92b97d5 100644 --- a/model_order_fiscal_entity_address_response.go +++ b/model_order_fiscal_entity_address_response.go @@ -34,8 +34,8 @@ type OrderFiscalEntityAddressResponse struct { // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Country string `json:"country"` // External number - ExternalNumber string `json:"external_number"` - Object *string `json:"object,omitempty"` + ExternalNumber string `json:"external_number"` + Object *string `json:"object,omitempty"` AdditionalProperties map[string]interface{} } @@ -119,7 +119,6 @@ func (o *OrderFiscalEntityAddressResponse) HasStreet2() bool { func (o *OrderFiscalEntityAddressResponse) SetStreet2(v string) { o.Street2.Set(&v) } - // SetStreet2Nil sets the value for Street2 to be an explicit nil func (o *OrderFiscalEntityAddressResponse) SetStreet2Nil() { o.Street2.Set(nil) @@ -291,7 +290,7 @@ func (o *OrderFiscalEntityAddressResponse) SetObject(v string) { } func (o OrderFiscalEntityAddressResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -339,10 +338,10 @@ func (o *OrderFiscalEntityAddressResponse) UnmarshalJSON(data []byte) (err error err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -410,3 +409,5 @@ func (v *NullableOrderFiscalEntityAddressResponse) UnmarshalJSON(src []byte) err v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_fiscal_entity_request.go b/model_order_fiscal_entity_request.go index a16e6b8..d16f789 100644 --- a/model_order_fiscal_entity_request.go +++ b/model_order_fiscal_entity_request.go @@ -31,7 +31,7 @@ type OrderFiscalEntityRequest struct { // Phone of the fiscal entity Phone *string `json:"phone,omitempty"` // Tax ID of the fiscal entity - TaxId NullableString `json:"tax_id,omitempty"` + TaxId NullableString `json:"tax_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -175,7 +175,6 @@ func (o *OrderFiscalEntityRequest) HasName() bool { func (o *OrderFiscalEntityRequest) SetName(v string) { o.Name.Set(&v) } - // SetNameNil sets the value for Name to be an explicit nil func (o *OrderFiscalEntityRequest) SetNameNil() { o.Name.Set(nil) @@ -250,7 +249,6 @@ func (o *OrderFiscalEntityRequest) HasTaxId() bool { func (o *OrderFiscalEntityRequest) SetTaxId(v string) { o.TaxId.Set(&v) } - // SetTaxIdNil sets the value for TaxId to be an explicit nil func (o *OrderFiscalEntityRequest) SetTaxIdNil() { o.TaxId.Set(nil) @@ -262,7 +260,7 @@ func (o *OrderFiscalEntityRequest) UnsetTaxId() { } func (o OrderFiscalEntityRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,10 +306,10 @@ func (o *OrderFiscalEntityRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -377,3 +375,5 @@ func (v *NullableOrderFiscalEntityRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_fiscal_entity_response.go b/model_order_fiscal_entity_response.go index 5b82a12..a9f2cbf 100644 --- a/model_order_fiscal_entity_response.go +++ b/model_order_fiscal_entity_response.go @@ -33,10 +33,10 @@ type OrderFiscalEntityResponse struct { // ID of the fiscal entity Id string `json:"id"` // The time at which the object was created in seconds since the Unix epoch - CreatedAt int64 `json:"created_at"` - Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + Object string `json:"object"` // Phone of the fiscal entity - Phone NullableString `json:"phone,omitempty"` + Phone NullableString `json:"phone,omitempty"` AdditionalProperties map[string]interface{} } @@ -119,7 +119,6 @@ func (o *OrderFiscalEntityResponse) HasEmail() bool { func (o *OrderFiscalEntityResponse) SetEmail(v string) { o.Email.Set(&v) } - // SetEmailNil sets the value for Email to be an explicit nil func (o *OrderFiscalEntityResponse) SetEmailNil() { o.Email.Set(nil) @@ -194,7 +193,6 @@ func (o *OrderFiscalEntityResponse) HasName() bool { func (o *OrderFiscalEntityResponse) SetName(v string) { o.Name.Set(&v) } - // SetNameNil sets the value for Name to be an explicit nil func (o *OrderFiscalEntityResponse) SetNameNil() { o.Name.Set(nil) @@ -237,7 +235,6 @@ func (o *OrderFiscalEntityResponse) HasTaxId() bool { func (o *OrderFiscalEntityResponse) SetTaxId(v string) { o.TaxId.Set(&v) } - // SetTaxIdNil sets the value for TaxId to be an explicit nil func (o *OrderFiscalEntityResponse) SetTaxIdNil() { o.TaxId.Set(nil) @@ -352,7 +349,6 @@ func (o *OrderFiscalEntityResponse) HasPhone() bool { func (o *OrderFiscalEntityResponse) SetPhone(v string) { o.Phone.Set(&v) } - // SetPhoneNil sets the value for Phone to be an explicit nil func (o *OrderFiscalEntityResponse) SetPhoneNil() { o.Phone.Set(nil) @@ -364,7 +360,7 @@ func (o *OrderFiscalEntityResponse) UnsetPhone() { } func (o OrderFiscalEntityResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -416,10 +412,10 @@ func (o *OrderFiscalEntityResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -488,3 +484,5 @@ func (v *NullableOrderFiscalEntityResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_next_action_response.go b/model_order_next_action_response.go index 9e3f7f4..6b95210 100644 --- a/model_order_next_action_response.go +++ b/model_order_next_action_response.go @@ -22,7 +22,7 @@ var _ MappedNullable = &OrderNextActionResponse{} type OrderNextActionResponse struct { RedirectToUrl *OrderNextActionResponseRedirectToUrl `json:"redirect_to_url,omitempty"` // Indicates the type of action to be taken - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` AdditionalProperties map[string]interface{} } @@ -110,7 +110,7 @@ func (o *OrderNextActionResponse) SetType(v string) { } func (o OrderNextActionResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -190,3 +190,5 @@ func (v *NullableOrderNextActionResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_next_action_response_redirect_to_url.go b/model_order_next_action_response_redirect_to_url.go index f847e57..d0f8db0 100644 --- a/model_order_next_action_response_redirect_to_url.go +++ b/model_order_next_action_response_redirect_to_url.go @@ -23,7 +23,7 @@ type OrderNextActionResponseRedirectToUrl struct { // pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. Url *string `json:"url,omitempty"` // Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. - ReturnUrl *string `json:"return_url,omitempty"` + ReturnUrl *string `json:"return_url,omitempty"` AdditionalProperties map[string]interface{} } @@ -111,7 +111,7 @@ func (o *OrderNextActionResponseRedirectToUrl) SetReturnUrl(v string) { } func (o OrderNextActionResponseRedirectToUrl) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -191,3 +191,5 @@ func (v *NullableOrderNextActionResponseRedirectToUrl) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_refund_request.go b/model_order_refund_request.go index 30c8faf..58acf2e 100644 --- a/model_order_refund_request.go +++ b/model_order_refund_request.go @@ -21,9 +21,11 @@ var _ MappedNullable = &OrderRefundRequest{} // OrderRefundRequest struct for OrderRefundRequest type OrderRefundRequest struct { - Amount int32 `json:"amount"` - ExpiresAt NullableInt64 `json:"expires_at,omitempty"` - Reason string `json:"reason"` + // Amount to be refunded in cents + Amount int32 `json:"amount"` + ExpiresAt NullableInt64 `json:"expires_at,omitempty"` + // Reason for the refund + Reason string `json:"reason"` AdditionalProperties map[string]interface{} } @@ -104,7 +106,6 @@ func (o *OrderRefundRequest) HasExpiresAt() bool { func (o *OrderRefundRequest) SetExpiresAt(v int64) { o.ExpiresAt.Set(&v) } - // SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil func (o *OrderRefundRequest) SetExpiresAtNil() { o.ExpiresAt.Set(nil) @@ -140,7 +141,7 @@ func (o *OrderRefundRequest) SetReason(v string) { } func (o OrderRefundRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -176,10 +177,10 @@ func (o *OrderRefundRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -242,3 +243,5 @@ func (v *NullableOrderRefundRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_request.go b/model_order_request.go index 725289e..6e5cd50 100644 --- a/model_order_request.go +++ b/model_order_request.go @@ -22,14 +22,14 @@ var _ MappedNullable = &OrderRequest{} // OrderRequest a order type OrderRequest struct { // List of [charges](https://developers.conekta.com/v2.1.0/reference/orderscreatecharge) that are applied to the order - Charges []ChargeRequest `json:"charges,omitempty"` + Charges []ChargeRequest `json:"charges,omitempty"` Checkout *CheckoutRequest `json:"checkout,omitempty"` // Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) - Currency string `json:"currency"` + Currency string `json:"currency"` CustomerInfo OrderRequestCustomerInfo `json:"customer_info"` // List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. DiscountLines []OrderDiscountLinesRequest `json:"discount_lines,omitempty"` - FiscalEntity *OrderFiscalEntityRequest `json:"fiscal_entity,omitempty"` + FiscalEntity *OrderFiscalEntityRequest `json:"fiscal_entity,omitempty"` // List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. LineItems []Product `json:"line_items"` // Metadata associated with the order @@ -40,15 +40,15 @@ type OrderRequest struct { PreAuthorize *bool `json:"pre_authorize,omitempty"` // Indicates the processing mode for the order, either ecommerce, recurrent or validation. ProcessingMode *string `json:"processing_mode,omitempty"` - // Indicates the redirection callback upon completion of the 3DS2 flow. - ReturnUrl *string `json:"return_url,omitempty"` + // Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter + ReturnUrl *string `json:"return_url,omitempty"` ShippingContact *CustomerShippingContacts `json:"shipping_contact,omitempty"` // List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. ShippingLines []ShippingRequest `json:"shipping_lines,omitempty"` // List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. TaxLines []OrderTaxRequest `json:"tax_lines,omitempty"` // Indicates the 3DS2 mode for the order, either smart or strict. - ThreeDsMode *string `json:"three_ds_mode,omitempty"` + ThreeDsMode *string `json:"three_ds_mode,omitempty"` AdditionalProperties map[string]interface{} } @@ -567,7 +567,7 @@ func (o *OrderRequest) SetThreeDsMode(v string) { } func (o OrderRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -641,10 +641,10 @@ func (o *OrderRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -720,3 +720,5 @@ func (v *NullableOrderRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response.go b/model_order_response.go index faa7721..81315bc 100644 --- a/model_order_response.go +++ b/model_order_response.go @@ -23,34 +23,34 @@ type OrderResponse struct { // The total amount to be collected in cents Amount *int32 `json:"amount,omitempty"` // The total amount refunded in cents - AmountRefunded *int32 `json:"amount_refunded,omitempty"` - Channel *ChargeResponseChannel `json:"channel,omitempty"` - Charges *OrderResponseCharges `json:"charges,omitempty"` - Checkout *OrderResponseCheckout `json:"checkout,omitempty"` + AmountRefunded *int32 `json:"amount_refunded,omitempty"` + Channel *ChargeResponseChannel `json:"channel,omitempty"` + Charges *OrderResponseCharges `json:"charges,omitempty"` + Checkout *OrderResponseCheckout `json:"checkout,omitempty"` // The time at which the object was created in seconds since the Unix epoch CreatedAt *int64 `json:"created_at,omitempty"` // The three-letter ISO 4217 currency code. The currency of the order. - Currency *string `json:"currency,omitempty"` - CustomerInfo *OrderResponseCustomerInfo `json:"customer_info,omitempty"` - DiscountLines *OrderResponseDiscountLines `json:"discount_lines,omitempty"` - FiscalEntity NullableOrderFiscalEntityResponse `json:"fiscal_entity,omitempty"` - Id *string `json:"id,omitempty"` - IsRefundable *bool `json:"is_refundable,omitempty"` - LineItems *OrderResponseProducts `json:"line_items,omitempty"` + Currency *string `json:"currency,omitempty"` + CustomerInfo *OrderResponseCustomerInfo `json:"customer_info,omitempty"` + DiscountLines *OrderResponseDiscountLines `json:"discount_lines,omitempty"` + FiscalEntity NullableOrderFiscalEntityResponse `json:"fiscal_entity,omitempty"` + Id *string `json:"id,omitempty"` + IsRefundable *bool `json:"is_refundable,omitempty"` + LineItems *OrderResponseProducts `json:"line_items,omitempty"` // Whether the object exists in live mode or test mode Livemode *bool `json:"livemode,omitempty"` // Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - Metadata map[string]interface{} `json:"metadata,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` NextAction *OrderNextActionResponse `json:"next_action,omitempty"` // String representing the object’s type. Objects of the same type share the same value. Object *string `json:"object,omitempty"` // The payment status of the order. PaymentStatus *string `json:"payment_status,omitempty"` // Indicates the processing mode for the order, either ecommerce, recurrent or validation. - ProcessingMode *string `json:"processing_mode,omitempty"` + ProcessingMode *string `json:"processing_mode,omitempty"` ShippingContact *OrderResponseShippingContact `json:"shipping_contact,omitempty"` // The time at which the object was last updated in seconds since the Unix epoch - UpdatedAt *int64 `json:"updated_at,omitempty"` + UpdatedAt *int64 `json:"updated_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -393,7 +393,6 @@ func (o *OrderResponse) HasFiscalEntity() bool { func (o *OrderResponse) SetFiscalEntity(v OrderFiscalEntityResponse) { o.FiscalEntity.Set(&v) } - // SetFiscalEntityNil sets the value for FiscalEntity to be an explicit nil func (o *OrderResponse) SetFiscalEntityNil() { o.FiscalEntity.Set(nil) @@ -757,7 +756,7 @@ func (o *OrderResponse) SetUpdatedAt(v int64) { } func (o OrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -913,3 +912,5 @@ func (v *NullableOrderResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response_charges.go b/model_order_response_charges.go index 7ff779a..0c52662 100644 --- a/model_order_response_charges.go +++ b/model_order_response_charges.go @@ -24,8 +24,8 @@ type OrderResponseCharges struct { // Indicates if there are more pages to be requested HasMore bool `json:"has_more"` // Object type, in this case is list - Object string `json:"object"` - Data []ChargesDataResponse `json:"data,omitempty"` + Object string `json:"object"` + Data []ChargesDataResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -131,7 +131,7 @@ func (o *OrderResponseCharges) SetData(v []ChargesDataResponse) { } func (o OrderResponseCharges) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -167,10 +167,10 @@ func (o *OrderResponseCharges) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -233,3 +233,5 @@ func (v *NullableOrderResponseCharges) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response_checkout.go b/model_order_response_checkout.go index 4d91421..56602ed 100644 --- a/model_order_response_checkout.go +++ b/model_order_response_checkout.go @@ -20,34 +20,34 @@ var _ MappedNullable = &OrderResponseCheckout{} // OrderResponseCheckout struct for OrderResponseCheckout type OrderResponseCheckout struct { - AllowedPaymentMethods []string `json:"allowed_payment_methods,omitempty"` - CanNotExpire *bool `json:"can_not_expire,omitempty"` - EmailsSent *int32 `json:"emails_sent,omitempty"` - ExcludeCardNetworks []map[string]interface{} `json:"exclude_card_networks,omitempty"` - ExpiresAt *int64 `json:"expires_at,omitempty"` - FailureUrl *string `json:"failure_url,omitempty"` - Force3dsFlow *bool `json:"force_3ds_flow,omitempty"` - Id *string `json:"id,omitempty"` - IsRedirectOnFailure *bool `json:"is_redirect_on_failure,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` - MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` - Name *string `json:"name,omitempty"` - NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` - Object *string `json:"object,omitempty"` - OnDemandEnabled NullableBool `json:"on_demand_enabled,omitempty"` - PaidPaymentsCount *int32 `json:"paid_payments_count,omitempty"` - Recurrent *bool `json:"recurrent,omitempty"` + AllowedPaymentMethods []string `json:"allowed_payment_methods,omitempty"` + CanNotExpire *bool `json:"can_not_expire,omitempty"` + EmailsSent *int32 `json:"emails_sent,omitempty"` + ExcludeCardNetworks []map[string]interface{} `json:"exclude_card_networks,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + FailureUrl *string `json:"failure_url,omitempty"` + Force3dsFlow *bool `json:"force_3ds_flow,omitempty"` + Id *string `json:"id,omitempty"` + IsRedirectOnFailure *bool `json:"is_redirect_on_failure,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` + MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` + Name *string `json:"name,omitempty"` + NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` + Object *string `json:"object,omitempty"` + OnDemandEnabled NullableBool `json:"on_demand_enabled,omitempty"` + PaidPaymentsCount *int32 `json:"paid_payments_count,omitempty"` + Recurrent *bool `json:"recurrent,omitempty"` // number of seconds to wait before redirecting to the success_url - RedirectionTime NullableInt32 `json:"redirection_time,omitempty"` - Slug *string `json:"slug,omitempty"` - SmsSent *int32 `json:"sms_sent,omitempty"` - SuccessUrl *string `json:"success_url,omitempty"` - StartsAt *int32 `json:"starts_at,omitempty"` - Status *string `json:"status,omitempty"` - Type *string `json:"type,omitempty"` - Url *string `json:"url,omitempty"` + RedirectionTime NullableInt32 `json:"redirection_time,omitempty"` + Slug *string `json:"slug,omitempty"` + SmsSent *int32 `json:"sms_sent,omitempty"` + SuccessUrl *string `json:"success_url,omitempty"` + StartsAt *int32 `json:"starts_at,omitempty"` + Status *string `json:"status,omitempty"` + Type *string `json:"type,omitempty"` + Url *string `json:"url,omitempty"` AdditionalProperties map[string]interface{} } @@ -614,7 +614,6 @@ func (o *OrderResponseCheckout) HasOnDemandEnabled() bool { func (o *OrderResponseCheckout) SetOnDemandEnabled(v bool) { o.OnDemandEnabled.Set(&v) } - // SetOnDemandEnabledNil sets the value for OnDemandEnabled to be an explicit nil func (o *OrderResponseCheckout) SetOnDemandEnabledNil() { o.OnDemandEnabled.Set(nil) @@ -721,7 +720,6 @@ func (o *OrderResponseCheckout) HasRedirectionTime() bool { func (o *OrderResponseCheckout) SetRedirectionTime(v int32) { o.RedirectionTime.Set(&v) } - // SetRedirectionTimeNil sets the value for RedirectionTime to be an explicit nil func (o *OrderResponseCheckout) SetRedirectionTimeNil() { o.RedirectionTime.Set(nil) @@ -957,7 +955,7 @@ func (o *OrderResponseCheckout) SetUrl(v string) { } func (o OrderResponseCheckout) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -1137,3 +1135,5 @@ func (v *NullableOrderResponseCheckout) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response_customer_info.go b/model_order_response_customer_info.go index 97a1866..b26002b 100644 --- a/model_order_response_customer_info.go +++ b/model_order_response_customer_info.go @@ -22,13 +22,13 @@ var _ MappedNullable = &OrderResponseCustomerInfo{} type OrderResponseCustomerInfo struct { // Custom reference CustomerCustomReference NullableString `json:"customer_custom_reference,omitempty"` - Name *string `json:"name,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Corporate *bool `json:"corporate,omitempty"` - Object *string `json:"object,omitempty"` - CustomerId *string `json:"customer_id,omitempty"` - AdditionalProperties map[string]interface{} + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Corporate *bool `json:"corporate,omitempty"` + Object *string `json:"object,omitempty"` + CustomerId *string `json:"customer_id,omitempty"` + AdditionalProperties map[string]interface{} } type _OrderResponseCustomerInfo OrderResponseCustomerInfo @@ -86,7 +86,6 @@ func (o *OrderResponseCustomerInfo) HasCustomerCustomReference() bool { func (o *OrderResponseCustomerInfo) SetCustomerCustomReference(v string) { o.CustomerCustomReference.Set(&v) } - // SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil func (o *OrderResponseCustomerInfo) SetCustomerCustomReferenceNil() { o.CustomerCustomReference.Set(nil) @@ -290,7 +289,7 @@ func (o *OrderResponseCustomerInfo) SetCustomerId(v string) { } func (o OrderResponseCustomerInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -390,3 +389,5 @@ func (v *NullableOrderResponseCustomerInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response_discount_lines.go b/model_order_response_discount_lines.go index 2af2c09..ae282ae 100644 --- a/model_order_response_discount_lines.go +++ b/model_order_response_discount_lines.go @@ -24,8 +24,8 @@ type OrderResponseDiscountLines struct { // Indicates if there are more pages to be requested HasMore bool `json:"has_more"` // Object type, in this case is list - Object string `json:"object"` - Data []DiscountLinesDataResponse `json:"data,omitempty"` + Object string `json:"object"` + Data []DiscountLinesDataResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -131,7 +131,7 @@ func (o *OrderResponseDiscountLines) SetData(v []DiscountLinesDataResponse) { } func (o OrderResponseDiscountLines) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -167,10 +167,10 @@ func (o *OrderResponseDiscountLines) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -233,3 +233,5 @@ func (v *NullableOrderResponseDiscountLines) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response_products.go b/model_order_response_products.go index 47e0fa8..eb5ace1 100644 --- a/model_order_response_products.go +++ b/model_order_response_products.go @@ -28,8 +28,8 @@ type OrderResponseProducts struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []ProductDataResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []ProductDataResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *OrderResponseProducts) HasNextPageUrl() bool { func (o *OrderResponseProducts) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *OrderResponseProducts) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *OrderResponseProducts) HasPreviousPageUrl() bool { func (o *OrderResponseProducts) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *OrderResponseProducts) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *OrderResponseProducts) SetData(v []ProductDataResponse) { } func (o OrderResponseProducts) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *OrderResponseProducts) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableOrderResponseProducts) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_response_shipping_contact.go b/model_order_response_shipping_contact.go index 081880f..ddb0cbc 100644 --- a/model_order_response_shipping_contact.go +++ b/model_order_response_shipping_contact.go @@ -20,18 +20,18 @@ var _ MappedNullable = &OrderResponseShippingContact{} // OrderResponseShippingContact struct for OrderResponseShippingContact type OrderResponseShippingContact struct { - Phone *string `json:"phone,omitempty"` - Receiver *string `json:"receiver,omitempty"` - BetweenStreets NullableString `json:"between_streets,omitempty"` - Address *CustomerShippingContactsResponseAddress `json:"address,omitempty"` - ParentId *string `json:"parent_id,omitempty"` - Default *bool `json:"default,omitempty"` - Id *string `json:"id,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` + Phone *string `json:"phone,omitempty"` + Receiver *string `json:"receiver,omitempty"` + BetweenStreets NullableString `json:"between_streets,omitempty"` + Address *CustomerShippingContactsResponseAddress `json:"address,omitempty"` + ParentId *string `json:"parent_id,omitempty"` + Default *bool `json:"default,omitempty"` + Id *string `json:"id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` // Metadata associated with the shipping contact - Metadata map[string]interface{} `json:"metadata,omitempty"` - Object *string `json:"object,omitempty"` - Deleted *bool `json:"deleted,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Object *string `json:"object,omitempty"` + Deleted *bool `json:"deleted,omitempty"` AdditionalProperties map[string]interface{} } @@ -150,7 +150,6 @@ func (o *OrderResponseShippingContact) HasBetweenStreets() bool { func (o *OrderResponseShippingContact) SetBetweenStreets(v string) { o.BetweenStreets.Set(&v) } - // SetBetweenStreetsNil sets the value for BetweenStreets to be an explicit nil func (o *OrderResponseShippingContact) SetBetweenStreetsNil() { o.BetweenStreets.Set(nil) @@ -418,7 +417,7 @@ func (o *OrderResponseShippingContact) SetDeleted(v bool) { } func (o OrderResponseShippingContact) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -534,3 +533,5 @@ func (v *NullableOrderResponseShippingContact) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_tax_request.go b/model_order_tax_request.go index 4f35e15..e19ae96 100644 --- a/model_order_tax_request.go +++ b/model_order_tax_request.go @@ -24,8 +24,8 @@ type OrderTaxRequest struct { // The amount to be collected for tax in cents Amount int64 `json:"amount"` // description or tax's name - Description string `json:"description"` - Metadata map[string]interface{} `json:"metadata,omitempty"` + Description string `json:"description"` + Metadata map[string]interface{} `json:"metadata,omitempty"` AdditionalProperties map[string]interface{} } @@ -131,7 +131,7 @@ func (o *OrderTaxRequest) SetMetadata(v map[string]interface{}) { } func (o OrderTaxRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -167,10 +167,10 @@ func (o *OrderTaxRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -233,3 +233,5 @@ func (v *NullableOrderTaxRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_update_fiscal_entity_request.go b/model_order_update_fiscal_entity_request.go index 286f6c1..934c174 100644 --- a/model_order_update_fiscal_entity_request.go +++ b/model_order_update_fiscal_entity_request.go @@ -31,7 +31,7 @@ type OrderUpdateFiscalEntityRequest struct { // Phone of the fiscal entity Phone *string `json:"phone,omitempty"` // Tax ID of the fiscal entity - TaxId NullableString `json:"tax_id,omitempty"` + TaxId NullableString `json:"tax_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -143,7 +143,6 @@ func (o *OrderUpdateFiscalEntityRequest) HasName() bool { func (o *OrderUpdateFiscalEntityRequest) SetName(v string) { o.Name.Set(&v) } - // SetNameNil sets the value for Name to be an explicit nil func (o *OrderUpdateFiscalEntityRequest) SetNameNil() { o.Name.Set(nil) @@ -250,7 +249,6 @@ func (o *OrderUpdateFiscalEntityRequest) HasTaxId() bool { func (o *OrderUpdateFiscalEntityRequest) SetTaxId(v string) { o.TaxId.Set(&v) } - // SetTaxIdNil sets the value for TaxId to be an explicit nil func (o *OrderUpdateFiscalEntityRequest) SetTaxIdNil() { o.TaxId.Set(nil) @@ -262,7 +260,7 @@ func (o *OrderUpdateFiscalEntityRequest) UnsetTaxId() { } func (o OrderUpdateFiscalEntityRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -308,10 +306,10 @@ func (o *OrderUpdateFiscalEntityRequest) UnmarshalJSON(data []byte) (err error) err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -377,3 +375,5 @@ func (v *NullableOrderUpdateFiscalEntityRequest) UnmarshalJSON(src []byte) error v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_order_update_request.go b/model_order_update_request.go index 8521f85..ecd0858 100644 --- a/model_order_update_request.go +++ b/model_order_update_request.go @@ -20,23 +20,23 @@ var _ MappedNullable = &OrderUpdateRequest{} // OrderUpdateRequest a order type OrderUpdateRequest struct { - Charges []ChargeRequest `json:"charges,omitempty"` + Charges []ChargeRequest `json:"charges,omitempty"` Checkout *CheckoutRequest `json:"checkout,omitempty"` // Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) - Currency *string `json:"currency,omitempty"` + Currency *string `json:"currency,omitempty"` CustomerInfo *OrderUpdateRequestCustomerInfo `json:"customer_info,omitempty"` // List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. - DiscountLines []OrderDiscountLinesRequest `json:"discount_lines,omitempty"` - FiscalEntity *OrderUpdateFiscalEntityRequest `json:"fiscal_entity,omitempty"` + DiscountLines []OrderDiscountLinesRequest `json:"discount_lines,omitempty"` + FiscalEntity *OrderUpdateFiscalEntityRequest `json:"fiscal_entity,omitempty"` // List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. - LineItems []Product `json:"line_items,omitempty"` - Metadata *map[string]string `json:"metadata,omitempty"` + LineItems []Product `json:"line_items,omitempty"` + Metadata *map[string]string `json:"metadata,omitempty"` // Indicates whether the order charges must be preauthorized - PreAuthorize *bool `json:"pre_authorize,omitempty"` + PreAuthorize *bool `json:"pre_authorize,omitempty"` ShippingContact *CustomerShippingContacts `json:"shipping_contact,omitempty"` // List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. - ShippingLines []ShippingRequest `json:"shipping_lines,omitempty"` - TaxLines []OrderTaxRequest `json:"tax_lines,omitempty"` + ShippingLines []ShippingRequest `json:"shipping_lines,omitempty"` + TaxLines []OrderTaxRequest `json:"tax_lines,omitempty"` AdditionalProperties map[string]interface{} } @@ -448,7 +448,7 @@ func (o *OrderUpdateRequest) SetTaxLines(v []OrderTaxRequest) { } func (o OrderUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -568,3 +568,5 @@ func (v *NullableOrderUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_orders_response.go b/model_orders_response.go index 83843a5..2964d71 100644 --- a/model_orders_response.go +++ b/model_orders_response.go @@ -21,7 +21,7 @@ var _ MappedNullable = &OrdersResponse{} // OrdersResponse struct for OrdersResponse type OrdersResponse struct { - Data []OrderResponse `json:"data"` + Data []OrderResponse `json:"data"` AdditionalProperties map[string]interface{} } @@ -70,7 +70,7 @@ func (o *OrdersResponse) SetData(v []OrderResponse) { } func (o OrdersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -101,10 +101,10 @@ func (o *OrdersResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -165,3 +165,5 @@ func (v *NullableOrdersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_page.go b/model_page.go index 11e7e92..d0d50ab 100644 --- a/model_page.go +++ b/model_page.go @@ -23,7 +23,7 @@ type Page struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` AdditionalProperties map[string]interface{} } @@ -78,7 +78,6 @@ func (o *Page) HasNextPageUrl() bool { func (o *Page) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *Page) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -121,7 +120,6 @@ func (o *Page) HasPreviousPageUrl() bool { func (o *Page) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *Page) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -133,7 +131,7 @@ func (o *Page) UnsetPreviousPageUrl() { } func (o Page) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -213,3 +211,5 @@ func (v *NullablePage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_pagination.go b/model_pagination.go index 3fc2229..b354b0b 100644 --- a/model_pagination.go +++ b/model_pagination.go @@ -24,7 +24,7 @@ type Pagination struct { // Indicates if there are more pages to be requested HasMore bool `json:"has_more"` // Object type, in this case is list - Object string `json:"object"` + Object string `json:"object"` AdditionalProperties map[string]interface{} } @@ -98,7 +98,7 @@ func (o *Pagination) SetObject(v string) { } func (o Pagination) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -131,10 +131,10 @@ func (o *Pagination) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -196,3 +196,5 @@ func (v *NullablePagination) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method.go b/model_payment_method.go index 4025fbd..4773845 100644 --- a/model_payment_method.go +++ b/model_payment_method.go @@ -21,8 +21,8 @@ var _ MappedNullable = &PaymentMethod{} // PaymentMethod struct for PaymentMethod type PaymentMethod struct { - Type *string `json:"type,omitempty"` - Object string `json:"object"` + Type *string `json:"type,omitempty"` + Object string `json:"object"` AdditionalProperties map[string]interface{} } @@ -103,7 +103,7 @@ func (o *PaymentMethod) SetObject(v string) { } func (o PaymentMethod) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -137,10 +137,10 @@ func (o *PaymentMethod) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -202,3 +202,5 @@ func (v *NullablePaymentMethod) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_bank_transfer.go b/model_payment_method_bank_transfer.go index a6a3254..6e108b9 100644 --- a/model_payment_method_bank_transfer.go +++ b/model_payment_method_bank_transfer.go @@ -21,25 +21,26 @@ var _ MappedNullable = &PaymentMethodBankTransfer{} // PaymentMethodBankTransfer struct for PaymentMethodBankTransfer type PaymentMethodBankTransfer struct { - Type *string `json:"type,omitempty"` - Object string `json:"object"` - Bank *string `json:"bank,omitempty"` - Clabe *string `json:"clabe,omitempty"` - Description NullableString `json:"description,omitempty"` - ExecutedAt NullableInt32 `json:"executed_at,omitempty"` - ExpiresAt *int64 `json:"expires_at,omitempty"` - IssuingAccountBank NullableString `json:"issuing_account_bank,omitempty"` - IssuingAccountNumber NullableString `json:"issuing_account_number,omitempty"` - IssuingAccountHolderName NullableString `json:"issuing_account_holder_name,omitempty"` - IssuingAccountTaxId NullableString `json:"issuing_account_tax_id,omitempty"` - PaymentAttempts []interface{} `json:"payment_attempts,omitempty"` + Type *string `json:"type,omitempty"` + Object string `json:"object"` + Bank *string `json:"bank,omitempty"` + Clabe *string `json:"clabe,omitempty"` + Description NullableString `json:"description,omitempty"` + ExecutedAt NullableInt32 `json:"executed_at,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + IssuingAccountBank NullableString `json:"issuing_account_bank,omitempty"` + IssuingAccountNumber NullableString `json:"issuing_account_number,omitempty"` + IssuingAccountHolderName NullableString `json:"issuing_account_holder_name,omitempty"` + IssuingAccountTaxId NullableString `json:"issuing_account_tax_id,omitempty"` + PaymentAttempts []interface{} `json:"payment_attempts,omitempty"` ReceivingAccountHolderName NullableString `json:"receiving_account_holder_name,omitempty"` - ReceivingAccountNumber *string `json:"receiving_account_number,omitempty"` - ReceivingAccountBank *string `json:"receiving_account_bank,omitempty"` - ReceivingAccountTaxId NullableString `json:"receiving_account_tax_id,omitempty"` - ReferenceNumber NullableString `json:"reference_number,omitempty"` - TrackingCode NullableString `json:"tracking_code,omitempty"` - AdditionalProperties map[string]interface{} + ReceivingAccountNumber *string `json:"receiving_account_number,omitempty"` + ReceivingAccountBank *string `json:"receiving_account_bank,omitempty"` + ReceivingAccountTaxId NullableString `json:"receiving_account_tax_id,omitempty"` + ReferenceNumber NullableString `json:"reference_number,omitempty"` + TrackingCode NullableString `json:"tracking_code,omitempty"` + CustomerIpAddress *string `json:"customer_ip_address,omitempty"` + AdditionalProperties map[string]interface{} } type _PaymentMethodBankTransfer PaymentMethodBankTransfer @@ -214,7 +215,6 @@ func (o *PaymentMethodBankTransfer) HasDescription() bool { func (o *PaymentMethodBankTransfer) SetDescription(v string) { o.Description.Set(&v) } - // SetDescriptionNil sets the value for Description to be an explicit nil func (o *PaymentMethodBankTransfer) SetDescriptionNil() { o.Description.Set(nil) @@ -257,7 +257,6 @@ func (o *PaymentMethodBankTransfer) HasExecutedAt() bool { func (o *PaymentMethodBankTransfer) SetExecutedAt(v int32) { o.ExecutedAt.Set(&v) } - // SetExecutedAtNil sets the value for ExecutedAt to be an explicit nil func (o *PaymentMethodBankTransfer) SetExecutedAtNil() { o.ExecutedAt.Set(nil) @@ -332,7 +331,6 @@ func (o *PaymentMethodBankTransfer) HasIssuingAccountBank() bool { func (o *PaymentMethodBankTransfer) SetIssuingAccountBank(v string) { o.IssuingAccountBank.Set(&v) } - // SetIssuingAccountBankNil sets the value for IssuingAccountBank to be an explicit nil func (o *PaymentMethodBankTransfer) SetIssuingAccountBankNil() { o.IssuingAccountBank.Set(nil) @@ -375,7 +373,6 @@ func (o *PaymentMethodBankTransfer) HasIssuingAccountNumber() bool { func (o *PaymentMethodBankTransfer) SetIssuingAccountNumber(v string) { o.IssuingAccountNumber.Set(&v) } - // SetIssuingAccountNumberNil sets the value for IssuingAccountNumber to be an explicit nil func (o *PaymentMethodBankTransfer) SetIssuingAccountNumberNil() { o.IssuingAccountNumber.Set(nil) @@ -418,7 +415,6 @@ func (o *PaymentMethodBankTransfer) HasIssuingAccountHolderName() bool { func (o *PaymentMethodBankTransfer) SetIssuingAccountHolderName(v string) { o.IssuingAccountHolderName.Set(&v) } - // SetIssuingAccountHolderNameNil sets the value for IssuingAccountHolderName to be an explicit nil func (o *PaymentMethodBankTransfer) SetIssuingAccountHolderNameNil() { o.IssuingAccountHolderName.Set(nil) @@ -461,7 +457,6 @@ func (o *PaymentMethodBankTransfer) HasIssuingAccountTaxId() bool { func (o *PaymentMethodBankTransfer) SetIssuingAccountTaxId(v string) { o.IssuingAccountTaxId.Set(&v) } - // SetIssuingAccountTaxIdNil sets the value for IssuingAccountTaxId to be an explicit nil func (o *PaymentMethodBankTransfer) SetIssuingAccountTaxIdNil() { o.IssuingAccountTaxId.Set(nil) @@ -536,7 +531,6 @@ func (o *PaymentMethodBankTransfer) HasReceivingAccountHolderName() bool { func (o *PaymentMethodBankTransfer) SetReceivingAccountHolderName(v string) { o.ReceivingAccountHolderName.Set(&v) } - // SetReceivingAccountHolderNameNil sets the value for ReceivingAccountHolderName to be an explicit nil func (o *PaymentMethodBankTransfer) SetReceivingAccountHolderNameNil() { o.ReceivingAccountHolderName.Set(nil) @@ -643,7 +637,6 @@ func (o *PaymentMethodBankTransfer) HasReceivingAccountTaxId() bool { func (o *PaymentMethodBankTransfer) SetReceivingAccountTaxId(v string) { o.ReceivingAccountTaxId.Set(&v) } - // SetReceivingAccountTaxIdNil sets the value for ReceivingAccountTaxId to be an explicit nil func (o *PaymentMethodBankTransfer) SetReceivingAccountTaxIdNil() { o.ReceivingAccountTaxId.Set(nil) @@ -686,7 +679,6 @@ func (o *PaymentMethodBankTransfer) HasReferenceNumber() bool { func (o *PaymentMethodBankTransfer) SetReferenceNumber(v string) { o.ReferenceNumber.Set(&v) } - // SetReferenceNumberNil sets the value for ReferenceNumber to be an explicit nil func (o *PaymentMethodBankTransfer) SetReferenceNumberNil() { o.ReferenceNumber.Set(nil) @@ -729,7 +721,6 @@ func (o *PaymentMethodBankTransfer) HasTrackingCode() bool { func (o *PaymentMethodBankTransfer) SetTrackingCode(v string) { o.TrackingCode.Set(&v) } - // SetTrackingCodeNil sets the value for TrackingCode to be an explicit nil func (o *PaymentMethodBankTransfer) SetTrackingCodeNil() { o.TrackingCode.Set(nil) @@ -740,8 +731,40 @@ func (o *PaymentMethodBankTransfer) UnsetTrackingCode() { o.TrackingCode.Unset() } +// GetCustomerIpAddress returns the CustomerIpAddress field value if set, zero value otherwise. +func (o *PaymentMethodBankTransfer) GetCustomerIpAddress() string { + if o == nil || IsNil(o.CustomerIpAddress) { + var ret string + return ret + } + return *o.CustomerIpAddress +} + +// GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodBankTransfer) GetCustomerIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.CustomerIpAddress) { + return nil, false + } + return o.CustomerIpAddress, true +} + +// HasCustomerIpAddress returns a boolean if a field has been set. +func (o *PaymentMethodBankTransfer) HasCustomerIpAddress() bool { + if o != nil && !IsNil(o.CustomerIpAddress) { + return true + } + + return false +} + +// SetCustomerIpAddress gets a reference to the given string and assigns it to the CustomerIpAddress field. +func (o *PaymentMethodBankTransfer) SetCustomerIpAddress(v string) { + o.CustomerIpAddress = &v +} + func (o PaymentMethodBankTransfer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -802,6 +825,9 @@ func (o PaymentMethodBankTransfer) ToMap() (map[string]interface{}, error) { if o.TrackingCode.IsSet() { toSerialize["tracking_code"] = o.TrackingCode.Get() } + if !IsNil(o.CustomerIpAddress) { + toSerialize["customer_ip_address"] = o.CustomerIpAddress + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -823,10 +849,10 @@ func (o *PaymentMethodBankTransfer) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -863,6 +889,7 @@ func (o *PaymentMethodBankTransfer) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "receiving_account_tax_id") delete(additionalProperties, "reference_number") delete(additionalProperties, "tracking_code") + delete(additionalProperties, "customer_ip_address") o.AdditionalProperties = additionalProperties } @@ -904,3 +931,5 @@ func (v *NullablePaymentMethodBankTransfer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_card.go b/model_payment_method_card.go index da2e188..afb2c8d 100644 --- a/model_payment_method_card.go +++ b/model_payment_method_card.go @@ -21,20 +21,30 @@ var _ MappedNullable = &PaymentMethodCard{} // PaymentMethodCard struct for PaymentMethodCard type PaymentMethodCard struct { - Type *string `json:"type,omitempty"` - Object string `json:"object"` + Type *string `json:"type,omitempty"` + Object string `json:"object"` + // Account type of the card AccountType *string `json:"account_type,omitempty"` - AuthCode *string `json:"auth_code,omitempty"` - Brand *string `json:"brand,omitempty"` + AuthCode *string `json:"auth_code,omitempty"` + // Brand of the card + Brand *string `json:"brand,omitempty"` // Id sent for recurrent charges. - ContractId *string `json:"contract_id,omitempty"` - Country *string `json:"country,omitempty"` - ExpMonth *string `json:"exp_month,omitempty"` - ExpYear *string `json:"exp_year,omitempty"` - FraudIndicators []interface{} `json:"fraud_indicators,omitempty"` - Issuer *string `json:"issuer,omitempty"` - Last4 *string `json:"last4,omitempty"` - Name *string `json:"name,omitempty"` + ContractId *string `json:"contract_id,omitempty"` + // Country of the card + Country *string `json:"country,omitempty"` + // Expiration month of the card + ExpMonth *string `json:"exp_month,omitempty"` + // Expiration year of the card + ExpYear *string `json:"exp_year,omitempty"` + FraudIndicators []interface{} `json:"fraud_indicators,omitempty"` + // Issuer of the card + Issuer *string `json:"issuer,omitempty"` + // Last 4 digits of the card + Last4 *string `json:"last4,omitempty"` + // Name of the cardholder + Name *string `json:"name,omitempty"` + // Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + CustomerIpAddress *string `json:"customer_ip_address,omitempty"` AdditionalProperties map[string]interface{} } @@ -466,8 +476,40 @@ func (o *PaymentMethodCard) SetName(v string) { o.Name = &v } +// GetCustomerIpAddress returns the CustomerIpAddress field value if set, zero value otherwise. +func (o *PaymentMethodCard) GetCustomerIpAddress() string { + if o == nil || IsNil(o.CustomerIpAddress) { + var ret string + return ret + } + return *o.CustomerIpAddress +} + +// GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodCard) GetCustomerIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.CustomerIpAddress) { + return nil, false + } + return o.CustomerIpAddress, true +} + +// HasCustomerIpAddress returns a boolean if a field has been set. +func (o *PaymentMethodCard) HasCustomerIpAddress() bool { + if o != nil && !IsNil(o.CustomerIpAddress) { + return true + } + + return false +} + +// SetCustomerIpAddress gets a reference to the given string and assigns it to the CustomerIpAddress field. +func (o *PaymentMethodCard) SetCustomerIpAddress(v string) { + o.CustomerIpAddress = &v +} + func (o PaymentMethodCard) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -513,6 +555,9 @@ func (o PaymentMethodCard) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } + if !IsNil(o.CustomerIpAddress) { + toSerialize["customer_ip_address"] = o.CustomerIpAddress + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -534,10 +579,10 @@ func (o *PaymentMethodCard) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -569,6 +614,7 @@ func (o *PaymentMethodCard) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "issuer") delete(additionalProperties, "last4") delete(additionalProperties, "name") + delete(additionalProperties, "customer_ip_address") o.AdditionalProperties = additionalProperties } @@ -610,3 +656,5 @@ func (v *NullablePaymentMethodCard) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_card_request.go b/model_payment_method_card_request.go index 9f35e33..9e691fb 100644 --- a/model_payment_method_card_request.go +++ b/model_payment_method_card_request.go @@ -23,8 +23,18 @@ var _ MappedNullable = &PaymentMethodCardRequest{} type PaymentMethodCardRequest struct { // Type of payment method Type string `json:"type"` - // Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. - TokenId string `json:"token_id"` + // Card security code + Cvc string `json:"cvc"` + // Card expiration month + ExpMonth string `json:"exp_month"` + // Card expiration year + ExpYear string `json:"exp_year"` + // Cardholder name + Name string `json:"name"` + // Card number + Number string `json:"number"` + // Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + CustomerIpAddress *string `json:"customer_ip_address,omitempty"` AdditionalProperties map[string]interface{} } @@ -34,10 +44,14 @@ type _PaymentMethodCardRequest PaymentMethodCardRequest // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPaymentMethodCardRequest(type_ string, tokenId string) *PaymentMethodCardRequest { +func NewPaymentMethodCardRequest(type_ string, cvc string, expMonth string, expYear string, name string, number string) *PaymentMethodCardRequest { this := PaymentMethodCardRequest{} this.Type = type_ - this.TokenId = tokenId + this.Cvc = cvc + this.ExpMonth = expMonth + this.ExpYear = expYear + this.Name = name + this.Number = number return &this } @@ -73,32 +87,160 @@ func (o *PaymentMethodCardRequest) SetType(v string) { o.Type = v } -// GetTokenId returns the TokenId field value -func (o *PaymentMethodCardRequest) GetTokenId() string { +// GetCvc returns the Cvc field value +func (o *PaymentMethodCardRequest) GetCvc() string { if o == nil { var ret string return ret } - return o.TokenId + return o.Cvc } -// GetTokenIdOk returns a tuple with the TokenId field value +// GetCvcOk returns a tuple with the Cvc field value // and a boolean to check if the value has been set. -func (o *PaymentMethodCardRequest) GetTokenIdOk() (*string, bool) { +func (o *PaymentMethodCardRequest) GetCvcOk() (*string, bool) { if o == nil { return nil, false } - return &o.TokenId, true + return &o.Cvc, true } -// SetTokenId sets field value -func (o *PaymentMethodCardRequest) SetTokenId(v string) { - o.TokenId = v +// SetCvc sets field value +func (o *PaymentMethodCardRequest) SetCvc(v string) { + o.Cvc = v +} + +// GetExpMonth returns the ExpMonth field value +func (o *PaymentMethodCardRequest) GetExpMonth() string { + if o == nil { + var ret string + return ret + } + + return o.ExpMonth +} + +// GetExpMonthOk returns a tuple with the ExpMonth field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodCardRequest) GetExpMonthOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExpMonth, true +} + +// SetExpMonth sets field value +func (o *PaymentMethodCardRequest) SetExpMonth(v string) { + o.ExpMonth = v +} + +// GetExpYear returns the ExpYear field value +func (o *PaymentMethodCardRequest) GetExpYear() string { + if o == nil { + var ret string + return ret + } + + return o.ExpYear +} + +// GetExpYearOk returns a tuple with the ExpYear field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodCardRequest) GetExpYearOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExpYear, true +} + +// SetExpYear sets field value +func (o *PaymentMethodCardRequest) SetExpYear(v string) { + o.ExpYear = v +} + +// GetName returns the Name field value +func (o *PaymentMethodCardRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodCardRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PaymentMethodCardRequest) SetName(v string) { + o.Name = v +} + +// GetNumber returns the Number field value +func (o *PaymentMethodCardRequest) GetNumber() string { + if o == nil { + var ret string + return ret + } + + return o.Number +} + +// GetNumberOk returns a tuple with the Number field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodCardRequest) GetNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Number, true +} + +// SetNumber sets field value +func (o *PaymentMethodCardRequest) SetNumber(v string) { + o.Number = v +} + +// GetCustomerIpAddress returns the CustomerIpAddress field value if set, zero value otherwise. +func (o *PaymentMethodCardRequest) GetCustomerIpAddress() string { + if o == nil || IsNil(o.CustomerIpAddress) { + var ret string + return ret + } + return *o.CustomerIpAddress +} + +// GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodCardRequest) GetCustomerIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.CustomerIpAddress) { + return nil, false + } + return o.CustomerIpAddress, true +} + +// HasCustomerIpAddress returns a boolean if a field has been set. +func (o *PaymentMethodCardRequest) HasCustomerIpAddress() bool { + if o != nil && !IsNil(o.CustomerIpAddress) { + return true + } + + return false +} + +// SetCustomerIpAddress gets a reference to the given string and assigns it to the CustomerIpAddress field. +func (o *PaymentMethodCardRequest) SetCustomerIpAddress(v string) { + o.CustomerIpAddress = &v } func (o PaymentMethodCardRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -108,7 +250,14 @@ func (o PaymentMethodCardRequest) MarshalJSON() ([]byte, error) { func (o PaymentMethodCardRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["type"] = o.Type - toSerialize["token_id"] = o.TokenId + toSerialize["cvc"] = o.Cvc + toSerialize["exp_month"] = o.ExpMonth + toSerialize["exp_year"] = o.ExpYear + toSerialize["name"] = o.Name + toSerialize["number"] = o.Number + if !IsNil(o.CustomerIpAddress) { + toSerialize["customer_ip_address"] = o.CustomerIpAddress + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -123,7 +272,11 @@ func (o *PaymentMethodCardRequest) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "type", - "token_id", + "cvc", + "exp_month", + "exp_year", + "name", + "number", } allProperties := make(map[string]interface{}) @@ -131,10 +284,10 @@ func (o *PaymentMethodCardRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -154,7 +307,12 @@ func (o *PaymentMethodCardRequest) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "type") - delete(additionalProperties, "token_id") + delete(additionalProperties, "cvc") + delete(additionalProperties, "exp_month") + delete(additionalProperties, "exp_year") + delete(additionalProperties, "name") + delete(additionalProperties, "number") + delete(additionalProperties, "customer_ip_address") o.AdditionalProperties = additionalProperties } @@ -196,3 +354,5 @@ func (v *NullablePaymentMethodCardRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_card_response.go b/model_payment_method_card_response.go index 8da9d03..d452446 100644 --- a/model_payment_method_card_response.go +++ b/model_payment_method_card_response.go @@ -21,21 +21,21 @@ var _ MappedNullable = &PaymentMethodCardResponse{} // PaymentMethodCardResponse struct for PaymentMethodCardResponse type PaymentMethodCardResponse struct { - Type string `json:"type"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` - Last4 *string `json:"last4,omitempty"` - Bin *string `json:"bin,omitempty"` - CardType *string `json:"card_type,omitempty"` - ExpMonth *string `json:"exp_month,omitempty"` - ExpYear *string `json:"exp_year,omitempty"` - Brand *string `json:"brand,omitempty"` - Name *string `json:"name,omitempty"` - Default *bool `json:"default,omitempty"` - VisibleOnCheckout *bool `json:"visible_on_checkout,omitempty"` - PaymentSourceStatus *string `json:"payment_source_status,omitempty"` + Type string `json:"type"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` + Last4 *string `json:"last4,omitempty"` + Bin *string `json:"bin,omitempty"` + CardType *string `json:"card_type,omitempty"` + ExpMonth *string `json:"exp_month,omitempty"` + ExpYear *string `json:"exp_year,omitempty"` + Brand *string `json:"brand,omitempty"` + Name *string `json:"name,omitempty"` + Default *bool `json:"default,omitempty"` + VisibleOnCheckout *bool `json:"visible_on_checkout,omitempty"` + PaymentSourceStatus *string `json:"payment_source_status,omitempty"` AdditionalProperties map[string]interface{} } @@ -511,7 +511,7 @@ func (o *PaymentMethodCardResponse) SetPaymentSourceStatus(v string) { } func (o PaymentMethodCardResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -581,10 +581,10 @@ func (o *PaymentMethodCardResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -659,3 +659,5 @@ func (v *NullablePaymentMethodCardResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_cash.go b/model_payment_method_cash.go index 02b1a0a..668a9e5 100644 --- a/model_payment_method_cash.go +++ b/model_payment_method_cash.go @@ -21,16 +21,17 @@ var _ MappedNullable = &PaymentMethodCash{} // PaymentMethodCash struct for PaymentMethodCash type PaymentMethodCash struct { - Type *string `json:"type,omitempty"` - Object string `json:"object"` - AuthCode NullableInt32 `json:"auth_code,omitempty"` - CashierId NullableString `json:"cashier_id,omitempty"` - Reference *string `json:"reference,omitempty"` - BarcodeUrl *string `json:"barcode_url,omitempty"` - ExpiresAt *int64 `json:"expires_at,omitempty"` - ServiceName *string `json:"service_name,omitempty"` - Store NullableString `json:"store,omitempty"` - StoreName *string `json:"store_name,omitempty"` + Type *string `json:"type,omitempty"` + Object string `json:"object"` + AuthCode NullableInt32 `json:"auth_code,omitempty"` + CashierId NullableString `json:"cashier_id,omitempty"` + Reference *string `json:"reference,omitempty"` + BarcodeUrl *string `json:"barcode_url,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + ServiceName *string `json:"service_name,omitempty"` + Store NullableString `json:"store,omitempty"` + StoreName *string `json:"store_name,omitempty"` + CustomerIpAddress *string `json:"customer_ip_address,omitempty"` AdditionalProperties map[string]interface{} } @@ -142,7 +143,6 @@ func (o *PaymentMethodCash) HasAuthCode() bool { func (o *PaymentMethodCash) SetAuthCode(v int32) { o.AuthCode.Set(&v) } - // SetAuthCodeNil sets the value for AuthCode to be an explicit nil func (o *PaymentMethodCash) SetAuthCodeNil() { o.AuthCode.Set(nil) @@ -185,7 +185,6 @@ func (o *PaymentMethodCash) HasCashierId() bool { func (o *PaymentMethodCash) SetCashierId(v string) { o.CashierId.Set(&v) } - // SetCashierIdNil sets the value for CashierId to be an explicit nil func (o *PaymentMethodCash) SetCashierIdNil() { o.CashierId.Set(nil) @@ -356,7 +355,6 @@ func (o *PaymentMethodCash) HasStore() bool { func (o *PaymentMethodCash) SetStore(v string) { o.Store.Set(&v) } - // SetStoreNil sets the value for Store to be an explicit nil func (o *PaymentMethodCash) SetStoreNil() { o.Store.Set(nil) @@ -399,8 +397,40 @@ func (o *PaymentMethodCash) SetStoreName(v string) { o.StoreName = &v } +// GetCustomerIpAddress returns the CustomerIpAddress field value if set, zero value otherwise. +func (o *PaymentMethodCash) GetCustomerIpAddress() string { + if o == nil || IsNil(o.CustomerIpAddress) { + var ret string + return ret + } + return *o.CustomerIpAddress +} + +// GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodCash) GetCustomerIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.CustomerIpAddress) { + return nil, false + } + return o.CustomerIpAddress, true +} + +// HasCustomerIpAddress returns a boolean if a field has been set. +func (o *PaymentMethodCash) HasCustomerIpAddress() bool { + if o != nil && !IsNil(o.CustomerIpAddress) { + return true + } + + return false +} + +// SetCustomerIpAddress gets a reference to the given string and assigns it to the CustomerIpAddress field. +func (o *PaymentMethodCash) SetCustomerIpAddress(v string) { + o.CustomerIpAddress = &v +} + func (o PaymentMethodCash) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -437,6 +467,9 @@ func (o PaymentMethodCash) ToMap() (map[string]interface{}, error) { if !IsNil(o.StoreName) { toSerialize["store_name"] = o.StoreName } + if !IsNil(o.CustomerIpAddress) { + toSerialize["customer_ip_address"] = o.CustomerIpAddress + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -458,10 +491,10 @@ func (o *PaymentMethodCash) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -490,6 +523,7 @@ func (o *PaymentMethodCash) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "service_name") delete(additionalProperties, "store") delete(additionalProperties, "store_name") + delete(additionalProperties, "customer_ip_address") o.AdditionalProperties = additionalProperties } @@ -531,3 +565,5 @@ func (v *NullablePaymentMethodCash) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_cash_request.go b/model_payment_method_cash_request.go index 7c1e05c..3e799b1 100644 --- a/model_payment_method_cash_request.go +++ b/model_payment_method_cash_request.go @@ -22,8 +22,8 @@ var _ MappedNullable = &PaymentMethodCashRequest{} // PaymentMethodCashRequest struct for PaymentMethodCashRequest type PaymentMethodCashRequest struct { // Type of payment method - Type string `json:"type"` - ExpiresAt *int64 `json:"expires_at,omitempty"` + Type string `json:"type"` + ExpiresAt *int64 `json:"expires_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -104,7 +104,7 @@ func (o *PaymentMethodCashRequest) SetExpiresAt(v int64) { } func (o PaymentMethodCashRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -138,10 +138,10 @@ func (o *PaymentMethodCashRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -203,3 +203,5 @@ func (v *NullablePaymentMethodCashRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_cash_response.go b/model_payment_method_cash_response.go index f5fb165..5550f4e 100644 --- a/model_payment_method_cash_response.go +++ b/model_payment_method_cash_response.go @@ -21,16 +21,16 @@ var _ MappedNullable = &PaymentMethodCashResponse{} // PaymentMethodCashResponse struct for PaymentMethodCashResponse type PaymentMethodCashResponse struct { - Type string `json:"type"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` - Reference *string `json:"reference,omitempty"` - Barcode *string `json:"barcode,omitempty"` - BarcodeUrl *string `json:"barcode_url,omitempty"` - ExpiresAt *int64 `json:"expires_at,omitempty"` - Provider *string `json:"provider,omitempty"` + Type string `json:"type"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` + Reference *string `json:"reference,omitempty"` + Barcode *string `json:"barcode,omitempty"` + BarcodeUrl *string `json:"barcode_url,omitempty"` + ExpiresAt *int64 `json:"expires_at,omitempty"` + Provider *string `json:"provider,omitempty"` AdditionalProperties map[string]interface{} } @@ -346,7 +346,7 @@ func (o *PaymentMethodCashResponse) SetProvider(v string) { } func (o PaymentMethodCashResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -401,10 +401,10 @@ func (o *PaymentMethodCashResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -474,3 +474,5 @@ func (v *NullablePaymentMethodCashResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_general_request.go b/model_payment_method_general_request.go new file mode 100644 index 0000000..15a0e48 --- /dev/null +++ b/model_payment_method_general_request.go @@ -0,0 +1,434 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the PaymentMethodGeneralRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentMethodGeneralRequest{} + +// PaymentMethodGeneralRequest Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details +type PaymentMethodGeneralRequest struct { + // Method expiration date as unix timestamp + ExpiresAt *int64 `json:"expires_at,omitempty"` + // How many months without interest to apply, it can be 3, 6, 9, 12 or 18 + MonthlyInstallments *int32 `json:"monthly_installments,omitempty"` + // Type of payment method + Type string `json:"type"` + TokenId *string `json:"token_id,omitempty"` + PaymentSourceId *string `json:"payment_source_id,omitempty"` + // Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants + Cvc *string `json:"cvc,omitempty"` + // Optional id sent to indicate the bank contract for recurrent card charges. + ContractId *string `json:"contract_id,omitempty"` + // Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes + CustomerIpAddress *string `json:"customer_ip_address,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaymentMethodGeneralRequest PaymentMethodGeneralRequest + +// NewPaymentMethodGeneralRequest instantiates a new PaymentMethodGeneralRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaymentMethodGeneralRequest(type_ string) *PaymentMethodGeneralRequest { + this := PaymentMethodGeneralRequest{} + this.Type = type_ + return &this +} + +// NewPaymentMethodGeneralRequestWithDefaults instantiates a new PaymentMethodGeneralRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaymentMethodGeneralRequestWithDefaults() *PaymentMethodGeneralRequest { + this := PaymentMethodGeneralRequest{} + return &this +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetExpiresAt() int64 { + if o == nil || IsNil(o.ExpiresAt) { + var ret int64 + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetExpiresAtOk() (*int64, bool) { + if o == nil || IsNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasExpiresAt() bool { + if o != nil && !IsNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field. +func (o *PaymentMethodGeneralRequest) SetExpiresAt(v int64) { + o.ExpiresAt = &v +} + +// GetMonthlyInstallments returns the MonthlyInstallments field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetMonthlyInstallments() int32 { + if o == nil || IsNil(o.MonthlyInstallments) { + var ret int32 + return ret + } + return *o.MonthlyInstallments +} + +// GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetMonthlyInstallmentsOk() (*int32, bool) { + if o == nil || IsNil(o.MonthlyInstallments) { + return nil, false + } + return o.MonthlyInstallments, true +} + +// HasMonthlyInstallments returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasMonthlyInstallments() bool { + if o != nil && !IsNil(o.MonthlyInstallments) { + return true + } + + return false +} + +// SetMonthlyInstallments gets a reference to the given int32 and assigns it to the MonthlyInstallments field. +func (o *PaymentMethodGeneralRequest) SetMonthlyInstallments(v int32) { + o.MonthlyInstallments = &v +} + +// GetType returns the Type field value +func (o *PaymentMethodGeneralRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PaymentMethodGeneralRequest) SetType(v string) { + o.Type = v +} + +// GetTokenId returns the TokenId field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetTokenId() string { + if o == nil || IsNil(o.TokenId) { + var ret string + return ret + } + return *o.TokenId +} + +// GetTokenIdOk returns a tuple with the TokenId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetTokenIdOk() (*string, bool) { + if o == nil || IsNil(o.TokenId) { + return nil, false + } + return o.TokenId, true +} + +// HasTokenId returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasTokenId() bool { + if o != nil && !IsNil(o.TokenId) { + return true + } + + return false +} + +// SetTokenId gets a reference to the given string and assigns it to the TokenId field. +func (o *PaymentMethodGeneralRequest) SetTokenId(v string) { + o.TokenId = &v +} + +// GetPaymentSourceId returns the PaymentSourceId field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetPaymentSourceId() string { + if o == nil || IsNil(o.PaymentSourceId) { + var ret string + return ret + } + return *o.PaymentSourceId +} + +// GetPaymentSourceIdOk returns a tuple with the PaymentSourceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetPaymentSourceIdOk() (*string, bool) { + if o == nil || IsNil(o.PaymentSourceId) { + return nil, false + } + return o.PaymentSourceId, true +} + +// HasPaymentSourceId returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasPaymentSourceId() bool { + if o != nil && !IsNil(o.PaymentSourceId) { + return true + } + + return false +} + +// SetPaymentSourceId gets a reference to the given string and assigns it to the PaymentSourceId field. +func (o *PaymentMethodGeneralRequest) SetPaymentSourceId(v string) { + o.PaymentSourceId = &v +} + +// GetCvc returns the Cvc field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetCvc() string { + if o == nil || IsNil(o.Cvc) { + var ret string + return ret + } + return *o.Cvc +} + +// GetCvcOk returns a tuple with the Cvc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetCvcOk() (*string, bool) { + if o == nil || IsNil(o.Cvc) { + return nil, false + } + return o.Cvc, true +} + +// HasCvc returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasCvc() bool { + if o != nil && !IsNil(o.Cvc) { + return true + } + + return false +} + +// SetCvc gets a reference to the given string and assigns it to the Cvc field. +func (o *PaymentMethodGeneralRequest) SetCvc(v string) { + o.Cvc = &v +} + +// GetContractId returns the ContractId field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetContractId() string { + if o == nil || IsNil(o.ContractId) { + var ret string + return ret + } + return *o.ContractId +} + +// GetContractIdOk returns a tuple with the ContractId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetContractIdOk() (*string, bool) { + if o == nil || IsNil(o.ContractId) { + return nil, false + } + return o.ContractId, true +} + +// HasContractId returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasContractId() bool { + if o != nil && !IsNil(o.ContractId) { + return true + } + + return false +} + +// SetContractId gets a reference to the given string and assigns it to the ContractId field. +func (o *PaymentMethodGeneralRequest) SetContractId(v string) { + o.ContractId = &v +} + +// GetCustomerIpAddress returns the CustomerIpAddress field value if set, zero value otherwise. +func (o *PaymentMethodGeneralRequest) GetCustomerIpAddress() string { + if o == nil || IsNil(o.CustomerIpAddress) { + var ret string + return ret + } + return *o.CustomerIpAddress +} + +// GetCustomerIpAddressOk returns a tuple with the CustomerIpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodGeneralRequest) GetCustomerIpAddressOk() (*string, bool) { + if o == nil || IsNil(o.CustomerIpAddress) { + return nil, false + } + return o.CustomerIpAddress, true +} + +// HasCustomerIpAddress returns a boolean if a field has been set. +func (o *PaymentMethodGeneralRequest) HasCustomerIpAddress() bool { + if o != nil && !IsNil(o.CustomerIpAddress) { + return true + } + + return false +} + +// SetCustomerIpAddress gets a reference to the given string and assigns it to the CustomerIpAddress field. +func (o *PaymentMethodGeneralRequest) SetCustomerIpAddress(v string) { + o.CustomerIpAddress = &v +} + +func (o PaymentMethodGeneralRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethodGeneralRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + if !IsNil(o.MonthlyInstallments) { + toSerialize["monthly_installments"] = o.MonthlyInstallments + } + toSerialize["type"] = o.Type + if !IsNil(o.TokenId) { + toSerialize["token_id"] = o.TokenId + } + if !IsNil(o.PaymentSourceId) { + toSerialize["payment_source_id"] = o.PaymentSourceId + } + if !IsNil(o.Cvc) { + toSerialize["cvc"] = o.Cvc + } + if !IsNil(o.ContractId) { + toSerialize["contract_id"] = o.ContractId + } + if !IsNil(o.CustomerIpAddress) { + toSerialize["customer_ip_address"] = o.CustomerIpAddress + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaymentMethodGeneralRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodGeneralRequest := _PaymentMethodGeneralRequest{} + + err = json.Unmarshal(data, &varPaymentMethodGeneralRequest) + + if err != nil { + return err + } + + *o = PaymentMethodGeneralRequest(varPaymentMethodGeneralRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "expires_at") + delete(additionalProperties, "monthly_installments") + delete(additionalProperties, "type") + delete(additionalProperties, "token_id") + delete(additionalProperties, "payment_source_id") + delete(additionalProperties, "cvc") + delete(additionalProperties, "contract_id") + delete(additionalProperties, "customer_ip_address") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaymentMethodGeneralRequest struct { + value *PaymentMethodGeneralRequest + isSet bool +} + +func (v NullablePaymentMethodGeneralRequest) Get() *PaymentMethodGeneralRequest { + return v.value +} + +func (v *NullablePaymentMethodGeneralRequest) Set(val *PaymentMethodGeneralRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentMethodGeneralRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentMethodGeneralRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentMethodGeneralRequest(val *PaymentMethodGeneralRequest) *NullablePaymentMethodGeneralRequest { + return &NullablePaymentMethodGeneralRequest{value: val, isSet: true} +} + +func (v NullablePaymentMethodGeneralRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentMethodGeneralRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_payment_method_response.go b/model_payment_method_response.go index 2137efe..0073611 100644 --- a/model_payment_method_response.go +++ b/model_payment_method_response.go @@ -21,11 +21,11 @@ var _ MappedNullable = &PaymentMethodResponse{} // PaymentMethodResponse struct for PaymentMethodResponse type PaymentMethodResponse struct { - Type string `json:"type"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` + Type string `json:"type"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -181,7 +181,7 @@ func (o *PaymentMethodResponse) SetParentId(v string) { } func (o PaymentMethodResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -221,10 +221,10 @@ func (o *PaymentMethodResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -289,3 +289,5 @@ func (v *NullablePaymentMethodResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_spei_recurrent.go b/model_payment_method_spei_recurrent.go index fc0c0f2..ed00a3d 100644 --- a/model_payment_method_spei_recurrent.go +++ b/model_payment_method_spei_recurrent.go @@ -21,13 +21,13 @@ var _ MappedNullable = &PaymentMethodSpeiRecurrent{} // PaymentMethodSpeiRecurrent struct for PaymentMethodSpeiRecurrent type PaymentMethodSpeiRecurrent struct { - Type string `json:"type"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` - Reference *string `json:"reference,omitempty"` - ExpiresAt *string `json:"expires_at,omitempty"` + Type string `json:"type"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` + Reference *string `json:"reference,omitempty"` + ExpiresAt *string `json:"expires_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -247,7 +247,7 @@ func (o *PaymentMethodSpeiRecurrent) SetExpiresAt(v string) { } func (o PaymentMethodSpeiRecurrent) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -293,10 +293,10 @@ func (o *PaymentMethodSpeiRecurrent) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -363,3 +363,5 @@ func (v *NullablePaymentMethodSpeiRecurrent) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_spei_request.go b/model_payment_method_spei_request.go index d48e381..cfaae0b 100644 --- a/model_payment_method_spei_request.go +++ b/model_payment_method_spei_request.go @@ -22,8 +22,8 @@ var _ MappedNullable = &PaymentMethodSpeiRequest{} // PaymentMethodSpeiRequest struct for PaymentMethodSpeiRequest type PaymentMethodSpeiRequest struct { // Type of payment method - Type string `json:"type"` - ExpiresAt *int64 `json:"expires_at,omitempty"` + Type string `json:"type"` + ExpiresAt *int64 `json:"expires_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -104,7 +104,7 @@ func (o *PaymentMethodSpeiRequest) SetExpiresAt(v int64) { } func (o PaymentMethodSpeiRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -138,10 +138,10 @@ func (o *PaymentMethodSpeiRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -203,3 +203,5 @@ func (v *NullablePaymentMethodSpeiRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payment_method_token_request.go b/model_payment_method_token_request.go new file mode 100644 index 0000000..c3e963f --- /dev/null +++ b/model_payment_method_token_request.go @@ -0,0 +1,200 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the PaymentMethodTokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentMethodTokenRequest{} + +// PaymentMethodTokenRequest struct for PaymentMethodTokenRequest +type PaymentMethodTokenRequest struct { + // Type of payment method + Type string `json:"type"` + // Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. + TokenId string `json:"token_id"` + AdditionalProperties map[string]interface{} +} + +type _PaymentMethodTokenRequest PaymentMethodTokenRequest + +// NewPaymentMethodTokenRequest instantiates a new PaymentMethodTokenRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaymentMethodTokenRequest(type_ string, tokenId string) *PaymentMethodTokenRequest { + this := PaymentMethodTokenRequest{} + this.Type = type_ + this.TokenId = tokenId + return &this +} + +// NewPaymentMethodTokenRequestWithDefaults instantiates a new PaymentMethodTokenRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaymentMethodTokenRequestWithDefaults() *PaymentMethodTokenRequest { + this := PaymentMethodTokenRequest{} + return &this +} + +// GetType returns the Type field value +func (o *PaymentMethodTokenRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodTokenRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PaymentMethodTokenRequest) SetType(v string) { + o.Type = v +} + +// GetTokenId returns the TokenId field value +func (o *PaymentMethodTokenRequest) GetTokenId() string { + if o == nil { + var ret string + return ret + } + + return o.TokenId +} + +// GetTokenIdOk returns a tuple with the TokenId field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodTokenRequest) GetTokenIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenId, true +} + +// SetTokenId sets field value +func (o *PaymentMethodTokenRequest) SetTokenId(v string) { + o.TokenId = v +} + +func (o PaymentMethodTokenRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethodTokenRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["token_id"] = o.TokenId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaymentMethodTokenRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "token_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodTokenRequest := _PaymentMethodTokenRequest{} + + err = json.Unmarshal(data, &varPaymentMethodTokenRequest) + + if err != nil { + return err + } + + *o = PaymentMethodTokenRequest(varPaymentMethodTokenRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "token_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaymentMethodTokenRequest struct { + value *PaymentMethodTokenRequest + isSet bool +} + +func (v NullablePaymentMethodTokenRequest) Get() *PaymentMethodTokenRequest { + return v.value +} + +func (v *NullablePaymentMethodTokenRequest) Set(val *PaymentMethodTokenRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentMethodTokenRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentMethodTokenRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentMethodTokenRequest(val *PaymentMethodTokenRequest) *NullablePaymentMethodTokenRequest { + return &NullablePaymentMethodTokenRequest{value: val, isSet: true} +} + +func (v NullablePaymentMethodTokenRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentMethodTokenRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_payout.go b/model_payout.go index f694887..db3ec4a 100644 --- a/model_payout.go +++ b/model_payout.go @@ -21,7 +21,7 @@ var _ MappedNullable = &Payout{} // Payout The payout information of the payout order. type Payout struct { - PayoutMethod PayoutMethod `json:"payout_method"` + PayoutMethod PayoutMethod `json:"payout_method"` AdditionalProperties map[string]interface{} } @@ -70,7 +70,7 @@ func (o *Payout) SetPayoutMethod(v PayoutMethod) { } func (o Payout) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -101,10 +101,10 @@ func (o *Payout) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -165,3 +165,5 @@ func (v *NullablePayout) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payout_method.go b/model_payout_method.go index d9bacc4..41696d8 100644 --- a/model_payout_method.go +++ b/model_payout_method.go @@ -22,7 +22,7 @@ var _ MappedNullable = &PayoutMethod{} // PayoutMethod The payout method of the payout order. type PayoutMethod struct { // The type of the payout method. - Type string `json:"type"` + Type string `json:"type"` AdditionalProperties map[string]interface{} } @@ -71,7 +71,7 @@ func (o *PayoutMethod) SetType(v string) { } func (o PayoutMethod) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -102,10 +102,10 @@ func (o *PayoutMethod) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -166,3 +166,5 @@ func (v *NullablePayoutMethod) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payout_order.go b/model_payout_order.go index 8da628a..8cfbfcf 100644 --- a/model_payout_order.go +++ b/model_payout_order.go @@ -26,13 +26,13 @@ type PayoutOrder struct { // The amount of the payout order. Amount int32 `json:"amount"` // The currency in which the payout order is made. - Currency string `json:"currency"` + Currency string `json:"currency"` CustomerInfo CustomerInfoJustCustomerId `json:"customer_info"` // The metadata of the payout order. Metadata map[string]interface{} `json:"metadata,omitempty"` - Payout Payout `json:"payout"` + Payout Payout `json:"payout"` // The reason for the payout order. - Reason string `json:"reason"` + Reason string `json:"reason"` AdditionalProperties map[string]interface{} } @@ -240,7 +240,7 @@ func (o *PayoutOrder) SetReason(v string) { } func (o PayoutOrder) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -284,10 +284,10 @@ func (o *PayoutOrder) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -354,3 +354,5 @@ func (v *NullablePayoutOrder) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payout_order_payouts_item.go b/model_payout_order_payouts_item.go index b8a4226..74e3a63 100644 --- a/model_payout_order_payouts_item.go +++ b/model_payout_order_payouts_item.go @@ -36,7 +36,7 @@ type PayoutOrderPayoutsItem struct { // The id of the payout order. PayoutOrderId *string `json:"payout_order_id,omitempty"` // The status of the payout. - Status *string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -281,7 +281,7 @@ func (o *PayoutOrderPayoutsItem) SetStatus(v string) { } func (o PayoutOrderPayoutsItem) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -329,10 +329,10 @@ func (o *PayoutOrderPayoutsItem) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -400,3 +400,5 @@ func (v *NullablePayoutOrderPayoutsItem) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payout_order_response.go b/model_payout_order_response.go index e2f8bd2..1fc9475 100644 --- a/model_payout_order_response.go +++ b/model_payout_order_response.go @@ -28,7 +28,7 @@ type PayoutOrderResponse struct { // The creation date of the payout order. CreatedAt int64 `json:"created_at"` // The currency in which the payout order is made. - Currency string `json:"currency"` + Currency string `json:"currency"` CustomerInfo PayoutOrderResponseCustomerInfo `json:"customer_info"` // The expiration date of the payout order. ExpiresAt *int64 `json:"expires_at,omitempty"` @@ -47,7 +47,7 @@ type PayoutOrderResponse struct { // The status of the payout order. Status *string `json:"status,omitempty"` // The update date of the payout order. - UpdatedAt int64 `json:"updated_at"` + UpdatedAt int64 `json:"updated_at"` AdditionalProperties map[string]interface{} } @@ -444,7 +444,7 @@ func (o *PayoutOrderResponse) SetUpdatedAt(v int64) { } func (o PayoutOrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -504,10 +504,10 @@ func (o *PayoutOrderResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -581,3 +581,5 @@ func (v *NullablePayoutOrderResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payout_order_response_customer_info.go b/model_payout_order_response_customer_info.go index 6ef8140..397e494 100644 --- a/model_payout_order_response_customer_info.go +++ b/model_payout_order_response_customer_info.go @@ -23,13 +23,13 @@ var _ MappedNullable = &PayoutOrderResponseCustomerInfo{} type PayoutOrderResponseCustomerInfo struct { // Custom reference CustomerCustomReference NullableString `json:"customer_custom_reference,omitempty"` - Name *string `json:"name,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Corporate *bool `json:"corporate,omitempty"` - Object *string `json:"object,omitempty"` + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Corporate *bool `json:"corporate,omitempty"` + Object *string `json:"object,omitempty"` // The id of the customer. - Id string `json:"id"` + Id string `json:"id"` AdditionalProperties map[string]interface{} } @@ -89,7 +89,6 @@ func (o *PayoutOrderResponseCustomerInfo) HasCustomerCustomReference() bool { func (o *PayoutOrderResponseCustomerInfo) SetCustomerCustomReference(v string) { o.CustomerCustomReference.Set(&v) } - // SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil func (o *PayoutOrderResponseCustomerInfo) SetCustomerCustomReferenceNil() { o.CustomerCustomReference.Set(nil) @@ -285,7 +284,7 @@ func (o *PayoutOrderResponseCustomerInfo) SetId(v string) { } func (o PayoutOrderResponseCustomerInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -334,10 +333,10 @@ func (o *PayoutOrderResponseCustomerInfo) UnmarshalJSON(data []byte) (err error) err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -404,3 +403,5 @@ func (v *NullablePayoutOrderResponseCustomerInfo) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_payout_orders_response.go b/model_payout_orders_response.go index 48da12a..c788aa6 100644 --- a/model_payout_orders_response.go +++ b/model_payout_orders_response.go @@ -28,8 +28,8 @@ type PayoutOrdersResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []PayoutOrderResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []PayoutOrderResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *PayoutOrdersResponse) HasNextPageUrl() bool { func (o *PayoutOrdersResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *PayoutOrdersResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *PayoutOrdersResponse) HasPreviousPageUrl() bool { func (o *PayoutOrdersResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *PayoutOrdersResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *PayoutOrdersResponse) SetData(v []PayoutOrderResponse) { } func (o PayoutOrdersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *PayoutOrdersResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullablePayoutOrdersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_plan_request.go b/model_plan_request.go index 46569d9..b30f9c6 100644 --- a/model_plan_request.go +++ b/model_plan_request.go @@ -36,7 +36,7 @@ type PlanRequest struct { // The name of the plan. Name string `json:"name"` // The number of days the customer will have a free trial. - TrialPeriodDays *int32 `json:"trial_period_days,omitempty"` + TrialPeriodDays *int32 `json:"trial_period_days,omitempty"` AdditionalProperties map[string]interface{} } @@ -288,7 +288,7 @@ func (o *PlanRequest) SetTrialPeriodDays(v int32) { } func (o PlanRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -337,10 +337,10 @@ func (o *PlanRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -408,3 +408,5 @@ func (v *NullablePlanRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_plan_response.go b/model_plan_response.go index 4acd8e3..ea8f8c9 100644 --- a/model_plan_response.go +++ b/model_plan_response.go @@ -20,17 +20,17 @@ var _ MappedNullable = &PlanResponse{} // PlanResponse plans model type PlanResponse struct { - Amount *int32 `json:"amount,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - Currency *string `json:"currency,omitempty"` - ExpiryCount NullableInt32 `json:"expiry_count,omitempty"` - Frequency *int32 `json:"frequency,omitempty"` - Id *string `json:"id,omitempty"` - Interval *string `json:"interval,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Name *string `json:"name,omitempty"` - Object *string `json:"object,omitempty"` - TrialPeriodDays NullableInt32 `json:"trial_period_days,omitempty"` + Amount *int32 `json:"amount,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + Currency *string `json:"currency,omitempty"` + ExpiryCount NullableInt32 `json:"expiry_count,omitempty"` + Frequency *int32 `json:"frequency,omitempty"` + Id *string `json:"id,omitempty"` + Interval *string `json:"interval,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + Name *string `json:"name,omitempty"` + Object *string `json:"object,omitempty"` + TrialPeriodDays NullableInt32 `json:"trial_period_days,omitempty"` AdditionalProperties map[string]interface{} } @@ -181,7 +181,6 @@ func (o *PlanResponse) HasExpiryCount() bool { func (o *PlanResponse) SetExpiryCount(v int32) { o.ExpiryCount.Set(&v) } - // SetExpiryCountNil sets the value for ExpiryCount to be an explicit nil func (o *PlanResponse) SetExpiryCountNil() { o.ExpiryCount.Set(nil) @@ -416,7 +415,6 @@ func (o *PlanResponse) HasTrialPeriodDays() bool { func (o *PlanResponse) SetTrialPeriodDays(v int32) { o.TrialPeriodDays.Set(&v) } - // SetTrialPeriodDaysNil sets the value for TrialPeriodDays to be an explicit nil func (o *PlanResponse) SetTrialPeriodDaysNil() { o.TrialPeriodDays.Set(nil) @@ -428,7 +426,7 @@ func (o *PlanResponse) UnsetTrialPeriodDays() { } func (o PlanResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -544,3 +542,5 @@ func (v *NullablePlanResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_plan_update_request.go b/model_plan_update_request.go index 021149d..577d9e1 100644 --- a/model_plan_update_request.go +++ b/model_plan_update_request.go @@ -27,7 +27,7 @@ type PlanUpdateRequest struct { // Number of repetitions of the frequency NUMBER OF CHARGES TO BE MADE, considering the interval and frequency, this evolves over time, but is subject to the expiration count. ExpiryCount *int32 `json:"expiry_count,omitempty"` // The name of the plan. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` AdditionalProperties map[string]interface{} } @@ -179,7 +179,7 @@ func (o *PlanUpdateRequest) SetName(v string) { } func (o PlanUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -267,3 +267,5 @@ func (v *NullablePlanUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_product.go b/model_product.go index 44f5acf..20c509f 100644 --- a/model_product.go +++ b/model_product.go @@ -37,7 +37,7 @@ type Product struct { // List of tags for the item. It is used to identify the item in the order. Tags []string `json:"tags,omitempty"` // The price of the item in cents. - UnitPrice int32 `json:"unit_price"` + UnitPrice int32 `json:"unit_price"` AdditionalProperties map[string]interface{} } @@ -328,7 +328,7 @@ func (o *Product) SetUnitPrice(v int32) { } func (o Product) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -381,10 +381,10 @@ func (o *Product) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -453,3 +453,5 @@ func (v *NullableProduct) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_product_data_response.go b/model_product_data_response.go index a594a0d..d22e0be 100644 --- a/model_product_data_response.go +++ b/model_product_data_response.go @@ -37,10 +37,10 @@ type ProductDataResponse struct { // List of tags for the item. It is used to identify the item in the order. Tags []string `json:"tags,omitempty"` // The price of the item in cents. - UnitPrice int32 `json:"unit_price"` - Id *string `json:"id,omitempty"` - Object *string `json:"object,omitempty"` - ParentId *string `json:"parent_id,omitempty"` + UnitPrice int32 `json:"unit_price"` + Id *string `json:"id,omitempty"` + Object *string `json:"object,omitempty"` + ParentId *string `json:"parent_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -427,7 +427,7 @@ func (o *ProductDataResponse) SetParentId(v string) { } func (o ProductDataResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -489,10 +489,10 @@ func (o *ProductDataResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -564,3 +564,5 @@ func (v *NullableProductDataResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_product_order_response.go b/model_product_order_response.go index 00d372f..a2c7df7 100644 --- a/model_product_order_response.go +++ b/model_product_order_response.go @@ -37,10 +37,10 @@ type ProductOrderResponse struct { // List of tags for the item. It is used to identify the item in the order. Tags []string `json:"tags,omitempty"` // The price of the item in cents. - UnitPrice int32 `json:"unit_price"` - Id *string `json:"id,omitempty"` - Object *string `json:"object,omitempty"` - ParentId *string `json:"parent_id,omitempty"` + UnitPrice int32 `json:"unit_price"` + Id *string `json:"id,omitempty"` + Object *string `json:"object,omitempty"` + ParentId *string `json:"parent_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -427,7 +427,7 @@ func (o *ProductOrderResponse) SetParentId(v string) { } func (o ProductOrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -489,10 +489,10 @@ func (o *ProductOrderResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -564,3 +564,5 @@ func (v *NullableProductOrderResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_risk_rules_data.go b/model_risk_rules_data.go index 2cddb84..9b6ed26 100644 --- a/model_risk_rules_data.go +++ b/model_risk_rules_data.go @@ -33,7 +33,7 @@ type RiskRulesData struct { // if the rule is test IsTest *bool `json:"is_test,omitempty"` // description of the rule - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` AdditionalProperties map[string]interface{} } @@ -281,7 +281,7 @@ func (o *RiskRulesData) SetDescription(v string) { } func (o RiskRulesData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -381,3 +381,5 @@ func (v *NullableRiskRulesData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_risk_rules_list.go b/model_risk_rules_list.go index 863cd65..7794ca3 100644 --- a/model_risk_rules_list.go +++ b/model_risk_rules_list.go @@ -28,8 +28,8 @@ type RiskRulesList struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []RiskRulesData `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []RiskRulesData `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *RiskRulesList) HasNextPageUrl() bool { func (o *RiskRulesList) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *RiskRulesList) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *RiskRulesList) HasPreviousPageUrl() bool { func (o *RiskRulesList) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *RiskRulesList) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *RiskRulesList) SetData(v []RiskRulesData) { } func (o RiskRulesList) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *RiskRulesList) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableRiskRulesList) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_shipping_order_response.go b/model_shipping_order_response.go index 70e87a1..f3f726a 100644 --- a/model_shipping_order_response.go +++ b/model_shipping_order_response.go @@ -30,10 +30,10 @@ type ShippingOrderResponse struct { // Method of shipment Method *string `json:"method,omitempty"` // Hash where the user can send additional information for each 'shipping'. - Metadata map[string]interface{} `json:"metadata,omitempty"` - Id *string `json:"id,omitempty"` - Object *string `json:"object,omitempty"` - ParentId *string `json:"parent_id,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Id *string `json:"id,omitempty"` + Object *string `json:"object,omitempty"` + ParentId *string `json:"parent_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -306,7 +306,7 @@ func (o *ShippingOrderResponse) SetParentId(v string) { } func (o ShippingOrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -358,10 +358,10 @@ func (o *ShippingOrderResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -429,3 +429,5 @@ func (v *NullableShippingOrderResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_shipping_request.go b/model_shipping_request.go index 02b1c79..fceadb6 100644 --- a/model_shipping_request.go +++ b/model_shipping_request.go @@ -30,7 +30,7 @@ type ShippingRequest struct { // Method of shipment Method *string `json:"method,omitempty"` // Hash where the user can send additional information for each 'shipping'. - Metadata map[string]interface{} `json:"metadata,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` AdditionalProperties map[string]interface{} } @@ -207,7 +207,7 @@ func (o *ShippingRequest) SetMetadata(v map[string]interface{}) { } func (o ShippingRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -250,10 +250,10 @@ func (o *ShippingRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -318,3 +318,5 @@ func (v *NullableShippingRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_sms_checkout_request.go b/model_sms_checkout_request.go index 84a28fe..e76e226 100644 --- a/model_sms_checkout_request.go +++ b/model_sms_checkout_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &SmsCheckoutRequest{} // SmsCheckoutRequest struct for SmsCheckoutRequest type SmsCheckoutRequest struct { - Phonenumber string `json:"phonenumber"` + Phonenumber string `json:"phonenumber"` AdditionalProperties map[string]interface{} } @@ -70,7 +70,7 @@ func (o *SmsCheckoutRequest) SetPhonenumber(v string) { } func (o SmsCheckoutRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -101,10 +101,10 @@ func (o *SmsCheckoutRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -165,3 +165,5 @@ func (v *NullableSmsCheckoutRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_subscription_events_response.go b/model_subscription_events_response.go index 8fe318f..741071f 100644 --- a/model_subscription_events_response.go +++ b/model_subscription_events_response.go @@ -28,8 +28,8 @@ type SubscriptionEventsResponse struct { // URL of the next page. NextPageUrl NullableString `json:"next_page_url,omitempty"` // Url of the previous page. - PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` - Data []EventResponse `json:"data,omitempty"` + PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` + Data []EventResponse `json:"data,omitempty"` AdditionalProperties map[string]interface{} } @@ -134,7 +134,6 @@ func (o *SubscriptionEventsResponse) HasNextPageUrl() bool { func (o *SubscriptionEventsResponse) SetNextPageUrl(v string) { o.NextPageUrl.Set(&v) } - // SetNextPageUrlNil sets the value for NextPageUrl to be an explicit nil func (o *SubscriptionEventsResponse) SetNextPageUrlNil() { o.NextPageUrl.Set(nil) @@ -177,7 +176,6 @@ func (o *SubscriptionEventsResponse) HasPreviousPageUrl() bool { func (o *SubscriptionEventsResponse) SetPreviousPageUrl(v string) { o.PreviousPageUrl.Set(&v) } - // SetPreviousPageUrlNil sets the value for PreviousPageUrl to be an explicit nil func (o *SubscriptionEventsResponse) SetPreviousPageUrlNil() { o.PreviousPageUrl.Set(nil) @@ -221,7 +219,7 @@ func (o *SubscriptionEventsResponse) SetData(v []EventResponse) { } func (o SubscriptionEventsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -263,10 +261,10 @@ func (o *SubscriptionEventsResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -331,3 +329,5 @@ func (v *NullableSubscriptionEventsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_subscription_request.go b/model_subscription_request.go index 7748c7d..4ae2aae 100644 --- a/model_subscription_request.go +++ b/model_subscription_request.go @@ -21,9 +21,9 @@ var _ MappedNullable = &SubscriptionRequest{} // SubscriptionRequest It is a parameter that allows to identify in the response, the detailed content of the plans to which the client has subscribed type SubscriptionRequest struct { - PlanId string `json:"plan_id"` - CardId *string `json:"card_id,omitempty"` - TrialEnd *int32 `json:"trial_end,omitempty"` + PlanId string `json:"plan_id"` + CardId *string `json:"card_id,omitempty"` + TrialEnd *int32 `json:"trial_end,omitempty"` AdditionalProperties map[string]interface{} } @@ -136,7 +136,7 @@ func (o *SubscriptionRequest) SetTrialEnd(v int32) { } func (o SubscriptionRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -173,10 +173,10 @@ func (o *SubscriptionRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -239,3 +239,5 @@ func (v *NullableSubscriptionRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_subscription_response.go b/model_subscription_response.go index c206fb3..511eb76 100644 --- a/model_subscription_response.go +++ b/model_subscription_response.go @@ -20,24 +20,26 @@ var _ MappedNullable = &SubscriptionResponse{} // SubscriptionResponse subscription model type SubscriptionResponse struct { - BillingCycleStart NullableInt64 `json:"billing_cycle_start,omitempty"` - BillingCycleEnd NullableInt64 `json:"billing_cycle_end,omitempty"` - CanceledAt NullableInt64 `json:"canceled_at,omitempty"` - CardId *string `json:"card_id,omitempty"` - ChargeId NullableString `json:"charge_id,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` - CustomerCustomReference *string `json:"customer_custom_reference,omitempty"` - CustomerId *string `json:"customer_id,omitempty"` - Id *string `json:"id,omitempty"` - LastBillingCycleOrderId *string `json:"last_billing_cycle_order_id,omitempty"` - Object *string `json:"object,omitempty"` - PausedAt NullableInt64 `json:"paused_at,omitempty"` - PlanId *string `json:"plan_id,omitempty"` - Status *string `json:"status,omitempty"` - SubscriptionStart *int32 `json:"subscription_start,omitempty"` - TrialStart NullableInt64 `json:"trial_start,omitempty"` - TrialEnd NullableInt64 `json:"trial_end,omitempty"` - AdditionalProperties map[string]interface{} + BillingCycleStart NullableInt64 `json:"billing_cycle_start,omitempty"` + BillingCycleEnd NullableInt64 `json:"billing_cycle_end,omitempty"` + CanceledAt NullableInt64 `json:"canceled_at,omitempty"` + // Reason for cancellation. This field appears when the subscription status is 'canceled'. + CanceledReason *string `json:"canceled_reason,omitempty"` + CardId *string `json:"card_id,omitempty"` + ChargeId NullableString `json:"charge_id,omitempty"` + CreatedAt *int64 `json:"created_at,omitempty"` + CustomerCustomReference *string `json:"customer_custom_reference,omitempty"` + CustomerId *string `json:"customer_id,omitempty"` + Id *string `json:"id,omitempty"` + LastBillingCycleOrderId *string `json:"last_billing_cycle_order_id,omitempty"` + Object *string `json:"object,omitempty"` + PausedAt NullableInt64 `json:"paused_at,omitempty"` + PlanId *string `json:"plan_id,omitempty"` + Status *string `json:"status,omitempty"` + SubscriptionStart *int32 `json:"subscription_start,omitempty"` + TrialStart NullableInt64 `json:"trial_start,omitempty"` + TrialEnd NullableInt64 `json:"trial_end,omitempty"` + AdditionalProperties map[string]interface{} } type _SubscriptionResponse SubscriptionResponse @@ -91,7 +93,6 @@ func (o *SubscriptionResponse) HasBillingCycleStart() bool { func (o *SubscriptionResponse) SetBillingCycleStart(v int64) { o.BillingCycleStart.Set(&v) } - // SetBillingCycleStartNil sets the value for BillingCycleStart to be an explicit nil func (o *SubscriptionResponse) SetBillingCycleStartNil() { o.BillingCycleStart.Set(nil) @@ -134,7 +135,6 @@ func (o *SubscriptionResponse) HasBillingCycleEnd() bool { func (o *SubscriptionResponse) SetBillingCycleEnd(v int64) { o.BillingCycleEnd.Set(&v) } - // SetBillingCycleEndNil sets the value for BillingCycleEnd to be an explicit nil func (o *SubscriptionResponse) SetBillingCycleEndNil() { o.BillingCycleEnd.Set(nil) @@ -177,7 +177,6 @@ func (o *SubscriptionResponse) HasCanceledAt() bool { func (o *SubscriptionResponse) SetCanceledAt(v int64) { o.CanceledAt.Set(&v) } - // SetCanceledAtNil sets the value for CanceledAt to be an explicit nil func (o *SubscriptionResponse) SetCanceledAtNil() { o.CanceledAt.Set(nil) @@ -188,6 +187,38 @@ func (o *SubscriptionResponse) UnsetCanceledAt() { o.CanceledAt.Unset() } +// GetCanceledReason returns the CanceledReason field value if set, zero value otherwise. +func (o *SubscriptionResponse) GetCanceledReason() string { + if o == nil || IsNil(o.CanceledReason) { + var ret string + return ret + } + return *o.CanceledReason +} + +// GetCanceledReasonOk returns a tuple with the CanceledReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubscriptionResponse) GetCanceledReasonOk() (*string, bool) { + if o == nil || IsNil(o.CanceledReason) { + return nil, false + } + return o.CanceledReason, true +} + +// HasCanceledReason returns a boolean if a field has been set. +func (o *SubscriptionResponse) HasCanceledReason() bool { + if o != nil && !IsNil(o.CanceledReason) { + return true + } + + return false +} + +// SetCanceledReason gets a reference to the given string and assigns it to the CanceledReason field. +func (o *SubscriptionResponse) SetCanceledReason(v string) { + o.CanceledReason = &v +} + // GetCardId returns the CardId field value if set, zero value otherwise. func (o *SubscriptionResponse) GetCardId() string { if o == nil || IsNil(o.CardId) { @@ -252,7 +283,6 @@ func (o *SubscriptionResponse) HasChargeId() bool { func (o *SubscriptionResponse) SetChargeId(v string) { o.ChargeId.Set(&v) } - // SetChargeIdNil sets the value for ChargeId to be an explicit nil func (o *SubscriptionResponse) SetChargeIdNil() { o.ChargeId.Set(nil) @@ -487,7 +517,6 @@ func (o *SubscriptionResponse) HasPausedAt() bool { func (o *SubscriptionResponse) SetPausedAt(v int64) { o.PausedAt.Set(&v) } - // SetPausedAtNil sets the value for PausedAt to be an explicit nil func (o *SubscriptionResponse) SetPausedAtNil() { o.PausedAt.Set(nil) @@ -626,7 +655,6 @@ func (o *SubscriptionResponse) HasTrialStart() bool { func (o *SubscriptionResponse) SetTrialStart(v int64) { o.TrialStart.Set(&v) } - // SetTrialStartNil sets the value for TrialStart to be an explicit nil func (o *SubscriptionResponse) SetTrialStartNil() { o.TrialStart.Set(nil) @@ -669,7 +697,6 @@ func (o *SubscriptionResponse) HasTrialEnd() bool { func (o *SubscriptionResponse) SetTrialEnd(v int64) { o.TrialEnd.Set(&v) } - // SetTrialEndNil sets the value for TrialEnd to be an explicit nil func (o *SubscriptionResponse) SetTrialEndNil() { o.TrialEnd.Set(nil) @@ -681,7 +708,7 @@ func (o *SubscriptionResponse) UnsetTrialEnd() { } func (o SubscriptionResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -699,6 +726,9 @@ func (o SubscriptionResponse) ToMap() (map[string]interface{}, error) { if o.CanceledAt.IsSet() { toSerialize["canceled_at"] = o.CanceledAt.Get() } + if !IsNil(o.CanceledReason) { + toSerialize["canceled_reason"] = o.CanceledReason + } if !IsNil(o.CardId) { toSerialize["card_id"] = o.CardId } @@ -766,6 +796,7 @@ func (o *SubscriptionResponse) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "billing_cycle_start") delete(additionalProperties, "billing_cycle_end") delete(additionalProperties, "canceled_at") + delete(additionalProperties, "canceled_reason") delete(additionalProperties, "card_id") delete(additionalProperties, "charge_id") delete(additionalProperties, "created_at") @@ -821,3 +852,5 @@ func (v *NullableSubscriptionResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_subscription_update_request.go b/model_subscription_update_request.go index 2b4aca1..5a5dd96 100644 --- a/model_subscription_update_request.go +++ b/model_subscription_update_request.go @@ -20,9 +20,9 @@ var _ MappedNullable = &SubscriptionUpdateRequest{} // SubscriptionUpdateRequest You can modify the subscription to change the plan used by your customers. type SubscriptionUpdateRequest struct { - PlanId *string `json:"plan_id,omitempty"` - CardId *string `json:"card_id,omitempty"` - TrialEnd *int32 `json:"trial_end,omitempty"` + PlanId *string `json:"plan_id,omitempty"` + CardId *string `json:"card_id,omitempty"` + TrialEnd *int32 `json:"trial_end,omitempty"` AdditionalProperties map[string]interface{} } @@ -142,7 +142,7 @@ func (o *SubscriptionUpdateRequest) SetTrialEnd(v int32) { } func (o SubscriptionUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -226,3 +226,5 @@ func (v *NullableSubscriptionUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_token.go b/model_token.go index 858c815..8733ecf 100644 --- a/model_token.go +++ b/model_token.go @@ -22,7 +22,7 @@ var _ MappedNullable = &Token{} type Token struct { Card NullableTokenCard `json:"card,omitempty"` // Deprecated - Checkout NullableTokenCheckout `json:"checkout,omitempty"` + Checkout NullableTokenCheckout `json:"checkout,omitempty"` AdditionalProperties map[string]interface{} } @@ -77,7 +77,6 @@ func (o *Token) HasCard() bool { func (o *Token) SetCard(v TokenCard) { o.Card.Set(&v) } - // SetCardNil sets the value for Card to be an explicit nil func (o *Token) SetCardNil() { o.Card.Set(nil) @@ -123,7 +122,6 @@ func (o *Token) HasCheckout() bool { func (o *Token) SetCheckout(v TokenCheckout) { o.Checkout.Set(&v) } - // SetCheckoutNil sets the value for Checkout to be an explicit nil func (o *Token) SetCheckoutNil() { o.Checkout.Set(nil) @@ -135,7 +133,7 @@ func (o *Token) UnsetCheckout() { } func (o Token) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -215,3 +213,5 @@ func (v *NullableToken) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_token_card.go b/model_token_card.go index 85729fa..e7f6f39 100644 --- a/model_token_card.go +++ b/model_token_card.go @@ -32,7 +32,7 @@ type TokenCard struct { // It is a value that allows identifying the name of the cardholder. Name string `json:"name"` // It is a value that allows identifying the number of the card. - Number string `json:"number"` + Number string `json:"number"` AdditionalProperties map[string]interface{} } @@ -213,7 +213,7 @@ func (o *TokenCard) SetNumber(v string) { } func (o TokenCard) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -255,10 +255,10 @@ func (o *TokenCard) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -324,3 +324,5 @@ func (v *NullableTokenCard) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_token_checkout.go b/model_token_checkout.go index 2e3b9c5..70a5a0e 100644 --- a/model_token_checkout.go +++ b/model_token_checkout.go @@ -21,7 +21,7 @@ var _ MappedNullable = &TokenCheckout{} // TokenCheckout struct for TokenCheckout type TokenCheckout struct { // It is a value that allows identifying the returns control on. - ReturnsControlOn *string `json:"returns_control_on,omitempty"` + ReturnsControlOn *string `json:"returns_control_on,omitempty"` AdditionalProperties map[string]interface{} } @@ -77,7 +77,7 @@ func (o *TokenCheckout) SetReturnsControlOn(v string) { } func (o TokenCheckout) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -153,3 +153,5 @@ func (v *NullableTokenCheckout) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_token_response.go b/model_token_response.go index 748c0c5..9912d96 100644 --- a/model_token_response.go +++ b/model_token_response.go @@ -30,7 +30,7 @@ type TokenResponse struct { // Indicates the type of object, in this case token Object string `json:"object"` // Indicates if the token has been used - Used bool `json:"used"` + Used bool `json:"used"` AdditionalProperties map[string]interface{} } @@ -92,7 +92,6 @@ func (o *TokenResponse) HasCheckout() bool { func (o *TokenResponse) SetCheckout(v TokenResponseCheckout) { o.Checkout.Set(&v) } - // SetCheckoutNil sets the value for Checkout to be an explicit nil func (o *TokenResponse) SetCheckoutNil() { o.Checkout.Set(nil) @@ -200,7 +199,7 @@ func (o *TokenResponse) SetUsed(v bool) { } func (o TokenResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -240,10 +239,10 @@ func (o *TokenResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -308,3 +307,5 @@ func (v *NullableTokenResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_token_response_checkout.go b/model_token_response_checkout.go index b2abe5d..3e7c19a 100644 --- a/model_token_response_checkout.go +++ b/model_token_response_checkout.go @@ -22,24 +22,24 @@ var _ MappedNullable = &TokenResponseCheckout{} type TokenResponseCheckout struct { AllowedPaymentMethods []string `json:"allowed_payment_methods,omitempty"` // Indicates if the checkout can not expire. - CanNotExpire *bool `json:"can_not_expire,omitempty"` - EmailsSent *int32 `json:"emails_sent,omitempty"` + CanNotExpire *bool `json:"can_not_expire,omitempty"` + EmailsSent *int32 `json:"emails_sent,omitempty"` ExcludeCardNetworks []string `json:"exclude_card_networks,omitempty"` // Date and time when the checkout expires. ExpiresAt *int64 `json:"expires_at,omitempty"` // URL to redirect the customer to if the payment process fails. FailureUrl *string `json:"failure_url,omitempty"` // Indicates if the checkout forces the 3DS flow. - Force3dsFlow *bool `json:"force_3ds_flow,omitempty"` - Id *string `json:"id,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` + Force3dsFlow *bool `json:"force_3ds_flow,omitempty"` + Id *string `json:"id,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` // Indicates if the checkout allows monthly installments. MonthlyInstallmentsEnabled *bool `json:"monthly_installments_enabled,omitempty"` // List of monthly installments options. MonthlyInstallmentsOptions []int32 `json:"monthly_installments_options,omitempty"` - Name *string `json:"name,omitempty"` - NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` + Name *string `json:"name,omitempty"` + NeedsShippingContact *bool `json:"needs_shipping_contact,omitempty"` // Indicates the type of object, in this case checkout. Object *string `json:"object,omitempty"` // Indicates if the checkout allows on demand payments. @@ -47,8 +47,8 @@ type TokenResponseCheckout struct { // Number of payments that have been paid. PaidPaymentsCount *int32 `json:"paid_payments_count,omitempty"` // Indicates if the checkout is recurrent. - Recurrent *bool `json:"recurrent,omitempty"` - SmsSent *int32 `json:"sms_sent,omitempty"` + Recurrent *bool `json:"recurrent,omitempty"` + SmsSent *int32 `json:"sms_sent,omitempty"` // Date and time when the checkout starts. StartsAt *int64 `json:"starts_at,omitempty"` // Status of the checkout. @@ -56,7 +56,7 @@ type TokenResponseCheckout struct { // URL to redirect the customer to after the payment process is completed. SuccessUrl *string `json:"success_url,omitempty"` // Type of checkout. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` AdditionalProperties map[string]interface{} } @@ -816,7 +816,7 @@ func (o *TokenResponseCheckout) SetType(v string) { } func (o TokenResponseCheckout) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -980,3 +980,5 @@ func (v *NullableTokenResponseCheckout) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_transaction_response.go b/model_transaction_response.go index a54abaf..f8b5410 100644 --- a/model_transaction_response.go +++ b/model_transaction_response.go @@ -42,7 +42,7 @@ type TransactionResponse struct { // Code indicating transaction status. Status string `json:"status"` // Transaction Type - Type string `json:"type"` + Type string `json:"type"` AdditionalProperties map[string]interface{} } @@ -341,7 +341,7 @@ func (o *TransactionResponse) SetType(v string) { } func (o TransactionResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -392,10 +392,10 @@ func (o *TransactionResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -466,3 +466,5 @@ func (v *NullableTransactionResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_transfer_destination_response.go b/model_transfer_destination_response.go index b689f5c..458e754 100644 --- a/model_transfer_destination_response.go +++ b/model_transfer_destination_response.go @@ -35,7 +35,7 @@ type TransferDestinationResponse struct { // Unique identifier of the payee. PayeeId *string `json:"payee_id,omitempty"` // Type of the payee. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` AdditionalProperties map[string]interface{} } @@ -315,7 +315,7 @@ func (o *TransferDestinationResponse) SetType(v string) { } func (o TransferDestinationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -419,3 +419,5 @@ func (v *NullableTransferDestinationResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_transfer_method_response.go b/model_transfer_method_response.go index ecf6fa9..59bafa5 100644 --- a/model_transfer_method_response.go +++ b/model_transfer_method_response.go @@ -35,7 +35,7 @@ type TransferMethodResponse struct { // Unique identifier of the payee. PayeeId *string `json:"payee_id,omitempty"` // Type of the payee. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` AdditionalProperties map[string]interface{} } @@ -315,7 +315,7 @@ func (o *TransferMethodResponse) SetType(v string) { } func (o TransferMethodResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -419,3 +419,5 @@ func (v *NullableTransferMethodResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_transfer_response.go b/model_transfer_response.go index 03435f0..ebc7da8 100644 --- a/model_transfer_response.go +++ b/model_transfer_response.go @@ -29,7 +29,7 @@ type TransferResponse struct { // Unique identifier of the transfer. Id *string `json:"id,omitempty"` // Indicates whether the transfer was created in live mode or test mode. - Livemode *bool `json:"livemode,omitempty"` + Livemode *bool `json:"livemode,omitempty"` Destination *TransferDestinationResponse `json:"destination,omitempty"` // Object name, which is transfer. Object *string `json:"object,omitempty"` @@ -38,7 +38,7 @@ type TransferResponse struct { // Reference number of the transfer. StatementReference *string `json:"statement_reference,omitempty"` // Code indicating transfer status. - Status *string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -382,7 +382,7 @@ func (o *TransferResponse) SetStatus(v string) { } func (o TransferResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -494,3 +494,5 @@ func (v *NullableTransferResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_transfers_response.go b/model_transfers_response.go index 811ce57..e88033f 100644 --- a/model_transfers_response.go +++ b/model_transfers_response.go @@ -29,8 +29,8 @@ type TransfersResponse struct { // Unique identifier of the transfer. Id *string `json:"id,omitempty"` // Indicates whether the transfer was created in live mode or test mode. - Livemode *bool `json:"livemode,omitempty"` - Method *TransferMethodResponse `json:"method,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + Method *TransferMethodResponse `json:"method,omitempty"` // Object name, which is transfer. Object *string `json:"object,omitempty"` // Description of the transfer. @@ -38,7 +38,7 @@ type TransfersResponse struct { // Reference number of the transfer. StatementReference *string `json:"statement_reference,omitempty"` // Code indicating transfer status. - Status *string `json:"status,omitempty"` + Status *string `json:"status,omitempty"` AdditionalProperties map[string]interface{} } @@ -382,7 +382,7 @@ func (o *TransfersResponse) SetStatus(v string) { } func (o TransfersResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -494,3 +494,5 @@ func (v *NullableTransfersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_customer.go b/model_update_customer.go index 04081a1..6d7705d 100644 --- a/model_update_customer.go +++ b/model_update_customer.go @@ -36,14 +36,14 @@ type UpdateCustomer struct { // It is a value that allows identifying if the email is corporate or not. Corporate *bool `json:"corporate,omitempty"` // It is an undefined value. - CustomReference *string `json:"custom_reference,omitempty"` - FiscalEntities []CustomerFiscalEntitiesRequest `json:"fiscal_entities,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` + CustomReference *string `json:"custom_reference,omitempty"` + FiscalEntities []CustomerFiscalEntitiesRequest `json:"fiscal_entities,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` // Contains details of the payment methods that the customer has active or has used in Conekta PaymentSources []CustomerPaymentMethodsRequest `json:"payment_sources,omitempty"` // Contains the detail of the shipping addresses that the client has active or has used in Conekta - ShippingContacts []CustomerShippingContacts `json:"shipping_contacts,omitempty"` - Subscription *SubscriptionRequest `json:"subscription,omitempty"` + ShippingContacts []CustomerShippingContacts `json:"shipping_contacts,omitempty"` + Subscription *SubscriptionRequest `json:"subscription,omitempty"` AdditionalProperties map[string]interface{} } @@ -102,7 +102,6 @@ func (o *UpdateCustomer) HasAntifraudInfo() bool { func (o *UpdateCustomer) SetAntifraudInfo(v UpdateCustomerAntifraudInfo) { o.AntifraudInfo.Set(&v) } - // SetAntifraudInfoNil sets the value for AntifraudInfo to be an explicit nil func (o *UpdateCustomer) SetAntifraudInfoNil() { o.AntifraudInfo.Set(nil) @@ -530,7 +529,7 @@ func (o *UpdateCustomer) SetSubscription(v SubscriptionRequest) { } func (o UpdateCustomer) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -658,3 +657,5 @@ func (v *NullableUpdateCustomer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_customer_antifraud_info.go b/model_update_customer_antifraud_info.go index 27068ae..f5c7f3c 100644 --- a/model_update_customer_antifraud_info.go +++ b/model_update_customer_antifraud_info.go @@ -20,8 +20,8 @@ var _ MappedNullable = &UpdateCustomerAntifraudInfo{} // UpdateCustomerAntifraudInfo struct for UpdateCustomerAntifraudInfo type UpdateCustomerAntifraudInfo struct { - AccountCreatedAt *int64 `json:"account_created_at,omitempty"` - FirstPaidAt *int32 `json:"first_paid_at,omitempty"` + AccountCreatedAt *int64 `json:"account_created_at,omitempty"` + FirstPaidAt *int32 `json:"first_paid_at,omitempty"` AdditionalProperties map[string]interface{} } @@ -109,7 +109,7 @@ func (o *UpdateCustomerAntifraudInfo) SetFirstPaidAt(v int32) { } func (o UpdateCustomerAntifraudInfo) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -189,3 +189,5 @@ func (v *NullableUpdateCustomerAntifraudInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_customer_fiscal_entities_response.go b/model_update_customer_fiscal_entities_response.go index 5b28ae7..2ed0935 100644 --- a/model_update_customer_fiscal_entities_response.go +++ b/model_update_customer_fiscal_entities_response.go @@ -21,17 +21,17 @@ var _ MappedNullable = &UpdateCustomerFiscalEntitiesResponse{} // UpdateCustomerFiscalEntitiesResponse struct for UpdateCustomerFiscalEntitiesResponse type UpdateCustomerFiscalEntitiesResponse struct { - Address CustomerAddress `json:"address"` - TaxId *string `json:"tax_id,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` - CompanyName *string `json:"company_name,omitempty"` - Id string `json:"id"` - Object string `json:"object"` - CreatedAt int64 `json:"created_at"` - ParentId *string `json:"parent_id,omitempty"` - Default *bool `json:"default,omitempty"` + Address CustomerAddress `json:"address"` + TaxId *string `json:"tax_id,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` + CompanyName *string `json:"company_name,omitempty"` + Id string `json:"id"` + Object string `json:"object"` + CreatedAt int64 `json:"created_at"` + ParentId *string `json:"parent_id,omitempty"` + Default *bool `json:"default,omitempty"` AdditionalProperties map[string]interface{} } @@ -379,7 +379,7 @@ func (o *UpdateCustomerFiscalEntitiesResponse) SetDefault(v bool) { } func (o UpdateCustomerFiscalEntitiesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -437,10 +437,10 @@ func (o *UpdateCustomerFiscalEntitiesResponse) UnmarshalJSON(data []byte) (err e err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -511,3 +511,5 @@ func (v *NullableUpdateCustomerFiscalEntitiesResponse) UnmarshalJSON(src []byte) v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_order_discount_lines_request.go b/model_update_order_discount_lines_request.go index b6c5fe3..d1061d0 100644 --- a/model_update_order_discount_lines_request.go +++ b/model_update_order_discount_lines_request.go @@ -22,8 +22,8 @@ var _ MappedNullable = &UpdateOrderDiscountLinesRequest{} type UpdateOrderDiscountLinesRequest struct { Amount *int64 `json:"amount,omitempty"` // Discount code. - Code *string `json:"code,omitempty"` - Type *string `json:"type,omitempty"` + Code *string `json:"code,omitempty"` + Type *string `json:"type,omitempty"` AdditionalProperties map[string]interface{} } @@ -143,7 +143,7 @@ func (o *UpdateOrderDiscountLinesRequest) SetType(v string) { } func (o UpdateOrderDiscountLinesRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -227,3 +227,5 @@ func (v *NullableUpdateOrderDiscountLinesRequest) UnmarshalJSON(src []byte) erro v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_order_tax_request.go b/model_update_order_tax_request.go index 7967f04..4a42bf8 100644 --- a/model_update_order_tax_request.go +++ b/model_update_order_tax_request.go @@ -23,8 +23,8 @@ type UpdateOrderTaxRequest struct { // The amount to be collected for tax in cents Amount *int64 `json:"amount,omitempty"` // description or tax's name - Description *string `json:"description,omitempty"` - Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` + Description *string `json:"description,omitempty"` + Metadata map[string]map[string]interface{} `json:"metadata,omitempty"` AdditionalProperties map[string]interface{} } @@ -144,7 +144,7 @@ func (o *UpdateOrderTaxRequest) SetMetadata(v map[string]map[string]interface{}) } func (o UpdateOrderTaxRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -228,3 +228,5 @@ func (v *NullableUpdateOrderTaxRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_order_tax_response.go b/model_update_order_tax_response.go index 688e1df..1c54c7c 100644 --- a/model_update_order_tax_response.go +++ b/model_update_order_tax_response.go @@ -24,11 +24,11 @@ type UpdateOrderTaxResponse struct { // The amount to be collected for tax in cents Amount int64 `json:"amount"` // description or tax's name - Description string `json:"description"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Id string `json:"id"` - Object *string `json:"object,omitempty"` - ParentId *string `json:"parent_id,omitempty"` + Description string `json:"description"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Id string `json:"id"` + Object *string `json:"object,omitempty"` + ParentId *string `json:"parent_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -223,7 +223,7 @@ func (o *UpdateOrderTaxResponse) SetParentId(v string) { } func (o UpdateOrderTaxResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -267,10 +267,10 @@ func (o *UpdateOrderTaxResponse) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -336,3 +336,5 @@ func (v *NullableUpdateOrderTaxResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_payment_methods.go b/model_update_payment_methods.go index a573bed..f0c55c6 100644 --- a/model_update_payment_methods.go +++ b/model_update_payment_methods.go @@ -20,7 +20,7 @@ var _ MappedNullable = &UpdatePaymentMethods{} // UpdatePaymentMethods struct for UpdatePaymentMethods type UpdatePaymentMethods struct { - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` AdditionalProperties map[string]interface{} } @@ -76,7 +76,7 @@ func (o *UpdatePaymentMethods) SetName(v string) { } func (o UpdatePaymentMethods) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -152,3 +152,5 @@ func (v *NullableUpdatePaymentMethods) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_update_product.go b/model_update_product.go index 8c0700d..56afa1e 100644 --- a/model_update_product.go +++ b/model_update_product.go @@ -20,15 +20,15 @@ var _ MappedNullable = &UpdateProduct{} // UpdateProduct struct for UpdateProduct type UpdateProduct struct { - AntifraudInfo map[string]map[string]interface{} `json:"antifraud_info,omitempty"` - Description *string `json:"description,omitempty"` - Sku *string `json:"sku,omitempty"` - Name *string `json:"name,omitempty"` - UnitPrice *int64 `json:"unit_price,omitempty"` - Quantity *int32 `json:"quantity,omitempty"` - Tags []string `json:"tags,omitempty"` - Brand *string `json:"brand,omitempty"` - Metadata *map[string]string `json:"metadata,omitempty"` + AntifraudInfo map[string]map[string]interface{} `json:"antifraud_info,omitempty"` + Description *string `json:"description,omitempty"` + Sku *string `json:"sku,omitempty"` + Name *string `json:"name,omitempty"` + UnitPrice *int64 `json:"unit_price,omitempty"` + Quantity *int32 `json:"quantity,omitempty"` + Tags []string `json:"tags,omitempty"` + Brand *string `json:"brand,omitempty"` + Metadata *map[string]string `json:"metadata,omitempty"` AdditionalProperties map[string]interface{} } @@ -340,7 +340,7 @@ func (o *UpdateProduct) SetMetadata(v map[string]string) { } func (o UpdateProduct) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -448,3 +448,5 @@ func (v *NullableUpdateProduct) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_key_create_response.go b/model_webhook_key_create_response.go index 08cac95..408be4a 100644 --- a/model_webhook_key_create_response.go +++ b/model_webhook_key_create_response.go @@ -31,7 +31,7 @@ type WebhookKeyCreateResponse struct { // Object name, value is webhook_key Object *string `json:"object,omitempty"` // Public key to be used in the webhook - PublicKey *string `json:"public_key,omitempty"` + PublicKey *string `json:"public_key,omitempty"` AdditionalProperties map[string]interface{} } @@ -247,7 +247,7 @@ func (o *WebhookKeyCreateResponse) SetPublicKey(v string) { } func (o WebhookKeyCreateResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -343,3 +343,5 @@ func (v *NullableWebhookKeyCreateResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_key_delete_response.go b/model_webhook_key_delete_response.go index 6f432cd..eaac4a8 100644 --- a/model_webhook_key_delete_response.go +++ b/model_webhook_key_delete_response.go @@ -31,7 +31,7 @@ type WebhookKeyDeleteResponse struct { // Indicates if the webhook key is in live mode Livemode *bool `json:"livemode,omitempty"` // Object name, value is webhook_key - Object *string `json:"object,omitempty"` + Object *string `json:"object,omitempty"` AdditionalProperties map[string]interface{} } @@ -247,7 +247,7 @@ func (o *WebhookKeyDeleteResponse) SetObject(v string) { } func (o WebhookKeyDeleteResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -343,3 +343,5 @@ func (v *NullableWebhookKeyDeleteResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_key_request.go b/model_webhook_key_request.go index 686bc7a..cf09f05 100644 --- a/model_webhook_key_request.go +++ b/model_webhook_key_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &WebhookKeyRequest{} // WebhookKeyRequest struct for WebhookKeyRequest type WebhookKeyRequest struct { // Indicates if the webhook key is active - Active *bool `json:"active,omitempty"` + Active *bool `json:"active,omitempty"` AdditionalProperties map[string]interface{} } @@ -81,7 +81,7 @@ func (o *WebhookKeyRequest) SetActive(v bool) { } func (o WebhookKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -157,3 +157,5 @@ func (v *NullableWebhookKeyRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_key_response.go b/model_webhook_key_response.go index 99a3626..02a2674 100644 --- a/model_webhook_key_response.go +++ b/model_webhook_key_response.go @@ -33,7 +33,7 @@ type WebhookKeyResponse struct { // Indicates if the webhook key is in live mode Livemode *bool `json:"livemode,omitempty"` // Object name, value is webhook_key - Object *string `json:"object,omitempty"` + Object *string `json:"object,omitempty"` AdditionalProperties map[string]interface{} } @@ -184,7 +184,6 @@ func (o *WebhookKeyResponse) HasDeactivatedAt() bool { func (o *WebhookKeyResponse) SetDeactivatedAt(v int64) { o.DeactivatedAt.Set(&v) } - // SetDeactivatedAtNil sets the value for DeactivatedAt to be an explicit nil func (o *WebhookKeyResponse) SetDeactivatedAtNil() { o.DeactivatedAt.Set(nil) @@ -292,7 +291,7 @@ func (o *WebhookKeyResponse) SetObject(v string) { } func (o WebhookKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -392,3 +391,5 @@ func (v *NullableWebhookKeyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_key_update_request.go b/model_webhook_key_update_request.go index 036ad74..29fd5b7 100644 --- a/model_webhook_key_update_request.go +++ b/model_webhook_key_update_request.go @@ -21,7 +21,7 @@ var _ MappedNullable = &WebhookKeyUpdateRequest{} // WebhookKeyUpdateRequest struct for WebhookKeyUpdateRequest type WebhookKeyUpdateRequest struct { // Indicates if the webhook key is active - Active *bool `json:"active,omitempty"` + Active *bool `json:"active,omitempty"` AdditionalProperties map[string]interface{} } @@ -81,7 +81,7 @@ func (o *WebhookKeyUpdateRequest) SetActive(v bool) { } func (o WebhookKeyUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -157,3 +157,5 @@ func (v *NullableWebhookKeyUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_log.go b/model_webhook_log.go index 61b34e8..a2d3a86 100644 --- a/model_webhook_log.go +++ b/model_webhook_log.go @@ -20,14 +20,14 @@ var _ MappedNullable = &WebhookLog{} // WebhookLog struct for WebhookLog type WebhookLog struct { - FailedAttempts *int32 `json:"failed_attempts,omitempty"` - Id *string `json:"id,omitempty"` - LastAttemptedAt *int32 `json:"last_attempted_at,omitempty"` - LastHttpResponseStatus *int32 `json:"last_http_response_status,omitempty"` - Object *string `json:"object,omitempty"` - ResponseData map[string]interface{} `json:"response_data,omitempty"` - Url *string `json:"url,omitempty"` - AdditionalProperties map[string]interface{} + FailedAttempts *int32 `json:"failed_attempts,omitempty"` + Id *string `json:"id,omitempty"` + LastAttemptedAt *int32 `json:"last_attempted_at,omitempty"` + LastHttpResponseStatus *int32 `json:"last_http_response_status,omitempty"` + Object *string `json:"object,omitempty"` + ResponseData map[string]interface{} `json:"response_data,omitempty"` + Url *string `json:"url,omitempty"` + AdditionalProperties map[string]interface{} } type _WebhookLog WebhookLog @@ -274,7 +274,7 @@ func (o *WebhookLog) SetUrl(v string) { } func (o WebhookLog) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -374,3 +374,5 @@ func (v *NullableWebhookLog) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_request.go b/model_webhook_request.go index e013b32..850bef8 100644 --- a/model_webhook_request.go +++ b/model_webhook_request.go @@ -24,7 +24,7 @@ type WebhookRequest struct { // Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. Url string `json:"url"` // It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false - Synchronous bool `json:"synchronous"` + Synchronous bool `json:"synchronous"` AdditionalProperties map[string]interface{} } @@ -100,7 +100,7 @@ func (o *WebhookRequest) SetSynchronous(v bool) { } func (o WebhookRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -133,10 +133,10 @@ func (o *WebhookRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -198,3 +198,5 @@ func (v *NullableWebhookRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_response.go b/model_webhook_response.go index 64f926b..6fabc8d 100644 --- a/model_webhook_response.go +++ b/model_webhook_response.go @@ -20,16 +20,16 @@ var _ MappedNullable = &WebhookResponse{} // WebhookResponse webhooks model type WebhookResponse struct { - Deleted NullableBool `json:"deleted,omitempty"` - DevelopmentEnabled *bool `json:"development_enabled,omitempty"` - Id *string `json:"id,omitempty"` - Livemode *bool `json:"livemode,omitempty"` - Object *string `json:"object,omitempty"` - ProductionEnabled *bool `json:"production_enabled,omitempty"` - Status *string `json:"status,omitempty"` - SubscribedEvents []string `json:"subscribed_events,omitempty"` - Synchronous *bool `json:"synchronous,omitempty"` - Url *string `json:"url,omitempty"` + Deleted NullableBool `json:"deleted,omitempty"` + DevelopmentEnabled *bool `json:"development_enabled,omitempty"` + Id *string `json:"id,omitempty"` + Livemode *bool `json:"livemode,omitempty"` + Object *string `json:"object,omitempty"` + ProductionEnabled *bool `json:"production_enabled,omitempty"` + Status *string `json:"status,omitempty"` + SubscribedEvents []string `json:"subscribed_events,omitempty"` + Synchronous *bool `json:"synchronous,omitempty"` + Url *string `json:"url,omitempty"` AdditionalProperties map[string]interface{} } @@ -84,7 +84,6 @@ func (o *WebhookResponse) HasDeleted() bool { func (o *WebhookResponse) SetDeleted(v bool) { o.Deleted.Set(&v) } - // SetDeletedNil sets the value for Deleted to be an explicit nil func (o *WebhookResponse) SetDeletedNil() { o.Deleted.Set(nil) @@ -384,7 +383,7 @@ func (o *WebhookResponse) SetUrl(v string) { } func (o WebhookResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -496,3 +495,5 @@ func (v *NullableWebhookResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_webhook_update_request.go b/model_webhook_update_request.go index 71d2b6e..07286e2 100644 --- a/model_webhook_update_request.go +++ b/model_webhook_update_request.go @@ -24,8 +24,8 @@ type WebhookUpdateRequest struct { // Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. Url string `json:"url"` // It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false - Synchronous *bool `json:"synchronous,omitempty"` - Events []string `json:"events,omitempty"` + Synchronous *bool `json:"synchronous,omitempty"` + Events []string `json:"events,omitempty"` AdditionalProperties map[string]interface{} } @@ -142,7 +142,7 @@ func (o *WebhookUpdateRequest) SetEvents(v []string) { } func (o WebhookUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -179,10 +179,10 @@ func (o *WebhookUpdateRequest) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(data, &allProperties) if err != nil { - return err + return err; } - for _, requiredProperty := range requiredProperties { + for _, requiredProperty := range(requiredProperties) { if _, exists := allProperties[requiredProperty]; !exists { return fmt.Errorf("no value given for required property %v", requiredProperty) } @@ -245,3 +245,5 @@ func (v *NullableWebhookUpdateRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/model_whitelistlist_rule_response.go b/model_whitelistlist_rule_response.go index cf67fe7..5b5c28f 100644 --- a/model_whitelistlist_rule_response.go +++ b/model_whitelistlist_rule_response.go @@ -27,7 +27,7 @@ type WhitelistlistRuleResponse struct { // value used for whitelists rule Value *string `json:"value,omitempty"` // use an description for whitelisted rule - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty"` AdditionalProperties map[string]interface{} } @@ -179,7 +179,7 @@ func (o *WhitelistlistRuleResponse) SetDescription(v string) { } func (o WhitelistlistRuleResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() + toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } @@ -267,3 +267,5 @@ func (v *NullableWhitelistlistRuleResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/test/api_charges_test.go b/test/api_charges_test.go index e5d8b2d..6bbc76b 100644 --- a/test/api_charges_test.go +++ b/test/api_charges_test.go @@ -45,6 +45,11 @@ func Test_conekta_ChargesApiService(t *testing.T) { t.Run("Test ChargesApiService OrdersCreateCharge", func(t *testing.T) { req := conekta.ChargeRequest{ Amount: conekta.PtrInt32(1000), + PaymentMethod: conekta.ChargeRequestPaymentMethod{ + PaymentMethodCardRequest: &conekta.PaymentMethodCardRequest{ + Type: "card", + }, + }, } resp, httpRes, err := apiClient.ChargesAPI.OrdersCreateCharge(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). ChargeRequest(req). diff --git a/test/api_payment_methods_test.go b/test/api_payment_methods_test.go index 15d3490..a081151 100644 --- a/test/api_payment_methods_test.go +++ b/test/api_payment_methods_test.go @@ -26,9 +26,8 @@ func Test_conekta_PaymentMethodsApiService(t *testing.T) { t.Run("Test PaymentMethodsApiService CreateCustomerPaymentMethods", func(t *testing.T) { req := conekta.CreateCustomerPaymentMethodsRequest{ - PaymentMethodCardRequest: &conekta.PaymentMethodCardRequest{ - Type: "oxxo_recurrent", - TokenId: "tokenID", + PaymentMethodCashRequest: &conekta.PaymentMethodCashRequest{ + Type: "oxxo_recurrent", }, } resp, httpRes, err := apiClient.PaymentMethodsAPI.CreateCustomerPaymentMethods(context.TODO(), "cus_2tXyF9BwPG14UMkkg").