diff --git a/README.md b/README.md index 0ead36e3..d6fb8ce4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The official Xendit Go SDK provides a simple and convenient way to call Xendit's REST API in applications written in Go. -* Package version: 3.2.0 +* Package version: 3.3.0 # Getting Started @@ -43,6 +43,7 @@ xnd := xendit.NewClient("API-KEY") Find detailed API information and examples for each of our product's by clicking the links below, * [Balance](docs/BalanceApi.md) +* [Customer](docs/CustomerApi.md) * [Invoice](docs/InvoiceApi.md) * [PaymentMethod](docs/PaymentMethodApi.md) * [PaymentRequest](docs/PaymentRequestApi.md) diff --git a/balance_and_transaction/model_balance.go b/balance_and_transaction/model_balance.go index 68aed6f0..41f04266 100644 --- a/balance_and_transaction/model_balance.go +++ b/balance_and_transaction/model_balance.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_channels_categories.go b/balance_and_transaction/model_channels_categories.go index 2be1ae73..971dda98 100644 --- a/balance_and_transaction/model_channels_categories.go +++ b/balance_and_transaction/model_channels_categories.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_currency.go b/balance_and_transaction/model_currency.go index c7a29f7e..d0c2d206 100644 --- a/balance_and_transaction/model_currency.go +++ b/balance_and_transaction/model_currency.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_date_range_filter.go b/balance_and_transaction/model_date_range_filter.go index 5ec1a8dd..4c3ad296 100644 --- a/balance_and_transaction/model_date_range_filter.go +++ b/balance_and_transaction/model_date_range_filter.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_fee_response.go b/balance_and_transaction/model_fee_response.go index 8dcef90c..7f7947a0 100644 --- a/balance_and_transaction/model_fee_response.go +++ b/balance_and_transaction/model_fee_response.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_link_item.go b/balance_and_transaction/model_link_item.go index ebdcb5d9..51414dd3 100644 --- a/balance_and_transaction/model_link_item.go +++ b/balance_and_transaction/model_link_item.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_server_error.go b/balance_and_transaction/model_server_error.go index 72b77711..7fd139c7 100644 --- a/balance_and_transaction/model_server_error.go +++ b/balance_and_transaction/model_server_error.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_transaction_response.go b/balance_and_transaction/model_transaction_response.go index 1530b039..59ab923e 100644 --- a/balance_and_transaction/model_transaction_response.go +++ b/balance_and_transaction/model_transaction_response.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ @@ -548,17 +548,27 @@ func (o TransactionResponse) ToMap() (map[string]interface{}, error) { toSerialize["status"] = o.Status toSerialize["channel_category"] = o.ChannelCategory toSerialize["channel_code"] = o.ChannelCode.Get() + toSerialize["account_identifier"] = o.AccountIdentifier.Get() + toSerialize["reference_id"] = o.ReferenceId toSerialize["currency"] = o.Currency toSerialize["amount"] = o.Amount toSerialize["cashflow"] = o.Cashflow + if o.Cashflow != "MONEY_IN" && o.Cashflow != "MONEY_OUT" { + toSerialize["cashflow"] = nil + return toSerialize, utils.NewError("invalid value for Cashflow when marshalling to JSON, must be one of MONEY_IN, MONEY_OUT") + } if o.SettlementStatus.IsSet() { toSerialize["settlement_status"] = o.SettlementStatus.Get() - } + if o.SettlementStatus.Get() != nil && (*o.SettlementStatus.Get() != "PENDING" && *o.SettlementStatus.Get() != "SETTLED") { + toSerialize["settlement_status"] = nil + return toSerialize, utils.NewError("invalid value for SettlementStatus when marshalling to JSON, must be one of PENDING, SETTLED") + } + } if o.EstimatedSettlementTime.IsSet() { toSerialize["estimated_settlement_time"] = o.EstimatedSettlementTime.Get() - } + } toSerialize["business_id"] = o.BusinessId toSerialize["fee"] = o.Fee toSerialize["created"] = o.Created diff --git a/balance_and_transaction/model_transaction_response_type.go b/balance_and_transaction/model_transaction_response_type.go index 3be6c8d5..3c828d86 100644 --- a/balance_and_transaction/model_transaction_response_type.go +++ b/balance_and_transaction/model_transaction_response_type.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_transaction_statuses.go b/balance_and_transaction/model_transaction_statuses.go index 6181291c..02194b35 100644 --- a/balance_and_transaction/model_transaction_statuses.go +++ b/balance_and_transaction/model_transaction_statuses.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_transaction_types.go b/balance_and_transaction/model_transaction_types.go index ff7b6b65..6ae2c89e 100644 --- a/balance_and_transaction/model_transaction_types.go +++ b/balance_and_transaction/model_transaction_types.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_transactions_response.go b/balance_and_transaction/model_transactions_response.go index 61f36137..02c13957 100644 --- a/balance_and_transaction/model_transactions_response.go +++ b/balance_and_transaction/model_transactions_response.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ diff --git a/balance_and_transaction/model_validation_error.go b/balance_and_transaction/model_validation_error.go index 59150227..df34ea93 100644 --- a/balance_and_transaction/model_validation_error.go +++ b/balance_and_transaction/model_validation_error.go @@ -3,7 +3,7 @@ Transaction Service V4 API # Introduction This specification describes how to use the Transaction Service V4 API. **Transaction Service** is the service that records the customer transactions and is responsible to calculate their balance. All products that move customer money around whether it is money-in, money-out, or transfer will interact with the Transaction Service on its flow. Transaction Service is the source of truth of Xendit and Customer regarding how much money that customer has that is stored in Xendit. Transaction Service is the source that is used for both our internal and customer financial reconciliation. Internally, the Transaction Service data structure is similar to how double-entry accounting works. ## How Xendit teams/services do integrate with Transaction Service V4 **Channel product team/service** They interact with the Transaction Service when they want to record the transactions. This transaction can be money-in (balance added), money-out (balance deducted), transfer, refund/void/reversal, or other kind of transaction that affects customer balance. Product team also interacts with the Transaction Service for getting information about the transaction or balance. **Billing/Fee team/service** They interact with Transaction Service either as the dependency of Transaction Service for getting the correct fee calculation/settings. Or using Transaction Service for getting the transaction/fee information to calculate the bill for the customer. **NUX team/service** They interact with the Transaction Service to set up the customer ledger_account that is used to record their transactions. **Finance team/service** They interact with the Transaction Service to get the transaction and balance data for each customer to do reconciliation. **Dashboard/API team/service** They interact with the Transaction Service as a proxy to show the data to the Customer. ## Prerequisites Before staring to use **Transaction Service API** you need to complete a few things: 1. Find out **Base URL** for the API. Every endpoint definition in this document contains list of available servers (local, staging, production) 2. Set up ledger accounts using business id and currency. **Ledger Account** represents the account of the customer that will be used to associate with ledger lines. Each business may have at least 1 ledger account group (a group consists of a few accounts of types such as cash, liability, holding), and the money movement of their ledger will revolve around those ledger accounts. **Ledger Lines** that show a debit or credit transaction for a ledger account. We’re using the double-entry principle in accounting where we should post 2 lines every time we make a transaction, 1 to debit an account and 1 to credit another account. See how to call Create cash, liability, holding, and tax account for a business (api/ledger-accounts/setup) section of this document 3. To be able to create payments with fee/VAT the Product rate settings and VAT rate settings should be created using Transaction Fee Service. See Fee Service Documentation for details about how to create Product/VAT rate settings. ## Transaction flows To integrate with the Transaction Service you should decide what types of transaction flows your integration will be using. Transaction flow is set by the transaction `type` during transaction creation 1. Money In flows 1. Payment from credit card `type: CREDIT_CARD_PAYMENT` 3. Payment from other sources without fee/VAT `type: DEPOSIT, FOREX_DEPOSIT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, BATCH_VA_PAYMENT` 4. Payment from other sources with fee/VAT `type: VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, RO_PAYMENT, EWALLET_PAYMENT, CARDLESS_CREDIT_PAYMENT, IM_REMITTANCE_VA_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CRYPTO_PAYMENT` 5. Billing deposit from cash `type: BILLING_DEPOSIT` 6. Billing deposit from other sources `type: BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT` 2. Money out flows 1. Instant payment `type: simple money out types` `status: COMPLETED` 2. Simple payment without fee/VAT `type: CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, FOREX_DEDUCTION, BNPL_PARTNER_SETTLEMENT_DEBIT, WITHDRAWAL` 3. Simple payment with fee/VAT `type: ISSUING_FUNDING, BATCH_DISBURSEMENT, CASH_DISBURSEMENT, DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT` 4. Billing withdraw to cash `type: BILLING_WITHDRAWAL` 4. Billing withdraw to other destinations `type: BILL_PAYMENT` 3. Reversal flow Some of transactions could be reversed. See Reversible / non reversible transaction types section of this document. To reverse transaction you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `REVERSED`. 4. Void/Cancellation Flow Transaction in the `PENDING_SETTLEMENT` status could be canceled. To do that you should call Update transaction (/api/transactions/:id) endpoint with the transaction status `VOIDED`. 5. Switcher flow Switchers are transactions that do not affect the customer balance. These are transactions that goes directly to the customers’ account and simply passes through Xendit. Therefore, it will not impact the customer balance and we will only charge Fee and VAT. To create switcher flow you should set `is_switcher_payment` field to `true`. ## Instant/non instant settlement Transactions can be performed instantly (instant settlement) or with delay (non instant settlement). Some of the transaction types are only instantly processed, some of them support both instant and non instant settlement and some of them have only non instant settlement. If settlement is instant than balance will be changed instantly. In opposite case the transaction status has to be set into PENDING_SETTLEMENT and settlement date should be provided. 1. Instant settlement Money In transaction types `DEPOSIT, BATCH_VA_PAYMENT, FOREX_DEPOSIT, IM_DEPOSIT, CARDLESS_CREDIT_PAYMENT, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_CREDIT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK, REMITTANCE_VA_PAYMENT_CLAIM` 2. Both instant and non instant Money In transaction types `DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, RO_PAYMENT, EWALLET_PAYMENT, QR_CODE_PAYMENT, VA_PAYMENT, INVOICE, PAYLATER_PAYMENT` 3. Non Instant settlement Money In transaction types `CREDIT_CARD_PAYMENT` 4. Instant settlement Money Out transaction types `LOAN_REPAYMENT, FOREX_DEDUCTION, BILL_PAYMENT, ISSUING_FUNDING, BNPL_PARTNER_SETTLEMENT_DEBIT, FRAUD_DEDUCTION` 5. Both instant and non instant settlement supported Money Out transaction types `CHARGEBACK_DEDUCTION` 6. Non Instant settlement Money Out transaction types All other money out types are non instant settlement ## Reversible / non reversible transaction types Some transactions can be reversed. Here are the list of transaction types that could be reversed: `CASH_DISBURSEMENT, DISBURSEMENT, BATCH_DISBURSEMENT, REMITTANCE, REMITTANCE_PAYOUT, TAX_DISBURSEMENT, WITHDRAWAL, DEPOSIT, FOREX_DEPOSIT, FOREX_DEDUCTION, VA_PAYMENT, BATCH_VA_PAYMENT, IM_REMITTANCE_VA_PAYMENT, IM_ESCROW_VA_PAYMENT, IM_DEPOSIT, REMITTANCE_VA_PAYMENT, REMITTANCE_VA_PAYMENT_CLAIM, RO_PAYMENT, CARDLESS_CREDIT_PAYMENT, PAYLATER_PAYMENT, INVOICE, QR_CODE_PAYMENT, CREDIT_CARD_PAYMENT, EWALLET_PAYMENT, DIRECT_DEBIT_PAYMENT, DIRECT_BANK_TRANSFER, ACH_PAYMENT, CHARGEBACK_DEDUCTION, FRAUD_DEDUCTION, LOAN_REPAYMENT, ISSUING_FUNDING, ISSUING_FUNDING_REFUND, BNPL_PARTNER_SETTLEMENT_DEBIT, BNPL_PARTNER_SETTLEMENT_CREDIT, BILLING_DEPOSIT, BILLING_DIRECT_DEPOSIT, BILLING_VA_DIRECT_DEPOSIT, BILLING_WITHDRAWAL, BILL_PAYMENT, PROMO_FEE_CASHBACK, PROMO_VAT_CASHBACK` ## How to create transaction After you created or already have the `BUSINESS_CASH` ledger account ID (See Prerequisites section) and you know what transaction flows are going to be used you can create the new transaction using POST request to the Create a new transaction (/api/transactions) endpoint ## How to update transaction To update transaction you should do PATCH request to the Update transaction (/api/transactions/::id) endpoint -API version: 3.4.2 +API version: 3.4.3 */ @@ -166,7 +166,7 @@ func (o ValidationError) ToMap() (map[string]interface{}, error) { toSerialize["message"] = o.Message if o.Validation != nil { toSerialize["validation"] = o.Validation - } + } return toSerialize, nil } diff --git a/client.go b/client.go index 64345552..22611b0e 100644 --- a/client.go +++ b/client.go @@ -23,6 +23,7 @@ import ( common "github.com/xendit/xendit-go/v3/common" balance "github.com/xendit/xendit-go/v3/balance_and_transaction" + customer "github.com/xendit/xendit-go/v3/customer" invoice "github.com/xendit/xendit-go/v3/invoice" paymentmethod "github.com/xendit/xendit-go/v3/payment_method" paymentrequest "github.com/xendit/xendit-go/v3/payment_request" @@ -47,6 +48,7 @@ type APIClient struct { // API Services BalanceApi balance.BalanceApi + CustomerApi customer.CustomerApi InvoiceApi invoice.InvoiceApi PaymentMethodApi paymentmethod.PaymentMethodApi PaymentRequestApi paymentrequest.PaymentRequestApi @@ -73,6 +75,7 @@ func NewClient(apiKey string) *APIClient { c.apiKey = apiKey c.BalanceApi = balance.NewBalanceApi(c) + c.CustomerApi = customer.NewCustomerApi(c) c.InvoiceApi = invoice.NewInvoiceApi(c) c.PaymentMethodApi = paymentmethod.NewPaymentMethodApi(c) c.PaymentRequestApi = paymentrequest.NewPaymentRequestApi(c) @@ -151,7 +154,7 @@ func (c *APIClient) PrepareRequest( headerParams["xendit-lib"] = "go" // TODO: overwrite this line from buddy pipeline - headerParams["xendit-lib-ver"] = "3.2.0" + headerParams["xendit-lib-ver"] = "3.3.0" var body *bytes.Buffer diff --git a/configuration.go b/configuration.go index fbfd4647..aaacb01a 100644 --- a/configuration.go +++ b/configuration.go @@ -78,7 +78,7 @@ var Default Configuration = *NewConfiguration() func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/3.2.0/go", + UserAgent: "OpenAPI-Generator/3.3.0/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/customer/api_customer.go b/customer/api_customer.go new file mode 100644 index 00000000..46f28065 --- /dev/null +++ b/customer/api_customer.go @@ -0,0 +1,515 @@ +package customer + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strconv" + + common "github.com/xendit/xendit-go/v3/common" + utils "github.com/xendit/xendit-go/v3/utils" + "strings" +) + + +type CustomerApi interface { + + /* + CreateCustomer Create Customer + + Function to create a customer that you may use in your Invoice or Payment Requests. For detail explanations, see this link: https://developers.xendit.co/api-reference/#create-customer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCustomerRequest + */ + CreateCustomer(ctx context.Context) ApiCreateCustomerRequest + + // CreateCustomerExecute executes the request + // @return Customer + CreateCustomerExecute(r ApiCreateCustomerRequest) (*Customer, *http.Response, *common.XenditSdkError) + + /* + GetCustomer Get Customer By ID + + Retrieves a single customer object For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id End customer resource id + @return ApiGetCustomerRequest + */ + GetCustomer(ctx context.Context, id string) ApiGetCustomerRequest + + // GetCustomerExecute executes the request + // @return Customer + GetCustomerExecute(r ApiGetCustomerRequest) (*Customer, *http.Response, *common.XenditSdkError) + + /* + GetCustomerByReferenceID GET customers by reference id + + Retrieves an array with a customer object that matches the provided reference_id - the identifier provided by you For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer-by-reference-id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetCustomerByReferenceIDRequest + */ + GetCustomerByReferenceID(ctx context.Context) ApiGetCustomerByReferenceIDRequest + + // GetCustomerByReferenceIDExecute executes the request + // @return GetCustomerByReferenceID200Response + GetCustomerByReferenceIDExecute(r ApiGetCustomerByReferenceIDRequest) (*GetCustomerByReferenceID200Response, *http.Response, *common.XenditSdkError) + + /* + UpdateCustomer Update End Customer Resource + + Function to update an existing customer. For a detailed explanation For detail explanations, see this link: https://developers.xendit.co/api-reference/#update-customer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id End customer resource id + @return ApiUpdateCustomerRequest + */ + UpdateCustomer(ctx context.Context, id string) ApiUpdateCustomerRequest + + // UpdateCustomerExecute executes the request + // @return Customer + UpdateCustomerExecute(r ApiUpdateCustomerRequest) (*Customer, *http.Response, *common.XenditSdkError) +} + +// CustomerApiService CustomerApi service +type CustomerApiService struct { + client common.IClient +} + +// NewCustomerApi Create a new CustomerApi service +func NewCustomerApi (client common.IClient) CustomerApi { + return &CustomerApiService{ + client: client, + } +} + + +type ApiCreateCustomerRequest struct { + ctx context.Context + ApiService CustomerApi + iDEMPOTENCYKEY *string + forUserId *string + customerRequest *CustomerRequest +} + +// A unique key to prevent processing duplicate requests. +func (r ApiCreateCustomerRequest) IDEMPOTENCYKEY(iDEMPOTENCYKEY string) ApiCreateCustomerRequest { + r.iDEMPOTENCYKEY = &iDEMPOTENCYKEY + return r +} + +// The sub-account user-id that you want to make this transaction for. +func (r ApiCreateCustomerRequest) ForUserId(forUserId string) ApiCreateCustomerRequest { + r.forUserId = &forUserId + return r +} + +// Request object for end customer object +func (r ApiCreateCustomerRequest) CustomerRequest(customerRequest CustomerRequest) ApiCreateCustomerRequest { + r.customerRequest = &customerRequest + return r +} + +func (r ApiCreateCustomerRequest) Execute() (*Customer, *http.Response, *common.XenditSdkError) { + return r.ApiService.CreateCustomerExecute(r) +} + +/* +CreateCustomer Create Customer + +Function to create a customer that you may use in your Invoice or Payment Requests. For detail explanations, see this link: https://developers.xendit.co/api-reference/#create-customer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCustomerRequest +*/ +func (a *CustomerApiService) CreateCustomer(ctx context.Context) ApiCreateCustomerRequest { + return ApiCreateCustomerRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Customer +func (a *CustomerApiService) CreateCustomerExecute(r ApiCreateCustomerRequest) (*Customer, *http.Response, *common.XenditSdkError) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []common.FormFile + localVarReturnValue *Customer + ) + + localBasePath, err := a.client.GetConfig().ServerURLWithContext(r.ctx, "CustomerApiService.CreateCustomer") + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.CreateCustomerExecute") + } + + localVarPath := localBasePath + "/customers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := utils.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := utils.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.iDEMPOTENCYKEY != nil { + utils.ParameterAddToHeaderOrQuery(localVarHeaderParams, "IDEMPOTENCY-KEY", r.iDEMPOTENCYKEY, "") + } + if r.forUserId != nil { + utils.ParameterAddToHeaderOrQuery(localVarHeaderParams, "for-user-id", r.forUserId, "") + } + // body params + localVarPostBody = r.customerRequest + req, err := a.client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.CreateCustomerExecute") + } + + localVarHTTPResponse, err := a.client.CallAPI(req) + + localVarBody, _ := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + + err = a.client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + + if err != nil || localVarHTTPResponse.StatusCode < 200 || localVarHTTPResponse.StatusCode >= 300 { + xenditSdkError := common.NewXenditSdkError(&localVarBody, strconv.Itoa(localVarHTTPResponse.StatusCode), localVarHTTPResponse.Status) + + return localVarReturnValue, localVarHTTPResponse, xenditSdkError + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetCustomerRequest struct { + ctx context.Context + ApiService CustomerApi + id string + forUserId *string +} + +// The sub-account user-id that you want to make this transaction for. +func (r ApiGetCustomerRequest) ForUserId(forUserId string) ApiGetCustomerRequest { + r.forUserId = &forUserId + return r +} + +func (r ApiGetCustomerRequest) Execute() (*Customer, *http.Response, *common.XenditSdkError) { + return r.ApiService.GetCustomerExecute(r) +} + +/* +GetCustomer Get Customer By ID + +Retrieves a single customer object For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id End customer resource id + @return ApiGetCustomerRequest +*/ +func (a *CustomerApiService) GetCustomer(ctx context.Context, id string) ApiGetCustomerRequest { + return ApiGetCustomerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Customer +func (a *CustomerApiService) GetCustomerExecute(r ApiGetCustomerRequest) (*Customer, *http.Response, *common.XenditSdkError) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []common.FormFile + localVarReturnValue *Customer + ) + + localBasePath, err := a.client.GetConfig().ServerURLWithContext(r.ctx, "CustomerApiService.GetCustomer") + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.GetCustomerExecute") + } + + localVarPath := localBasePath + "/customers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(utils.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := utils.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := utils.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.forUserId != nil { + utils.ParameterAddToHeaderOrQuery(localVarHeaderParams, "for-user-id", r.forUserId, "") + } + req, err := a.client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.GetCustomerExecute") + } + + localVarHTTPResponse, err := a.client.CallAPI(req) + + localVarBody, _ := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + + err = a.client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + + if err != nil || localVarHTTPResponse.StatusCode < 200 || localVarHTTPResponse.StatusCode >= 300 { + xenditSdkError := common.NewXenditSdkError(&localVarBody, strconv.Itoa(localVarHTTPResponse.StatusCode), localVarHTTPResponse.Status) + + return localVarReturnValue, localVarHTTPResponse, xenditSdkError + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetCustomerByReferenceIDRequest struct { + ctx context.Context + ApiService CustomerApi + referenceId *string + forUserId *string +} + +// Merchant's reference of end customer +func (r ApiGetCustomerByReferenceIDRequest) ReferenceId(referenceId string) ApiGetCustomerByReferenceIDRequest { + r.referenceId = &referenceId + return r +} + +// The sub-account user-id that you want to make this transaction for. +func (r ApiGetCustomerByReferenceIDRequest) ForUserId(forUserId string) ApiGetCustomerByReferenceIDRequest { + r.forUserId = &forUserId + return r +} + +func (r ApiGetCustomerByReferenceIDRequest) Execute() (*GetCustomerByReferenceID200Response, *http.Response, *common.XenditSdkError) { + return r.ApiService.GetCustomerByReferenceIDExecute(r) +} + +/* +GetCustomerByReferenceID GET customers by reference id + +Retrieves an array with a customer object that matches the provided reference_id - the identifier provided by you For detail explanations, see this link: https://developers.xendit.co/api-reference/#get-customer-by-reference-id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetCustomerByReferenceIDRequest +*/ +func (a *CustomerApiService) GetCustomerByReferenceID(ctx context.Context) ApiGetCustomerByReferenceIDRequest { + return ApiGetCustomerByReferenceIDRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetCustomerByReferenceID200Response +func (a *CustomerApiService) GetCustomerByReferenceIDExecute(r ApiGetCustomerByReferenceIDRequest) (*GetCustomerByReferenceID200Response, *http.Response, *common.XenditSdkError) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []common.FormFile + localVarReturnValue *GetCustomerByReferenceID200Response + ) + + localBasePath, err := a.client.GetConfig().ServerURLWithContext(r.ctx, "CustomerApiService.GetCustomerByReferenceID") + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.GetCustomerByReferenceIDExecute") + } + + localVarPath := localBasePath + "/customers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.referenceId == nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "referenceId is required and must be specified") + } + if utils.Strlen(*r.referenceId) > 255 { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "referenceId must have less than 255 elements") + } + + utils.ParameterAddToHeaderOrQuery(localVarQueryParams, "reference_id", r.referenceId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := utils.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := utils.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.forUserId != nil { + utils.ParameterAddToHeaderOrQuery(localVarHeaderParams, "for-user-id", r.forUserId, "") + } + req, err := a.client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.GetCustomerByReferenceIDExecute") + } + + localVarHTTPResponse, err := a.client.CallAPI(req) + + localVarBody, _ := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + + err = a.client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + + if err != nil || localVarHTTPResponse.StatusCode < 200 || localVarHTTPResponse.StatusCode >= 300 { + xenditSdkError := common.NewXenditSdkError(&localVarBody, strconv.Itoa(localVarHTTPResponse.StatusCode), localVarHTTPResponse.Status) + + return localVarReturnValue, localVarHTTPResponse, xenditSdkError + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateCustomerRequest struct { + ctx context.Context + ApiService CustomerApi + id string + forUserId *string + patchCustomer *PatchCustomer +} + +// The sub-account user-id that you want to make this transaction for. +func (r ApiUpdateCustomerRequest) ForUserId(forUserId string) ApiUpdateCustomerRequest { + r.forUserId = &forUserId + return r +} + +// Update Request for end customer object +func (r ApiUpdateCustomerRequest) PatchCustomer(patchCustomer PatchCustomer) ApiUpdateCustomerRequest { + r.patchCustomer = &patchCustomer + return r +} + +func (r ApiUpdateCustomerRequest) Execute() (*Customer, *http.Response, *common.XenditSdkError) { + return r.ApiService.UpdateCustomerExecute(r) +} + +/* +UpdateCustomer Update End Customer Resource + +Function to update an existing customer. For a detailed explanation For detail explanations, see this link: https://developers.xendit.co/api-reference/#update-customer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id End customer resource id + @return ApiUpdateCustomerRequest +*/ +func (a *CustomerApiService) UpdateCustomer(ctx context.Context, id string) ApiUpdateCustomerRequest { + return ApiUpdateCustomerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Customer +func (a *CustomerApiService) UpdateCustomerExecute(r ApiUpdateCustomerRequest) (*Customer, *http.Response, *common.XenditSdkError) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []common.FormFile + localVarReturnValue *Customer + ) + + localBasePath, err := a.client.GetConfig().ServerURLWithContext(r.ctx, "CustomerApiService.UpdateCustomer") + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.UpdateCustomerExecute") + } + + localVarPath := localBasePath + "/customers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(utils.ParameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := utils.SelectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := utils.SelectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.forUserId != nil { + utils.ParameterAddToHeaderOrQuery(localVarHeaderParams, "for-user-id", r.forUserId, "") + } + // body params + localVarPostBody = r.patchCustomer + req, err := a.client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: CustomerApiService.UpdateCustomerExecute") + } + + localVarHTTPResponse, err := a.client.CallAPI(req) + + localVarBody, _ := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + + err = a.client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + + if err != nil || localVarHTTPResponse.StatusCode < 200 || localVarHTTPResponse.StatusCode >= 300 { + xenditSdkError := common.NewXenditSdkError(&localVarBody, strconv.Itoa(localVarHTTPResponse.StatusCode), localVarHTTPResponse.Status) + + return localVarReturnValue, localVarHTTPResponse, xenditSdkError + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/customer/model_account_bank.go b/customer/model_account_bank.go new file mode 100644 index 00000000..87af8643 --- /dev/null +++ b/customer/model_account_bank.go @@ -0,0 +1,352 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AccountBank type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AccountBank{} + +// AccountBank struct for AccountBank +type AccountBank struct { + // Unique account identifier as per the bank records. + AccountNumber *string `json:"account_number,omitempty"` + // Name of account holder as per the bank records. Needs to match the registered account name exactly. . + AccountHolderName NullableString `json:"account_holder_name,omitempty"` + // The SWIFT code for international payments + SwiftCode NullableString `json:"swift_code,omitempty"` + // Free text account type, e.g., Savings, Transaction, Virtual Account. + AccountType NullableString `json:"account_type,omitempty"` + // Potentially masked account detail, for display purposes only. + AccountDetails NullableString `json:"account_details,omitempty"` + Currency *string `json:"currency,omitempty"` +} + +// NewAccountBank instantiates a new AccountBank 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 NewAccountBank() *AccountBank { + this := AccountBank{} + return &this +} + +// NewAccountBankWithDefaults instantiates a new AccountBank 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 NewAccountBankWithDefaults() *AccountBank { + this := AccountBank{} + return &this +} + +// GetAccountNumber returns the AccountNumber field value if set, zero value otherwise. +func (o *AccountBank) GetAccountNumber() string { + if o == nil || utils.IsNil(o.AccountNumber) { + var ret string + return ret + } + return *o.AccountNumber +} + +// GetAccountNumberOk returns a tuple with the AccountNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountBank) GetAccountNumberOk() (*string, bool) { + if o == nil || utils.IsNil(o.AccountNumber) { + return nil, false + } + return o.AccountNumber, true +} + +// HasAccountNumber returns a boolean if a field has been set. +func (o *AccountBank) HasAccountNumber() bool { + if o != nil && !utils.IsNil(o.AccountNumber) { + return true + } + + return false +} + +// SetAccountNumber gets a reference to the given string and assigns it to the AccountNumber field. +func (o *AccountBank) SetAccountNumber(v string) { + o.AccountNumber = &v +} + +// GetAccountHolderName returns the AccountHolderName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountBank) GetAccountHolderName() string { + if o == nil || utils.IsNil(o.AccountHolderName.Get()) { + var ret string + return ret + } + return *o.AccountHolderName.Get() +} + +// GetAccountHolderNameOk returns a tuple with the AccountHolderName 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 *AccountBank) GetAccountHolderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountHolderName.Get(), o.AccountHolderName.IsSet() +} + +// HasAccountHolderName returns a boolean if a field has been set. +func (o *AccountBank) HasAccountHolderName() bool { + if o != nil && o.AccountHolderName.IsSet() { + return true + } + + return false +} + +// SetAccountHolderName gets a reference to the given NullableString and assigns it to the AccountHolderName field. +func (o *AccountBank) SetAccountHolderName(v string) { + o.AccountHolderName.Set(&v) +} +// SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil +func (o *AccountBank) SetAccountHolderNameNil() { + o.AccountHolderName.Set(nil) +} + +// UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +func (o *AccountBank) UnsetAccountHolderName() { + o.AccountHolderName.Unset() +} + +// GetSwiftCode returns the SwiftCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountBank) GetSwiftCode() string { + if o == nil || utils.IsNil(o.SwiftCode.Get()) { + var ret string + return ret + } + return *o.SwiftCode.Get() +} + +// GetSwiftCodeOk returns a tuple with the SwiftCode 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 *AccountBank) GetSwiftCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SwiftCode.Get(), o.SwiftCode.IsSet() +} + +// HasSwiftCode returns a boolean if a field has been set. +func (o *AccountBank) HasSwiftCode() bool { + if o != nil && o.SwiftCode.IsSet() { + return true + } + + return false +} + +// SetSwiftCode gets a reference to the given NullableString and assigns it to the SwiftCode field. +func (o *AccountBank) SetSwiftCode(v string) { + o.SwiftCode.Set(&v) +} +// SetSwiftCodeNil sets the value for SwiftCode to be an explicit nil +func (o *AccountBank) SetSwiftCodeNil() { + o.SwiftCode.Set(nil) +} + +// UnsetSwiftCode ensures that no value is present for SwiftCode, not even an explicit nil +func (o *AccountBank) UnsetSwiftCode() { + o.SwiftCode.Unset() +} + +// GetAccountType returns the AccountType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountBank) GetAccountType() string { + if o == nil || utils.IsNil(o.AccountType.Get()) { + var ret string + return ret + } + return *o.AccountType.Get() +} + +// GetAccountTypeOk returns a tuple with the AccountType 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 *AccountBank) GetAccountTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountType.Get(), o.AccountType.IsSet() +} + +// HasAccountType returns a boolean if a field has been set. +func (o *AccountBank) HasAccountType() bool { + if o != nil && o.AccountType.IsSet() { + return true + } + + return false +} + +// SetAccountType gets a reference to the given NullableString and assigns it to the AccountType field. +func (o *AccountBank) SetAccountType(v string) { + o.AccountType.Set(&v) +} +// SetAccountTypeNil sets the value for AccountType to be an explicit nil +func (o *AccountBank) SetAccountTypeNil() { + o.AccountType.Set(nil) +} + +// UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +func (o *AccountBank) UnsetAccountType() { + o.AccountType.Unset() +} + +// GetAccountDetails returns the AccountDetails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountBank) GetAccountDetails() string { + if o == nil || utils.IsNil(o.AccountDetails.Get()) { + var ret string + return ret + } + return *o.AccountDetails.Get() +} + +// GetAccountDetailsOk returns a tuple with the AccountDetails 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 *AccountBank) GetAccountDetailsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountDetails.Get(), o.AccountDetails.IsSet() +} + +// HasAccountDetails returns a boolean if a field has been set. +func (o *AccountBank) HasAccountDetails() bool { + if o != nil && o.AccountDetails.IsSet() { + return true + } + + return false +} + +// SetAccountDetails gets a reference to the given NullableString and assigns it to the AccountDetails field. +func (o *AccountBank) SetAccountDetails(v string) { + o.AccountDetails.Set(&v) +} +// SetAccountDetailsNil sets the value for AccountDetails to be an explicit nil +func (o *AccountBank) SetAccountDetailsNil() { + o.AccountDetails.Set(nil) +} + +// UnsetAccountDetails ensures that no value is present for AccountDetails, not even an explicit nil +func (o *AccountBank) UnsetAccountDetails() { + o.AccountDetails.Unset() +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *AccountBank) GetCurrency() string { + if o == nil || utils.IsNil(o.Currency) { + var ret string + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountBank) GetCurrencyOk() (*string, bool) { + if o == nil || utils.IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *AccountBank) HasCurrency() bool { + if o != nil && !utils.IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given string and assigns it to the Currency field. +func (o *AccountBank) SetCurrency(v string) { + o.Currency = &v +} + +func (o AccountBank) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountBank) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.AccountNumber) { + toSerialize["account_number"] = o.AccountNumber + } + if o.AccountHolderName.IsSet() { + toSerialize["account_holder_name"] = o.AccountHolderName.Get() + } + if o.SwiftCode.IsSet() { + toSerialize["swift_code"] = o.SwiftCode.Get() + } + if o.AccountType.IsSet() { + toSerialize["account_type"] = o.AccountType.Get() + } + if o.AccountDetails.IsSet() { + toSerialize["account_details"] = o.AccountDetails.Get() + } + if !utils.IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + return toSerialize, nil +} + +type NullableAccountBank struct { + value *AccountBank + isSet bool +} + +func (v NullableAccountBank) Get() *AccountBank { + return v.value +} + +func (v *NullableAccountBank) Set(val *AccountBank) { + v.value = val + v.isSet = true +} + +func (v NullableAccountBank) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountBank) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountBank(val *AccountBank) *NullableAccountBank { + return &NullableAccountBank{value: val, isSet: true} +} + +func (v NullableAccountBank) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountBank) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_account_card.go b/customer/model_account_card.go new file mode 100644 index 00000000..7118b442 --- /dev/null +++ b/customer/model_account_card.go @@ -0,0 +1,128 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AccountCard type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AccountCard{} + +// AccountCard struct for AccountCard +type AccountCard struct { + // The token id returned in tokenisation + TokenId *string `json:"token_id,omitempty"` +} + +// NewAccountCard instantiates a new AccountCard 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 NewAccountCard() *AccountCard { + this := AccountCard{} + return &this +} + +// NewAccountCardWithDefaults instantiates a new AccountCard 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 NewAccountCardWithDefaults() *AccountCard { + this := AccountCard{} + return &this +} + +// GetTokenId returns the TokenId field value if set, zero value otherwise. +func (o *AccountCard) GetTokenId() string { + if o == nil || utils.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 *AccountCard) GetTokenIdOk() (*string, bool) { + if o == nil || utils.IsNil(o.TokenId) { + return nil, false + } + return o.TokenId, true +} + +// HasTokenId returns a boolean if a field has been set. +func (o *AccountCard) HasTokenId() bool { + if o != nil && !utils.IsNil(o.TokenId) { + return true + } + + return false +} + +// SetTokenId gets a reference to the given string and assigns it to the TokenId field. +func (o *AccountCard) SetTokenId(v string) { + o.TokenId = &v +} + +func (o AccountCard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountCard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.TokenId) { + toSerialize["token_id"] = o.TokenId + } + return toSerialize, nil +} + +type NullableAccountCard struct { + value *AccountCard + isSet bool +} + +func (v NullableAccountCard) Get() *AccountCard { + return v.value +} + +func (v *NullableAccountCard) Set(val *AccountCard) { + v.value = val + v.isSet = true +} + +func (v NullableAccountCard) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountCard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountCard(val *AccountCard) *NullableAccountCard { + return &NullableAccountCard{value: val, isSet: true} +} + +func (v NullableAccountCard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountCard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_account_ewallet.go b/customer/model_account_ewallet.go new file mode 100644 index 00000000..54d2c64e --- /dev/null +++ b/customer/model_account_ewallet.go @@ -0,0 +1,211 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AccountEwallet type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AccountEwallet{} + +// AccountEwallet struct for AccountEwallet +type AccountEwallet struct { + // Unique account identifier as per the bank records. + AccountNumber *string `json:"account_number,omitempty"` + // Name of account holder as per the bank records. Needs to match the registered account name exactly. + AccountHolderName NullableString `json:"account_holder_name,omitempty"` + Currency *string `json:"currency,omitempty"` +} + +// NewAccountEwallet instantiates a new AccountEwallet 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 NewAccountEwallet() *AccountEwallet { + this := AccountEwallet{} + return &this +} + +// NewAccountEwalletWithDefaults instantiates a new AccountEwallet 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 NewAccountEwalletWithDefaults() *AccountEwallet { + this := AccountEwallet{} + return &this +} + +// GetAccountNumber returns the AccountNumber field value if set, zero value otherwise. +func (o *AccountEwallet) GetAccountNumber() string { + if o == nil || utils.IsNil(o.AccountNumber) { + var ret string + return ret + } + return *o.AccountNumber +} + +// GetAccountNumberOk returns a tuple with the AccountNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountEwallet) GetAccountNumberOk() (*string, bool) { + if o == nil || utils.IsNil(o.AccountNumber) { + return nil, false + } + return o.AccountNumber, true +} + +// HasAccountNumber returns a boolean if a field has been set. +func (o *AccountEwallet) HasAccountNumber() bool { + if o != nil && !utils.IsNil(o.AccountNumber) { + return true + } + + return false +} + +// SetAccountNumber gets a reference to the given string and assigns it to the AccountNumber field. +func (o *AccountEwallet) SetAccountNumber(v string) { + o.AccountNumber = &v +} + +// GetAccountHolderName returns the AccountHolderName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountEwallet) GetAccountHolderName() string { + if o == nil || utils.IsNil(o.AccountHolderName.Get()) { + var ret string + return ret + } + return *o.AccountHolderName.Get() +} + +// GetAccountHolderNameOk returns a tuple with the AccountHolderName 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 *AccountEwallet) GetAccountHolderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountHolderName.Get(), o.AccountHolderName.IsSet() +} + +// HasAccountHolderName returns a boolean if a field has been set. +func (o *AccountEwallet) HasAccountHolderName() bool { + if o != nil && o.AccountHolderName.IsSet() { + return true + } + + return false +} + +// SetAccountHolderName gets a reference to the given NullableString and assigns it to the AccountHolderName field. +func (o *AccountEwallet) SetAccountHolderName(v string) { + o.AccountHolderName.Set(&v) +} +// SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil +func (o *AccountEwallet) SetAccountHolderNameNil() { + o.AccountHolderName.Set(nil) +} + +// UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +func (o *AccountEwallet) UnsetAccountHolderName() { + o.AccountHolderName.Unset() +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *AccountEwallet) GetCurrency() string { + if o == nil || utils.IsNil(o.Currency) { + var ret string + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountEwallet) GetCurrencyOk() (*string, bool) { + if o == nil || utils.IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *AccountEwallet) HasCurrency() bool { + if o != nil && !utils.IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given string and assigns it to the Currency field. +func (o *AccountEwallet) SetCurrency(v string) { + o.Currency = &v +} + +func (o AccountEwallet) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountEwallet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.AccountNumber) { + toSerialize["account_number"] = o.AccountNumber + } + if o.AccountHolderName.IsSet() { + toSerialize["account_holder_name"] = o.AccountHolderName.Get() + } + if !utils.IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + return toSerialize, nil +} + +type NullableAccountEwallet struct { + value *AccountEwallet + isSet bool +} + +func (v NullableAccountEwallet) Get() *AccountEwallet { + return v.value +} + +func (v *NullableAccountEwallet) Set(val *AccountEwallet) { + v.value = val + v.isSet = true +} + +func (v NullableAccountEwallet) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountEwallet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountEwallet(val *AccountEwallet) *NullableAccountEwallet { + return &NullableAccountEwallet{value: val, isSet: true} +} + +func (v NullableAccountEwallet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountEwallet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_account_otc.go b/customer/model_account_otc.go new file mode 100644 index 00000000..6ab09e1e --- /dev/null +++ b/customer/model_account_otc.go @@ -0,0 +1,175 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AccountOTC type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AccountOTC{} + +// AccountOTC struct for AccountOTC +type AccountOTC struct { + // Complete fixed payment code (including prefix) + PaymentCode *string `json:"payment_code,omitempty"` + // YYYY-MM-DD string with expiry date for the payment code + ExpiresAt NullableString `json:"expires_at,omitempty"` +} + +// NewAccountOTC instantiates a new AccountOTC 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 NewAccountOTC() *AccountOTC { + this := AccountOTC{} + return &this +} + +// NewAccountOTCWithDefaults instantiates a new AccountOTC 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 NewAccountOTCWithDefaults() *AccountOTC { + this := AccountOTC{} + return &this +} + +// GetPaymentCode returns the PaymentCode field value if set, zero value otherwise. +func (o *AccountOTC) GetPaymentCode() string { + if o == nil || utils.IsNil(o.PaymentCode) { + var ret string + return ret + } + return *o.PaymentCode +} + +// GetPaymentCodeOk returns a tuple with the PaymentCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountOTC) GetPaymentCodeOk() (*string, bool) { + if o == nil || utils.IsNil(o.PaymentCode) { + return nil, false + } + return o.PaymentCode, true +} + +// HasPaymentCode returns a boolean if a field has been set. +func (o *AccountOTC) HasPaymentCode() bool { + if o != nil && !utils.IsNil(o.PaymentCode) { + return true + } + + return false +} + +// SetPaymentCode gets a reference to the given string and assigns it to the PaymentCode field. +func (o *AccountOTC) SetPaymentCode(v string) { + o.PaymentCode = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountOTC) GetExpiresAt() string { + if o == nil || utils.IsNil(o.ExpiresAt.Get()) { + var ret string + return ret + } + return *o.ExpiresAt.Get() +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt 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 *AccountOTC) GetExpiresAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *AccountOTC) HasExpiresAt() bool { + if o != nil && o.ExpiresAt.IsSet() { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given NullableString and assigns it to the ExpiresAt field. +func (o *AccountOTC) SetExpiresAt(v string) { + o.ExpiresAt.Set(&v) +} +// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil +func (o *AccountOTC) SetExpiresAtNil() { + o.ExpiresAt.Set(nil) +} + +// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +func (o *AccountOTC) UnsetExpiresAt() { + o.ExpiresAt.Unset() +} + +func (o AccountOTC) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountOTC) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.PaymentCode) { + toSerialize["payment_code"] = o.PaymentCode + } + if o.ExpiresAt.IsSet() { + toSerialize["expires_at"] = o.ExpiresAt.Get() + } + return toSerialize, nil +} + +type NullableAccountOTC struct { + value *AccountOTC + isSet bool +} + +func (v NullableAccountOTC) Get() *AccountOTC { + return v.value +} + +func (v *NullableAccountOTC) Set(val *AccountOTC) { + v.value = val + v.isSet = true +} + +func (v NullableAccountOTC) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountOTC) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountOTC(val *AccountOTC) *NullableAccountOTC { + return &NullableAccountOTC{value: val, isSet: true} +} + +func (v NullableAccountOTC) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountOTC) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_account_pay_later.go b/customer/model_account_pay_later.go new file mode 100644 index 00000000..9eb00931 --- /dev/null +++ b/customer/model_account_pay_later.go @@ -0,0 +1,211 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AccountPayLater type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AccountPayLater{} + +// AccountPayLater struct for AccountPayLater +type AccountPayLater struct { + // Alphanumeric string identifying this account. Usually an email address or phone number. + AccountId *string `json:"account_id,omitempty"` + // Name of account holder as per the cardless credit account. + AccountHolderName NullableString `json:"account_holder_name,omitempty"` + Currency *string `json:"currency,omitempty"` +} + +// NewAccountPayLater instantiates a new AccountPayLater 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 NewAccountPayLater() *AccountPayLater { + this := AccountPayLater{} + return &this +} + +// NewAccountPayLaterWithDefaults instantiates a new AccountPayLater 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 NewAccountPayLaterWithDefaults() *AccountPayLater { + this := AccountPayLater{} + return &this +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise. +func (o *AccountPayLater) GetAccountId() string { + if o == nil || utils.IsNil(o.AccountId) { + var ret string + return ret + } + return *o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountPayLater) GetAccountIdOk() (*string, bool) { + if o == nil || utils.IsNil(o.AccountId) { + return nil, false + } + return o.AccountId, true +} + +// HasAccountId returns a boolean if a field has been set. +func (o *AccountPayLater) HasAccountId() bool { + if o != nil && !utils.IsNil(o.AccountId) { + return true + } + + return false +} + +// SetAccountId gets a reference to the given string and assigns it to the AccountId field. +func (o *AccountPayLater) SetAccountId(v string) { + o.AccountId = &v +} + +// GetAccountHolderName returns the AccountHolderName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccountPayLater) GetAccountHolderName() string { + if o == nil || utils.IsNil(o.AccountHolderName.Get()) { + var ret string + return ret + } + return *o.AccountHolderName.Get() +} + +// GetAccountHolderNameOk returns a tuple with the AccountHolderName 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 *AccountPayLater) GetAccountHolderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AccountHolderName.Get(), o.AccountHolderName.IsSet() +} + +// HasAccountHolderName returns a boolean if a field has been set. +func (o *AccountPayLater) HasAccountHolderName() bool { + if o != nil && o.AccountHolderName.IsSet() { + return true + } + + return false +} + +// SetAccountHolderName gets a reference to the given NullableString and assigns it to the AccountHolderName field. +func (o *AccountPayLater) SetAccountHolderName(v string) { + o.AccountHolderName.Set(&v) +} +// SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil +func (o *AccountPayLater) SetAccountHolderNameNil() { + o.AccountHolderName.Set(nil) +} + +// UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +func (o *AccountPayLater) UnsetAccountHolderName() { + o.AccountHolderName.Unset() +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *AccountPayLater) GetCurrency() string { + if o == nil || utils.IsNil(o.Currency) { + var ret string + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountPayLater) GetCurrencyOk() (*string, bool) { + if o == nil || utils.IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *AccountPayLater) HasCurrency() bool { + if o != nil && !utils.IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given string and assigns it to the Currency field. +func (o *AccountPayLater) SetCurrency(v string) { + o.Currency = &v +} + +func (o AccountPayLater) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountPayLater) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.AccountId) { + toSerialize["account_id"] = o.AccountId + } + if o.AccountHolderName.IsSet() { + toSerialize["account_holder_name"] = o.AccountHolderName.Get() + } + if !utils.IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + return toSerialize, nil +} + +type NullableAccountPayLater struct { + value *AccountPayLater + isSet bool +} + +func (v NullableAccountPayLater) Get() *AccountPayLater { + return v.value +} + +func (v *NullableAccountPayLater) Set(val *AccountPayLater) { + v.value = val + v.isSet = true +} + +func (v NullableAccountPayLater) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountPayLater) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountPayLater(val *AccountPayLater) *NullableAccountPayLater { + return &NullableAccountPayLater{value: val, isSet: true} +} + +func (v NullableAccountPayLater) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountPayLater) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_account_qr_code.go b/customer/model_account_qr_code.go new file mode 100644 index 00000000..835f26b6 --- /dev/null +++ b/customer/model_account_qr_code.go @@ -0,0 +1,128 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AccountQRCode type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AccountQRCode{} + +// AccountQRCode struct for AccountQRCode +type AccountQRCode struct { + // String representation of the QR Code image + QrString *string `json:"qr_string,omitempty"` +} + +// NewAccountQRCode instantiates a new AccountQRCode 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 NewAccountQRCode() *AccountQRCode { + this := AccountQRCode{} + return &this +} + +// NewAccountQRCodeWithDefaults instantiates a new AccountQRCode 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 NewAccountQRCodeWithDefaults() *AccountQRCode { + this := AccountQRCode{} + return &this +} + +// GetQrString returns the QrString field value if set, zero value otherwise. +func (o *AccountQRCode) GetQrString() string { + if o == nil || utils.IsNil(o.QrString) { + var ret string + return ret + } + return *o.QrString +} + +// GetQrStringOk returns a tuple with the QrString field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountQRCode) GetQrStringOk() (*string, bool) { + if o == nil || utils.IsNil(o.QrString) { + return nil, false + } + return o.QrString, true +} + +// HasQrString returns a boolean if a field has been set. +func (o *AccountQRCode) HasQrString() bool { + if o != nil && !utils.IsNil(o.QrString) { + return true + } + + return false +} + +// SetQrString gets a reference to the given string and assigns it to the QrString field. +func (o *AccountQRCode) SetQrString(v string) { + o.QrString = &v +} + +func (o AccountQRCode) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountQRCode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.QrString) { + toSerialize["qr_string"] = o.QrString + } + return toSerialize, nil +} + +type NullableAccountQRCode struct { + value *AccountQRCode + isSet bool +} + +func (v NullableAccountQRCode) Get() *AccountQRCode { + return v.value +} + +func (v *NullableAccountQRCode) Set(val *AccountQRCode) { + v.value = val + v.isSet = true +} + +func (v NullableAccountQRCode) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountQRCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountQRCode(val *AccountQRCode) *NullableAccountQRCode { + return &NullableAccountQRCode{value: val, isSet: true} +} + +func (v NullableAccountQRCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountQRCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_address.go b/customer/model_address.go new file mode 100644 index 00000000..7d97322c --- /dev/null +++ b/customer/model_address.go @@ -0,0 +1,520 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" + "time" +) + +// checks if the Address type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &Address{} + +// Address struct for Address +type Address struct { + Id *string `json:"id,omitempty"` + Category NullableString `json:"category"` + Country string `json:"country"` + ProvinceState NullableString `json:"province_state"` + City NullableString `json:"city"` + PostalCode NullableString `json:"postal_code"` + StreetLine1 NullableString `json:"street_line1"` + StreetLine2 NullableString `json:"street_line2"` + Status NullableAddressStatus `json:"status,omitempty"` + IsPrimary NullableBool `json:"is_primary"` + Meta map[string]interface{} `json:"meta,omitempty"` + Created *time.Time `json:"created,omitempty"` + Updated *time.Time `json:"updated,omitempty"` +} + +// NewAddress instantiates a new Address 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 NewAddress(category NullableString, country string, provinceState NullableString, city NullableString, postalCode NullableString, streetLine1 NullableString, streetLine2 NullableString, isPrimary NullableBool) *Address { + this := Address{} + this.Category = category + this.Country = country + this.ProvinceState = provinceState + this.City = city + this.PostalCode = postalCode + this.StreetLine1 = streetLine1 + this.StreetLine2 = streetLine2 + this.IsPrimary = isPrimary + return &this +} + +// NewAddressWithDefaults instantiates a new Address 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 NewAddressWithDefaults() *Address { + this := Address{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Address) GetId() string { + if o == nil || utils.IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Address) GetIdOk() (*string, bool) { + if o == nil || utils.IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Address) HasId() bool { + if o != nil && !utils.IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Address) SetId(v string) { + o.Id = &v +} + +// GetCategory returns the Category field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Address) GetCategory() string { + if o == nil || o.Category.Get() == nil { + var ret string + return ret + } + + return *o.Category.Get() +} + +// GetCategoryOk returns a tuple with the Category field value +// 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 *Address) GetCategoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Category.Get(), o.Category.IsSet() +} + +// SetCategory sets field value +func (o *Address) SetCategory(v string) { + o.Category.Set(&v) +} + +// GetCountry returns the Country field value +func (o *Address) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *Address) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *Address) SetCountry(v string) { + o.Country = v +} + +// GetProvinceState returns the ProvinceState field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Address) GetProvinceState() string { + if o == nil || o.ProvinceState.Get() == nil { + var ret string + return ret + } + + return *o.ProvinceState.Get() +} + +// GetProvinceStateOk returns a tuple with the ProvinceState field value +// 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 *Address) GetProvinceStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProvinceState.Get(), o.ProvinceState.IsSet() +} + +// SetProvinceState sets field value +func (o *Address) SetProvinceState(v string) { + o.ProvinceState.Set(&v) +} + +// GetCity returns the City field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Address) GetCity() string { + if o == nil || o.City.Get() == nil { + var ret string + return ret + } + + return *o.City.Get() +} + +// GetCityOk returns a tuple with the City field value +// 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 *Address) GetCityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.City.Get(), o.City.IsSet() +} + +// SetCity sets field value +func (o *Address) SetCity(v string) { + o.City.Set(&v) +} + +// GetPostalCode returns the PostalCode field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Address) GetPostalCode() string { + if o == nil || o.PostalCode.Get() == nil { + var ret string + return ret + } + + return *o.PostalCode.Get() +} + +// GetPostalCodeOk returns a tuple with the PostalCode field value +// 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 *Address) GetPostalCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PostalCode.Get(), o.PostalCode.IsSet() +} + +// SetPostalCode sets field value +func (o *Address) SetPostalCode(v string) { + o.PostalCode.Set(&v) +} + +// GetStreetLine1 returns the StreetLine1 field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Address) GetStreetLine1() string { + if o == nil || o.StreetLine1.Get() == nil { + var ret string + return ret + } + + return *o.StreetLine1.Get() +} + +// GetStreetLine1Ok returns a tuple with the StreetLine1 field value +// 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 *Address) GetStreetLine1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.StreetLine1.Get(), o.StreetLine1.IsSet() +} + +// SetStreetLine1 sets field value +func (o *Address) SetStreetLine1(v string) { + o.StreetLine1.Set(&v) +} + +// GetStreetLine2 returns the StreetLine2 field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Address) GetStreetLine2() string { + if o == nil || o.StreetLine2.Get() == nil { + var ret string + return ret + } + + return *o.StreetLine2.Get() +} + +// GetStreetLine2Ok returns a tuple with the StreetLine2 field value +// 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 *Address) GetStreetLine2Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.StreetLine2.Get(), o.StreetLine2.IsSet() +} + +// SetStreetLine2 sets field value +func (o *Address) SetStreetLine2(v string) { + o.StreetLine2.Set(&v) +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Address) GetStatus() AddressStatus { + if o == nil || utils.IsNil(o.Status.Get()) { + var ret AddressStatus + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status 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 *Address) GetStatusOk() (*AddressStatus, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *Address) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableAddressStatus and assigns it to the Status field. +func (o *Address) SetStatus(v AddressStatus) { + o.Status.Set(&v) +} +// SetStatusNil sets the value for Status to be an explicit nil +func (o *Address) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *Address) UnsetStatus() { + o.Status.Unset() +} + +// GetIsPrimary returns the IsPrimary field value +// If the value is explicit nil, the zero value for bool will be returned +func (o *Address) GetIsPrimary() bool { + if o == nil || o.IsPrimary.Get() == nil { + var ret bool + return ret + } + + return *o.IsPrimary.Get() +} + +// GetIsPrimaryOk returns a tuple with the IsPrimary field value +// 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 *Address) GetIsPrimaryOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsPrimary.Get(), o.IsPrimary.IsSet() +} + +// SetIsPrimary sets field value +func (o *Address) SetIsPrimary(v bool) { + o.IsPrimary.Set(&v) +} + +// GetMeta returns the Meta field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Address) GetMeta() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Meta +} + +// GetMetaOk returns a tuple with the Meta 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 *Address) GetMetaOk() (map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Meta) { + return map[string]interface{}{}, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *Address) HasMeta() bool { + if o != nil && utils.IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given map[string]interface{} and assigns it to the Meta field. +func (o *Address) SetMeta(v map[string]interface{}) { + o.Meta = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *Address) GetCreated() time.Time { + if o == nil || utils.IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Address) GetCreatedOk() (*time.Time, bool) { + if o == nil || utils.IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *Address) HasCreated() bool { + if o != nil && !utils.IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *Address) SetCreated(v time.Time) { + o.Created = &v +} + +// GetUpdated returns the Updated field value if set, zero value otherwise. +func (o *Address) GetUpdated() time.Time { + if o == nil || utils.IsNil(o.Updated) { + var ret time.Time + return ret + } + return *o.Updated +} + +// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Address) GetUpdatedOk() (*time.Time, bool) { + if o == nil || utils.IsNil(o.Updated) { + return nil, false + } + return o.Updated, true +} + +// HasUpdated returns a boolean if a field has been set. +func (o *Address) HasUpdated() bool { + if o != nil && !utils.IsNil(o.Updated) { + return true + } + + return false +} + +// SetUpdated gets a reference to the given time.Time and assigns it to the Updated field. +func (o *Address) SetUpdated(v time.Time) { + o.Updated = &v +} + +func (o Address) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Address) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["category"] = o.Category.Get() + + toSerialize["country"] = o.Country + toSerialize["province_state"] = o.ProvinceState.Get() + + toSerialize["city"] = o.City.Get() + + toSerialize["postal_code"] = o.PostalCode.Get() + + toSerialize["street_line1"] = o.StreetLine1.Get() + + toSerialize["street_line2"] = o.StreetLine2.Get() + + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + toSerialize["is_primary"] = o.IsPrimary.Get() + + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + if !utils.IsNil(o.Created) { + toSerialize["created"] = o.Created + } + if !utils.IsNil(o.Updated) { + toSerialize["updated"] = o.Updated + } + return toSerialize, nil +} + +type NullableAddress struct { + value *Address + isSet bool +} + +func (v NullableAddress) Get() *Address { + return v.value +} + +func (v *NullableAddress) Set(val *Address) { + v.value = val + v.isSet = true +} + +func (v NullableAddress) IsSet() bool { + return v.isSet +} + +func (v *NullableAddress) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddress(val *Address) *NullableAddress { + return &NullableAddress{value: val, isSet: true} +} + +func (v NullableAddress) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddress) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_address_request.go b/customer/model_address_request.go new file mode 100644 index 00000000..4e5a523a --- /dev/null +++ b/customer/model_address_request.go @@ -0,0 +1,477 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the AddressRequest type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &AddressRequest{} + +// AddressRequest struct for AddressRequest +type AddressRequest struct { + // Home, work or provincial + Category *string `json:"category,omitempty"` + // ISO3166-2 country code + CountryCode NullableString `json:"country_code,omitempty"` + ProvinceState *string `json:"province_state,omitempty"` + City *string `json:"city,omitempty"` + Suburb *string `json:"suburb,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + Line1 *string `json:"line_1,omitempty"` + Line2 *string `json:"line_2,omitempty"` + Status NullableAddressStatus `json:"status,omitempty"` + IsPrimary *bool `json:"is_primary,omitempty"` +} + +// NewAddressRequest instantiates a new AddressRequest 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 NewAddressRequest() *AddressRequest { + this := AddressRequest{} + var isPrimary bool = false + this.IsPrimary = &isPrimary + return &this +} + +// NewAddressRequestWithDefaults instantiates a new AddressRequest 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 NewAddressRequestWithDefaults() *AddressRequest { + this := AddressRequest{} + var isPrimary bool = false + this.IsPrimary = &isPrimary + return &this +} + +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *AddressRequest) GetCategory() string { + if o == nil || utils.IsNil(o.Category) { + var ret string + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetCategoryOk() (*string, bool) { + if o == nil || utils.IsNil(o.Category) { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *AddressRequest) HasCategory() bool { + if o != nil && !utils.IsNil(o.Category) { + return true + } + + return false +} + +// SetCategory gets a reference to the given string and assigns it to the Category field. +func (o *AddressRequest) SetCategory(v string) { + o.Category = &v +} + +// GetCountryCode returns the CountryCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AddressRequest) GetCountryCode() string { + if o == nil || utils.IsNil(o.CountryCode.Get()) { + var ret string + return ret + } + return *o.CountryCode.Get() +} + +// GetCountryCodeOk returns a tuple with the CountryCode 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 *AddressRequest) GetCountryCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CountryCode.Get(), o.CountryCode.IsSet() +} + +// HasCountryCode returns a boolean if a field has been set. +func (o *AddressRequest) HasCountryCode() bool { + if o != nil && o.CountryCode.IsSet() { + return true + } + + return false +} + +// SetCountryCode gets a reference to the given NullableString and assigns it to the CountryCode field. +func (o *AddressRequest) SetCountryCode(v string) { + o.CountryCode.Set(&v) +} +// SetCountryCodeNil sets the value for CountryCode to be an explicit nil +func (o *AddressRequest) SetCountryCodeNil() { + o.CountryCode.Set(nil) +} + +// UnsetCountryCode ensures that no value is present for CountryCode, not even an explicit nil +func (o *AddressRequest) UnsetCountryCode() { + o.CountryCode.Unset() +} + +// GetProvinceState returns the ProvinceState field value if set, zero value otherwise. +func (o *AddressRequest) GetProvinceState() string { + if o == nil || utils.IsNil(o.ProvinceState) { + var ret string + return ret + } + return *o.ProvinceState +} + +// GetProvinceStateOk returns a tuple with the ProvinceState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetProvinceStateOk() (*string, bool) { + if o == nil || utils.IsNil(o.ProvinceState) { + return nil, false + } + return o.ProvinceState, true +} + +// HasProvinceState returns a boolean if a field has been set. +func (o *AddressRequest) HasProvinceState() bool { + if o != nil && !utils.IsNil(o.ProvinceState) { + return true + } + + return false +} + +// SetProvinceState gets a reference to the given string and assigns it to the ProvinceState field. +func (o *AddressRequest) SetProvinceState(v string) { + o.ProvinceState = &v +} + +// GetCity returns the City field value if set, zero value otherwise. +func (o *AddressRequest) GetCity() string { + if o == nil || utils.IsNil(o.City) { + var ret string + return ret + } + return *o.City +} + +// GetCityOk returns a tuple with the City field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetCityOk() (*string, bool) { + if o == nil || utils.IsNil(o.City) { + return nil, false + } + return o.City, true +} + +// HasCity returns a boolean if a field has been set. +func (o *AddressRequest) HasCity() bool { + if o != nil && !utils.IsNil(o.City) { + return true + } + + return false +} + +// SetCity gets a reference to the given string and assigns it to the City field. +func (o *AddressRequest) SetCity(v string) { + o.City = &v +} + +// GetSuburb returns the Suburb field value if set, zero value otherwise. +func (o *AddressRequest) GetSuburb() string { + if o == nil || utils.IsNil(o.Suburb) { + var ret string + return ret + } + return *o.Suburb +} + +// GetSuburbOk returns a tuple with the Suburb field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetSuburbOk() (*string, bool) { + if o == nil || utils.IsNil(o.Suburb) { + return nil, false + } + return o.Suburb, true +} + +// HasSuburb returns a boolean if a field has been set. +func (o *AddressRequest) HasSuburb() bool { + if o != nil && !utils.IsNil(o.Suburb) { + return true + } + + return false +} + +// SetSuburb gets a reference to the given string and assigns it to the Suburb field. +func (o *AddressRequest) SetSuburb(v string) { + o.Suburb = &v +} + +// GetPostalCode returns the PostalCode field value if set, zero value otherwise. +func (o *AddressRequest) GetPostalCode() string { + if o == nil || utils.IsNil(o.PostalCode) { + var ret string + return ret + } + return *o.PostalCode +} + +// GetPostalCodeOk returns a tuple with the PostalCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetPostalCodeOk() (*string, bool) { + if o == nil || utils.IsNil(o.PostalCode) { + return nil, false + } + return o.PostalCode, true +} + +// HasPostalCode returns a boolean if a field has been set. +func (o *AddressRequest) HasPostalCode() bool { + if o != nil && !utils.IsNil(o.PostalCode) { + return true + } + + return false +} + +// SetPostalCode gets a reference to the given string and assigns it to the PostalCode field. +func (o *AddressRequest) SetPostalCode(v string) { + o.PostalCode = &v +} + +// GetLine1 returns the Line1 field value if set, zero value otherwise. +func (o *AddressRequest) GetLine1() string { + if o == nil || utils.IsNil(o.Line1) { + var ret string + return ret + } + return *o.Line1 +} + +// GetLine1Ok returns a tuple with the Line1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetLine1Ok() (*string, bool) { + if o == nil || utils.IsNil(o.Line1) { + return nil, false + } + return o.Line1, true +} + +// HasLine1 returns a boolean if a field has been set. +func (o *AddressRequest) HasLine1() bool { + if o != nil && !utils.IsNil(o.Line1) { + return true + } + + return false +} + +// SetLine1 gets a reference to the given string and assigns it to the Line1 field. +func (o *AddressRequest) SetLine1(v string) { + o.Line1 = &v +} + +// GetLine2 returns the Line2 field value if set, zero value otherwise. +func (o *AddressRequest) GetLine2() string { + if o == nil || utils.IsNil(o.Line2) { + var ret string + return ret + } + return *o.Line2 +} + +// GetLine2Ok returns a tuple with the Line2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetLine2Ok() (*string, bool) { + if o == nil || utils.IsNil(o.Line2) { + return nil, false + } + return o.Line2, true +} + +// HasLine2 returns a boolean if a field has been set. +func (o *AddressRequest) HasLine2() bool { + if o != nil && !utils.IsNil(o.Line2) { + return true + } + + return false +} + +// SetLine2 gets a reference to the given string and assigns it to the Line2 field. +func (o *AddressRequest) SetLine2(v string) { + o.Line2 = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AddressRequest) GetStatus() AddressStatus { + if o == nil || utils.IsNil(o.Status.Get()) { + var ret AddressStatus + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status 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 *AddressRequest) GetStatusOk() (*AddressStatus, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *AddressRequest) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableAddressStatus and assigns it to the Status field. +func (o *AddressRequest) SetStatus(v AddressStatus) { + o.Status.Set(&v) +} +// SetStatusNil sets the value for Status to be an explicit nil +func (o *AddressRequest) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *AddressRequest) UnsetStatus() { + o.Status.Unset() +} + +// GetIsPrimary returns the IsPrimary field value if set, zero value otherwise. +func (o *AddressRequest) GetIsPrimary() bool { + if o == nil || utils.IsNil(o.IsPrimary) { + var ret bool + return ret + } + return *o.IsPrimary +} + +// GetIsPrimaryOk returns a tuple with the IsPrimary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetIsPrimaryOk() (*bool, bool) { + if o == nil || utils.IsNil(o.IsPrimary) { + return nil, false + } + return o.IsPrimary, true +} + +// HasIsPrimary returns a boolean if a field has been set. +func (o *AddressRequest) HasIsPrimary() bool { + if o != nil && !utils.IsNil(o.IsPrimary) { + return true + } + + return false +} + +// SetIsPrimary gets a reference to the given bool and assigns it to the IsPrimary field. +func (o *AddressRequest) SetIsPrimary(v bool) { + o.IsPrimary = &v +} + +func (o AddressRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.Category) { + toSerialize["category"] = o.Category + } + if o.CountryCode.IsSet() { + toSerialize["country_code"] = o.CountryCode.Get() + } + if !utils.IsNil(o.ProvinceState) { + toSerialize["province_state"] = o.ProvinceState + } + if !utils.IsNil(o.City) { + toSerialize["city"] = o.City + } + if !utils.IsNil(o.Suburb) { + toSerialize["suburb"] = o.Suburb + } + if !utils.IsNil(o.PostalCode) { + toSerialize["postal_code"] = o.PostalCode + } + if !utils.IsNil(o.Line1) { + toSerialize["line_1"] = o.Line1 + } + if !utils.IsNil(o.Line2) { + toSerialize["line_2"] = o.Line2 + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + if !utils.IsNil(o.IsPrimary) { + toSerialize["is_primary"] = o.IsPrimary + } + return toSerialize, nil +} + +type NullableAddressRequest struct { + value *AddressRequest + isSet bool +} + +func (v NullableAddressRequest) Get() *AddressRequest { + return v.value +} + +func (v *NullableAddressRequest) Set(val *AddressRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddressRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressRequest(val *AddressRequest) *NullableAddressRequest { + return &NullableAddressRequest{value: val, isSet: true} +} + +func (v NullableAddressRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_address_status.go b/customer/model_address_status.go new file mode 100644 index 00000000..ebc18c21 --- /dev/null +++ b/customer/model_address_status.go @@ -0,0 +1,114 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + "fmt" +) + +// AddressStatus the model 'AddressStatus' +type AddressStatus string + +// List of AddressStatus +const ( + ADDRESSSTATUS_ACTIVE AddressStatus = "ACTIVE" + ADDRESSSTATUS_DELETED AddressStatus = "DELETED" +) + +// All allowed values of AddressStatus enum +var AllowedAddressStatusEnumValues = []AddressStatus{ + "ACTIVE", + "DELETED", +} + +func (v *AddressStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AddressStatus(value) + for _, existing := range AllowedAddressStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid AddressStatus", value) +} + +// NewAddressStatusFromValue returns a pointer to a valid AddressStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAddressStatusFromValue(v string) (*AddressStatus, error) { + ev := AddressStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AddressStatus: valid values are %v", v, AllowedAddressStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AddressStatus) IsValid() bool { + for _, existing := range AllowedAddressStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +func (v AddressStatus) String() string { + return string(v) +} + +// Ptr returns reference to AddressStatus value +func (v AddressStatus) Ptr() *AddressStatus { + return &v +} + +type NullableAddressStatus struct { + value *AddressStatus + isSet bool +} + +func (v NullableAddressStatus) Get() *AddressStatus { + return v.value +} + +func (v *NullableAddressStatus) Set(val *AddressStatus) { + v.value = val + v.isSet = true +} + +func (v NullableAddressStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressStatus(val *AddressStatus) *NullableAddressStatus { + return &NullableAddressStatus{value: val, isSet: true} +} + +func (v NullableAddressStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/customer/model_business_detail.go b/customer/model_business_detail.go new file mode 100644 index 00000000..5a745d37 --- /dev/null +++ b/customer/model_business_detail.go @@ -0,0 +1,316 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the BusinessDetail type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &BusinessDetail{} + +// BusinessDetail struct for BusinessDetail +type BusinessDetail struct { + BusinessName *string `json:"business_name,omitempty"` + BusinessType NullableString `json:"business_type,omitempty"` + DateOfRegistration NullableString `json:"date_of_registration,omitempty"` + NatureOfBusiness NullableString `json:"nature_of_business,omitempty"` + // ISO3166-2 country code + BusinessDomicile NullableString `json:"business_domicile,omitempty"` +} + +// NewBusinessDetail instantiates a new BusinessDetail 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 NewBusinessDetail() *BusinessDetail { + this := BusinessDetail{} + return &this +} + +// NewBusinessDetailWithDefaults instantiates a new BusinessDetail 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 NewBusinessDetailWithDefaults() *BusinessDetail { + this := BusinessDetail{} + return &this +} + +// GetBusinessName returns the BusinessName field value if set, zero value otherwise. +func (o *BusinessDetail) GetBusinessName() string { + if o == nil || utils.IsNil(o.BusinessName) { + var ret string + return ret + } + return *o.BusinessName +} + +// GetBusinessNameOk returns a tuple with the BusinessName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BusinessDetail) GetBusinessNameOk() (*string, bool) { + if o == nil || utils.IsNil(o.BusinessName) { + return nil, false + } + return o.BusinessName, true +} + +// HasBusinessName returns a boolean if a field has been set. +func (o *BusinessDetail) HasBusinessName() bool { + if o != nil && !utils.IsNil(o.BusinessName) { + return true + } + + return false +} + +// SetBusinessName gets a reference to the given string and assigns it to the BusinessName field. +func (o *BusinessDetail) SetBusinessName(v string) { + o.BusinessName = &v +} + +// GetBusinessType returns the BusinessType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BusinessDetail) GetBusinessType() string { + if o == nil || utils.IsNil(o.BusinessType.Get()) { + var ret string + return ret + } + return *o.BusinessType.Get() +} + +// GetBusinessTypeOk returns a tuple with the BusinessType 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 *BusinessDetail) GetBusinessTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BusinessType.Get(), o.BusinessType.IsSet() +} + +// HasBusinessType returns a boolean if a field has been set. +func (o *BusinessDetail) HasBusinessType() bool { + if o != nil && o.BusinessType.IsSet() { + return true + } + + return false +} + +// SetBusinessType gets a reference to the given NullableString and assigns it to the BusinessType field. +func (o *BusinessDetail) SetBusinessType(v string) { + o.BusinessType.Set(&v) +} +// SetBusinessTypeNil sets the value for BusinessType to be an explicit nil +func (o *BusinessDetail) SetBusinessTypeNil() { + o.BusinessType.Set(nil) +} + +// UnsetBusinessType ensures that no value is present for BusinessType, not even an explicit nil +func (o *BusinessDetail) UnsetBusinessType() { + o.BusinessType.Unset() +} + +// GetDateOfRegistration returns the DateOfRegistration field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BusinessDetail) GetDateOfRegistration() string { + if o == nil || utils.IsNil(o.DateOfRegistration.Get()) { + var ret string + return ret + } + return *o.DateOfRegistration.Get() +} + +// GetDateOfRegistrationOk returns a tuple with the DateOfRegistration 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 *BusinessDetail) GetDateOfRegistrationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DateOfRegistration.Get(), o.DateOfRegistration.IsSet() +} + +// HasDateOfRegistration returns a boolean if a field has been set. +func (o *BusinessDetail) HasDateOfRegistration() bool { + if o != nil && o.DateOfRegistration.IsSet() { + return true + } + + return false +} + +// SetDateOfRegistration gets a reference to the given NullableString and assigns it to the DateOfRegistration field. +func (o *BusinessDetail) SetDateOfRegistration(v string) { + o.DateOfRegistration.Set(&v) +} +// SetDateOfRegistrationNil sets the value for DateOfRegistration to be an explicit nil +func (o *BusinessDetail) SetDateOfRegistrationNil() { + o.DateOfRegistration.Set(nil) +} + +// UnsetDateOfRegistration ensures that no value is present for DateOfRegistration, not even an explicit nil +func (o *BusinessDetail) UnsetDateOfRegistration() { + o.DateOfRegistration.Unset() +} + +// GetNatureOfBusiness returns the NatureOfBusiness field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BusinessDetail) GetNatureOfBusiness() string { + if o == nil || utils.IsNil(o.NatureOfBusiness.Get()) { + var ret string + return ret + } + return *o.NatureOfBusiness.Get() +} + +// GetNatureOfBusinessOk returns a tuple with the NatureOfBusiness 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 *BusinessDetail) GetNatureOfBusinessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NatureOfBusiness.Get(), o.NatureOfBusiness.IsSet() +} + +// HasNatureOfBusiness returns a boolean if a field has been set. +func (o *BusinessDetail) HasNatureOfBusiness() bool { + if o != nil && o.NatureOfBusiness.IsSet() { + return true + } + + return false +} + +// SetNatureOfBusiness gets a reference to the given NullableString and assigns it to the NatureOfBusiness field. +func (o *BusinessDetail) SetNatureOfBusiness(v string) { + o.NatureOfBusiness.Set(&v) +} +// SetNatureOfBusinessNil sets the value for NatureOfBusiness to be an explicit nil +func (o *BusinessDetail) SetNatureOfBusinessNil() { + o.NatureOfBusiness.Set(nil) +} + +// UnsetNatureOfBusiness ensures that no value is present for NatureOfBusiness, not even an explicit nil +func (o *BusinessDetail) UnsetNatureOfBusiness() { + o.NatureOfBusiness.Unset() +} + +// GetBusinessDomicile returns the BusinessDomicile field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BusinessDetail) GetBusinessDomicile() string { + if o == nil || utils.IsNil(o.BusinessDomicile.Get()) { + var ret string + return ret + } + return *o.BusinessDomicile.Get() +} + +// GetBusinessDomicileOk returns a tuple with the BusinessDomicile 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 *BusinessDetail) GetBusinessDomicileOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BusinessDomicile.Get(), o.BusinessDomicile.IsSet() +} + +// HasBusinessDomicile returns a boolean if a field has been set. +func (o *BusinessDetail) HasBusinessDomicile() bool { + if o != nil && o.BusinessDomicile.IsSet() { + return true + } + + return false +} + +// SetBusinessDomicile gets a reference to the given NullableString and assigns it to the BusinessDomicile field. +func (o *BusinessDetail) SetBusinessDomicile(v string) { + o.BusinessDomicile.Set(&v) +} +// SetBusinessDomicileNil sets the value for BusinessDomicile to be an explicit nil +func (o *BusinessDetail) SetBusinessDomicileNil() { + o.BusinessDomicile.Set(nil) +} + +// UnsetBusinessDomicile ensures that no value is present for BusinessDomicile, not even an explicit nil +func (o *BusinessDetail) UnsetBusinessDomicile() { + o.BusinessDomicile.Unset() +} + +func (o BusinessDetail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BusinessDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.BusinessName) { + toSerialize["business_name"] = o.BusinessName + } + if o.BusinessType.IsSet() { + toSerialize["business_type"] = o.BusinessType.Get() + if o.BusinessType.Get() != nil && (*o.BusinessType.Get() != "CORPORATION" && *o.BusinessType.Get() != "SOLE_PROPRIETOR" && *o.BusinessType.Get() != "PARTNERSHIP" && *o.BusinessType.Get() != "COOPERATIVE" && *o.BusinessType.Get() != "TRUST" && *o.BusinessType.Get() != "NON_PROFIT" && *o.BusinessType.Get() != "GOVERNMENT") { + toSerialize["business_type"] = nil + return toSerialize, utils.NewError("invalid value for BusinessType when marshalling to JSON, must be one of CORPORATION, SOLE_PROPRIETOR, PARTNERSHIP, COOPERATIVE, TRUST, NON_PROFIT, GOVERNMENT") + } + } + if o.DateOfRegistration.IsSet() { + toSerialize["date_of_registration"] = o.DateOfRegistration.Get() + } + if o.NatureOfBusiness.IsSet() { + toSerialize["nature_of_business"] = o.NatureOfBusiness.Get() + } + if o.BusinessDomicile.IsSet() { + toSerialize["business_domicile"] = o.BusinessDomicile.Get() + } + return toSerialize, nil +} + +type NullableBusinessDetail struct { + value *BusinessDetail + isSet bool +} + +func (v NullableBusinessDetail) Get() *BusinessDetail { + return v.value +} + +func (v *NullableBusinessDetail) Set(val *BusinessDetail) { + v.value = val + v.isSet = true +} + +func (v NullableBusinessDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableBusinessDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBusinessDetail(val *BusinessDetail) *NullableBusinessDetail { + return &NullableBusinessDetail{value: val, isSet: true} +} + +func (v NullableBusinessDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBusinessDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_create_customer_400_response.go b/customer/model_create_customer_400_response.go new file mode 100644 index 00000000..b9b4ef62 --- /dev/null +++ b/customer/model_create_customer_400_response.go @@ -0,0 +1,189 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the CreateCustomer400Response type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &CreateCustomer400Response{} + +// CreateCustomer400Response struct for CreateCustomer400Response +type CreateCustomer400Response struct { + ErrorCode string `json:"error_code"` + Message interface{} `json:"message"` + Errors []map[string]interface{} `json:"errors,omitempty"` +} + +// NewCreateCustomer400Response instantiates a new CreateCustomer400Response 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 NewCreateCustomer400Response(errorCode string, message interface{}) *CreateCustomer400Response { + this := CreateCustomer400Response{} + this.ErrorCode = errorCode + this.Message = message + return &this +} + +// NewCreateCustomer400ResponseWithDefaults instantiates a new CreateCustomer400Response 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 NewCreateCustomer400ResponseWithDefaults() *CreateCustomer400Response { + this := CreateCustomer400Response{} + return &this +} + +// GetErrorCode returns the ErrorCode field value +func (o *CreateCustomer400Response) GetErrorCode() string { + if o == nil { + var ret string + return ret + } + + return o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value +// and a boolean to check if the value has been set. +func (o *CreateCustomer400Response) GetErrorCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ErrorCode, true +} + +// SetErrorCode sets field value +func (o *CreateCustomer400Response) SetErrorCode(v string) { + o.ErrorCode = v +} + +// GetMessage returns the Message field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *CreateCustomer400Response) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// 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 *CreateCustomer400Response) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *CreateCustomer400Response) SetMessage(v interface{}) { + o.Message = v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *CreateCustomer400Response) GetErrors() []map[string]interface{} { + if o == nil || utils.IsNil(o.Errors) { + var ret []map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomer400Response) GetErrorsOk() ([]map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *CreateCustomer400Response) HasErrors() bool { + if o != nil && !utils.IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field. +func (o *CreateCustomer400Response) SetErrors(v []map[string]interface{}) { + o.Errors = v +} + +func (o CreateCustomer400Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCustomer400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "DUPLICATE_END_CUSTOMER_ERROR" && o.ErrorCode != "API_VALIDATION_ERROR" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of DUPLICATE_END_CUSTOMER_ERROR, API_VALIDATION_ERROR") + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if !utils.IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +type NullableCreateCustomer400Response struct { + value *CreateCustomer400Response + isSet bool +} + +func (v NullableCreateCustomer400Response) Get() *CreateCustomer400Response { + return v.value +} + +func (v *NullableCreateCustomer400Response) Set(val *CreateCustomer400Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCustomer400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCustomer400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCustomer400Response(val *CreateCustomer400Response) *NullableCreateCustomer400Response { + return &NullableCreateCustomer400Response{value: val, isSet: true} +} + +func (v NullableCreateCustomer400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCustomer400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_create_customer_400_response_all_of.go b/customer/model_create_customer_400_response_all_of.go new file mode 100644 index 00000000..093f1d0d --- /dev/null +++ b/customer/model_create_customer_400_response_all_of.go @@ -0,0 +1,164 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the CreateCustomer400ResponseAllOf type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &CreateCustomer400ResponseAllOf{} + +// CreateCustomer400ResponseAllOf struct for CreateCustomer400ResponseAllOf +type CreateCustomer400ResponseAllOf struct { + ErrorCode *string `json:"error_code,omitempty"` + Message interface{} `json:"message,omitempty"` +} + +// NewCreateCustomer400ResponseAllOf instantiates a new CreateCustomer400ResponseAllOf 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 NewCreateCustomer400ResponseAllOf() *CreateCustomer400ResponseAllOf { + this := CreateCustomer400ResponseAllOf{} + return &this +} + +// NewCreateCustomer400ResponseAllOfWithDefaults instantiates a new CreateCustomer400ResponseAllOf 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 NewCreateCustomer400ResponseAllOfWithDefaults() *CreateCustomer400ResponseAllOf { + this := CreateCustomer400ResponseAllOf{} + return &this +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *CreateCustomer400ResponseAllOf) GetErrorCode() string { + if o == nil || utils.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomer400ResponseAllOf) GetErrorCodeOk() (*string, bool) { + if o == nil || utils.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *CreateCustomer400ResponseAllOf) HasErrorCode() bool { + if o != nil && !utils.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *CreateCustomer400ResponseAllOf) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateCustomer400ResponseAllOf) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message 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 *CreateCustomer400ResponseAllOf) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *CreateCustomer400ResponseAllOf) HasMessage() bool { + if o != nil && utils.IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given interface{} and assigns it to the Message field. +func (o *CreateCustomer400ResponseAllOf) SetMessage(v interface{}) { + o.Message = v +} + +func (o CreateCustomer400ResponseAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCustomer400ResponseAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.ErrorCode) { + toSerialize["error_code"] = o.ErrorCode + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableCreateCustomer400ResponseAllOf struct { + value *CreateCustomer400ResponseAllOf + isSet bool +} + +func (v NullableCreateCustomer400ResponseAllOf) Get() *CreateCustomer400ResponseAllOf { + return v.value +} + +func (v *NullableCreateCustomer400ResponseAllOf) Set(val *CreateCustomer400ResponseAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCustomer400ResponseAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCustomer400ResponseAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCustomer400ResponseAllOf(val *CreateCustomer400ResponseAllOf) *NullableCreateCustomer400ResponseAllOf { + return &NullableCreateCustomer400ResponseAllOf{value: val, isSet: true} +} + +func (v NullableCreateCustomer400ResponseAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCustomer400ResponseAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_customer.go b/customer/model_customer.go new file mode 100644 index 00000000..9aff0164 --- /dev/null +++ b/customer/model_customer.go @@ -0,0 +1,584 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" + "time" +) + +// checks if the Customer type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &Customer{} + +// Customer struct for Customer +type Customer struct { + Type string `json:"type"` + // Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. + ReferenceId string `json:"reference_id"` + IndividualDetail NullableIndividualDetail `json:"individual_detail"` + BusinessDetail NullableBusinessDetail `json:"business_detail"` + Description NullableString `json:"description"` + Email NullableString `json:"email"` + MobileNumber NullableString `json:"mobile_number"` + PhoneNumber NullableString `json:"phone_number"` + Addresses []Address `json:"addresses"` + IdentityAccounts []IdentityAccountResponse `json:"identity_accounts"` + KycDocuments []KYCDocumentResponse `json:"kyc_documents"` + Metadata map[string]interface{} `json:"metadata"` + Status NullableEndCustomerStatus `json:"status,omitempty"` + Id string `json:"id"` + Created time.Time `json:"created"` + Updated time.Time `json:"updated"` +} + +// NewCustomer instantiates a new Customer 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 NewCustomer(type_ string, referenceId string, individualDetail NullableIndividualDetail, businessDetail NullableBusinessDetail, description NullableString, email NullableString, mobileNumber NullableString, phoneNumber NullableString, addresses []Address, identityAccounts []IdentityAccountResponse, kycDocuments []KYCDocumentResponse, metadata map[string]interface{}, id string, created time.Time, updated time.Time) *Customer { + this := Customer{} + this.Type = type_ + this.ReferenceId = referenceId + this.IndividualDetail = individualDetail + this.BusinessDetail = businessDetail + this.Description = description + this.Email = email + this.MobileNumber = mobileNumber + this.PhoneNumber = phoneNumber + this.Addresses = addresses + this.IdentityAccounts = identityAccounts + this.KycDocuments = kycDocuments + this.Metadata = metadata + this.Id = id + this.Created = created + this.Updated = updated + return &this +} + +// NewCustomerWithDefaults instantiates a new Customer 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 NewCustomerWithDefaults() *Customer { + this := Customer{} + var type_ string = "INDIVIDUAL" + this.Type = type_ + return &this +} + +// GetType returns the Type field value +func (o *Customer) 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 *Customer) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Customer) SetType(v string) { + o.Type = v +} + +// GetReferenceId returns the ReferenceId field value +func (o *Customer) GetReferenceId() string { + if o == nil { + var ret string + return ret + } + + return o.ReferenceId +} + +// GetReferenceIdOk returns a tuple with the ReferenceId field value +// and a boolean to check if the value has been set. +func (o *Customer) GetReferenceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReferenceId, true +} + +// SetReferenceId sets field value +func (o *Customer) SetReferenceId(v string) { + o.ReferenceId = v +} + +// GetIndividualDetail returns the IndividualDetail field value +// If the value is explicit nil, the zero value for IndividualDetail will be returned +func (o *Customer) GetIndividualDetail() IndividualDetail { + if o == nil || o.IndividualDetail.Get() == nil { + var ret IndividualDetail + return ret + } + + return *o.IndividualDetail.Get() +} + +// GetIndividualDetailOk returns a tuple with the IndividualDetail field value +// 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 *Customer) GetIndividualDetailOk() (*IndividualDetail, bool) { + if o == nil { + return nil, false + } + return o.IndividualDetail.Get(), o.IndividualDetail.IsSet() +} + +// SetIndividualDetail sets field value +func (o *Customer) SetIndividualDetail(v IndividualDetail) { + o.IndividualDetail.Set(&v) +} + +// GetBusinessDetail returns the BusinessDetail field value +// If the value is explicit nil, the zero value for BusinessDetail will be returned +func (o *Customer) GetBusinessDetail() BusinessDetail { + if o == nil || o.BusinessDetail.Get() == nil { + var ret BusinessDetail + return ret + } + + return *o.BusinessDetail.Get() +} + +// GetBusinessDetailOk returns a tuple with the BusinessDetail field value +// 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 *Customer) GetBusinessDetailOk() (*BusinessDetail, bool) { + if o == nil { + return nil, false + } + return o.BusinessDetail.Get(), o.BusinessDetail.IsSet() +} + +// SetBusinessDetail sets field value +func (o *Customer) SetBusinessDetail(v BusinessDetail) { + o.BusinessDetail.Set(&v) +} + +// GetDescription returns the Description field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Customer) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value +// 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 *Customer) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// SetDescription sets field value +func (o *Customer) SetDescription(v string) { + o.Description.Set(&v) +} + +// GetEmail returns the Email field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Customer) GetEmail() string { + if o == nil || o.Email.Get() == nil { + var ret string + return ret + } + + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value +// 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 *Customer) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// SetEmail sets field value +func (o *Customer) SetEmail(v string) { + o.Email.Set(&v) +} + +// GetMobileNumber returns the MobileNumber field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Customer) GetMobileNumber() string { + if o == nil || o.MobileNumber.Get() == nil { + var ret string + return ret + } + + return *o.MobileNumber.Get() +} + +// GetMobileNumberOk returns a tuple with the MobileNumber field value +// 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 *Customer) GetMobileNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MobileNumber.Get(), o.MobileNumber.IsSet() +} + +// SetMobileNumber sets field value +func (o *Customer) SetMobileNumber(v string) { + o.MobileNumber.Set(&v) +} + +// GetPhoneNumber returns the PhoneNumber field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Customer) GetPhoneNumber() string { + if o == nil || o.PhoneNumber.Get() == nil { + var ret string + return ret + } + + return *o.PhoneNumber.Get() +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber field value +// 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 *Customer) GetPhoneNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PhoneNumber.Get(), o.PhoneNumber.IsSet() +} + +// SetPhoneNumber sets field value +func (o *Customer) SetPhoneNumber(v string) { + o.PhoneNumber.Set(&v) +} + +// GetAddresses returns the Addresses field value +// If the value is explicit nil, the zero value for []Address will be returned +func (o *Customer) GetAddresses() []Address { + if o == nil { + var ret []Address + return ret + } + + return o.Addresses +} + +// GetAddressesOk returns a tuple with the Addresses field value +// 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 *Customer) GetAddressesOk() ([]Address, bool) { + if o == nil || utils.IsNil(o.Addresses) { + return nil, false + } + return o.Addresses, true +} + +// SetAddresses sets field value +func (o *Customer) SetAddresses(v []Address) { + o.Addresses = v +} + +// GetIdentityAccounts returns the IdentityAccounts field value +// If the value is explicit nil, the zero value for []IdentityAccountResponse will be returned +func (o *Customer) GetIdentityAccounts() []IdentityAccountResponse { + if o == nil { + var ret []IdentityAccountResponse + return ret + } + + return o.IdentityAccounts +} + +// GetIdentityAccountsOk returns a tuple with the IdentityAccounts field value +// 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 *Customer) GetIdentityAccountsOk() ([]IdentityAccountResponse, bool) { + if o == nil || utils.IsNil(o.IdentityAccounts) { + return nil, false + } + return o.IdentityAccounts, true +} + +// SetIdentityAccounts sets field value +func (o *Customer) SetIdentityAccounts(v []IdentityAccountResponse) { + o.IdentityAccounts = v +} + +// GetKycDocuments returns the KycDocuments field value +// If the value is explicit nil, the zero value for []KYCDocumentResponse will be returned +func (o *Customer) GetKycDocuments() []KYCDocumentResponse { + if o == nil { + var ret []KYCDocumentResponse + return ret + } + + return o.KycDocuments +} + +// GetKycDocumentsOk returns a tuple with the KycDocuments field value +// 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 *Customer) GetKycDocumentsOk() ([]KYCDocumentResponse, bool) { + if o == nil || utils.IsNil(o.KycDocuments) { + return nil, false + } + return o.KycDocuments, true +} + +// SetKycDocuments sets field value +func (o *Customer) SetKycDocuments(v []KYCDocumentResponse) { + o.KycDocuments = v +} + +// GetMetadata returns the Metadata field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *Customer) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// 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 *Customer) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// SetMetadata sets field value +func (o *Customer) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Customer) GetStatus() EndCustomerStatus { + if o == nil || utils.IsNil(o.Status.Get()) { + var ret EndCustomerStatus + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status 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 *Customer) GetStatusOk() (*EndCustomerStatus, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *Customer) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableEndCustomerStatus and assigns it to the Status field. +func (o *Customer) SetStatus(v EndCustomerStatus) { + o.Status.Set(&v) +} +// SetStatusNil sets the value for Status to be an explicit nil +func (o *Customer) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *Customer) UnsetStatus() { + o.Status.Unset() +} + +// GetId returns the Id field value +func (o *Customer) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Customer) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Customer) SetId(v string) { + o.Id = v +} + +// GetCreated returns the Created field value +func (o *Customer) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Customer) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Customer) SetCreated(v time.Time) { + o.Created = v +} + +// GetUpdated returns the Updated field value +func (o *Customer) GetUpdated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Updated +} + +// GetUpdatedOk returns a tuple with the Updated field value +// and a boolean to check if the value has been set. +func (o *Customer) GetUpdatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Updated, true +} + +// SetUpdated sets field value +func (o *Customer) SetUpdated(v time.Time) { + o.Updated = v +} + +func (o Customer) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Customer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + if o.Type != "INDIVIDUAL" && o.Type != "BUSINESS" { + toSerialize["type"] = nil + return toSerialize, utils.NewError("invalid value for Type when marshalling to JSON, must be one of INDIVIDUAL, BUSINESS") + } + toSerialize["reference_id"] = o.ReferenceId + toSerialize["individual_detail"] = o.IndividualDetail.Get() + + toSerialize["business_detail"] = o.BusinessDetail.Get() + + toSerialize["description"] = o.Description.Get() + + toSerialize["email"] = o.Email.Get() + + toSerialize["mobile_number"] = o.MobileNumber.Get() + + toSerialize["phone_number"] = o.PhoneNumber.Get() + + if o.Addresses != nil { + toSerialize["addresses"] = o.Addresses + } + if o.IdentityAccounts != nil { + toSerialize["identity_accounts"] = o.IdentityAccounts + } + if o.KycDocuments != nil { + toSerialize["kyc_documents"] = o.KycDocuments + } + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + toSerialize["id"] = o.Id + toSerialize["created"] = o.Created + toSerialize["updated"] = o.Updated + return toSerialize, nil +} + +type NullableCustomer struct { + value *Customer + isSet bool +} + +func (v NullableCustomer) Get() *Customer { + return v.value +} + +func (v *NullableCustomer) Set(val *Customer) { + v.value = val + v.isSet = true +} + +func (v NullableCustomer) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomer(val *Customer) *NullableCustomer { + return &NullableCustomer{value: val, isSet: true} +} + +func (v NullableCustomer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_customer_request.go b/customer/model_customer_request.go new file mode 100644 index 00000000..568920b4 --- /dev/null +++ b/customer/model_customer_request.go @@ -0,0 +1,586 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the CustomerRequest type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &CustomerRequest{} + +// CustomerRequest struct for CustomerRequest +type CustomerRequest struct { + // Entity's name for this client + ClientName *string `json:"client_name,omitempty"` + // Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. + ReferenceId string `json:"reference_id"` + Type *string `json:"type,omitempty"` + IndividualDetail NullableIndividualDetail `json:"individual_detail,omitempty"` + BusinessDetail NullableBusinessDetail `json:"business_detail,omitempty"` + Description NullableString `json:"description,omitempty"` + Email *string `json:"email,omitempty"` + MobileNumber *string `json:"mobile_number,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty"` + Addresses []AddressRequest `json:"addresses,omitempty"` + IdentityAccounts []IdentityAccountRequest `json:"identity_accounts,omitempty"` + KycDocuments []KYCDocumentRequest `json:"kyc_documents,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` +} + +// NewCustomerRequest instantiates a new CustomerRequest 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 NewCustomerRequest(referenceId string) *CustomerRequest { + this := CustomerRequest{} + this.ReferenceId = referenceId + var type_ string = "INDIVIDUAL" + this.Type = &type_ + return &this +} + +// NewCustomerRequestWithDefaults instantiates a new CustomerRequest 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 NewCustomerRequestWithDefaults() *CustomerRequest { + this := CustomerRequest{} + var type_ string = "INDIVIDUAL" + this.Type = &type_ + return &this +} + +// GetClientName returns the ClientName field value if set, zero value otherwise. +func (o *CustomerRequest) GetClientName() string { + if o == nil || utils.IsNil(o.ClientName) { + var ret string + return ret + } + return *o.ClientName +} + +// GetClientNameOk returns a tuple with the ClientName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetClientNameOk() (*string, bool) { + if o == nil || utils.IsNil(o.ClientName) { + return nil, false + } + return o.ClientName, true +} + +// HasClientName returns a boolean if a field has been set. +func (o *CustomerRequest) HasClientName() bool { + if o != nil && !utils.IsNil(o.ClientName) { + return true + } + + return false +} + +// SetClientName gets a reference to the given string and assigns it to the ClientName field. +func (o *CustomerRequest) SetClientName(v string) { + o.ClientName = &v +} + +// GetReferenceId returns the ReferenceId field value +func (o *CustomerRequest) GetReferenceId() string { + if o == nil { + var ret string + return ret + } + + return o.ReferenceId +} + +// GetReferenceIdOk returns a tuple with the ReferenceId field value +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetReferenceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReferenceId, true +} + +// SetReferenceId sets field value +func (o *CustomerRequest) SetReferenceId(v string) { + o.ReferenceId = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CustomerRequest) GetType() string { + if o == nil || utils.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetTypeOk() (*string, bool) { + if o == nil || utils.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CustomerRequest) HasType() bool { + if o != nil && !utils.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CustomerRequest) SetType(v string) { + o.Type = &v +} + +// GetIndividualDetail returns the IndividualDetail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CustomerRequest) GetIndividualDetail() IndividualDetail { + if o == nil || utils.IsNil(o.IndividualDetail.Get()) { + var ret IndividualDetail + return ret + } + return *o.IndividualDetail.Get() +} + +// GetIndividualDetailOk returns a tuple with the IndividualDetail 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 *CustomerRequest) GetIndividualDetailOk() (*IndividualDetail, bool) { + if o == nil { + return nil, false + } + return o.IndividualDetail.Get(), o.IndividualDetail.IsSet() +} + +// HasIndividualDetail returns a boolean if a field has been set. +func (o *CustomerRequest) HasIndividualDetail() bool { + if o != nil && o.IndividualDetail.IsSet() { + return true + } + + return false +} + +// SetIndividualDetail gets a reference to the given NullableIndividualDetail and assigns it to the IndividualDetail field. +func (o *CustomerRequest) SetIndividualDetail(v IndividualDetail) { + o.IndividualDetail.Set(&v) +} +// SetIndividualDetailNil sets the value for IndividualDetail to be an explicit nil +func (o *CustomerRequest) SetIndividualDetailNil() { + o.IndividualDetail.Set(nil) +} + +// UnsetIndividualDetail ensures that no value is present for IndividualDetail, not even an explicit nil +func (o *CustomerRequest) UnsetIndividualDetail() { + o.IndividualDetail.Unset() +} + +// GetBusinessDetail returns the BusinessDetail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CustomerRequest) GetBusinessDetail() BusinessDetail { + if o == nil || utils.IsNil(o.BusinessDetail.Get()) { + var ret BusinessDetail + return ret + } + return *o.BusinessDetail.Get() +} + +// GetBusinessDetailOk returns a tuple with the BusinessDetail 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 *CustomerRequest) GetBusinessDetailOk() (*BusinessDetail, bool) { + if o == nil { + return nil, false + } + return o.BusinessDetail.Get(), o.BusinessDetail.IsSet() +} + +// HasBusinessDetail returns a boolean if a field has been set. +func (o *CustomerRequest) HasBusinessDetail() bool { + if o != nil && o.BusinessDetail.IsSet() { + return true + } + + return false +} + +// SetBusinessDetail gets a reference to the given NullableBusinessDetail and assigns it to the BusinessDetail field. +func (o *CustomerRequest) SetBusinessDetail(v BusinessDetail) { + o.BusinessDetail.Set(&v) +} +// SetBusinessDetailNil sets the value for BusinessDetail to be an explicit nil +func (o *CustomerRequest) SetBusinessDetailNil() { + o.BusinessDetail.Set(nil) +} + +// UnsetBusinessDetail ensures that no value is present for BusinessDetail, not even an explicit nil +func (o *CustomerRequest) UnsetBusinessDetail() { + o.BusinessDetail.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CustomerRequest) GetDescription() string { + if o == nil || utils.IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description 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 *CustomerRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CustomerRequest) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CustomerRequest) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CustomerRequest) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CustomerRequest) UnsetDescription() { + o.Description.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *CustomerRequest) GetEmail() string { + if o == nil || utils.IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetEmailOk() (*string, bool) { + if o == nil || utils.IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *CustomerRequest) HasEmail() bool { + if o != nil && !utils.IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *CustomerRequest) SetEmail(v string) { + o.Email = &v +} + +// GetMobileNumber returns the MobileNumber field value if set, zero value otherwise. +func (o *CustomerRequest) GetMobileNumber() string { + if o == nil || utils.IsNil(o.MobileNumber) { + var ret string + return ret + } + return *o.MobileNumber +} + +// GetMobileNumberOk returns a tuple with the MobileNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetMobileNumberOk() (*string, bool) { + if o == nil || utils.IsNil(o.MobileNumber) { + return nil, false + } + return o.MobileNumber, true +} + +// HasMobileNumber returns a boolean if a field has been set. +func (o *CustomerRequest) HasMobileNumber() bool { + if o != nil && !utils.IsNil(o.MobileNumber) { + return true + } + + return false +} + +// SetMobileNumber gets a reference to the given string and assigns it to the MobileNumber field. +func (o *CustomerRequest) SetMobileNumber(v string) { + o.MobileNumber = &v +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. +func (o *CustomerRequest) GetPhoneNumber() string { + if o == nil || utils.IsNil(o.PhoneNumber) { + var ret string + return ret + } + return *o.PhoneNumber +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetPhoneNumberOk() (*string, bool) { + if o == nil || utils.IsNil(o.PhoneNumber) { + return nil, false + } + return o.PhoneNumber, true +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *CustomerRequest) HasPhoneNumber() bool { + if o != nil && !utils.IsNil(o.PhoneNumber) { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field. +func (o *CustomerRequest) SetPhoneNumber(v string) { + o.PhoneNumber = &v +} + +// GetAddresses returns the Addresses field value if set, zero value otherwise. +func (o *CustomerRequest) GetAddresses() []AddressRequest { + if o == nil || utils.IsNil(o.Addresses) { + var ret []AddressRequest + return ret + } + return o.Addresses +} + +// GetAddressesOk returns a tuple with the Addresses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetAddressesOk() ([]AddressRequest, bool) { + if o == nil || utils.IsNil(o.Addresses) { + return nil, false + } + return o.Addresses, true +} + +// HasAddresses returns a boolean if a field has been set. +func (o *CustomerRequest) HasAddresses() bool { + if o != nil && !utils.IsNil(o.Addresses) { + return true + } + + return false +} + +// SetAddresses gets a reference to the given []AddressRequest and assigns it to the Addresses field. +func (o *CustomerRequest) SetAddresses(v []AddressRequest) { + o.Addresses = v +} + +// GetIdentityAccounts returns the IdentityAccounts field value if set, zero value otherwise. +func (o *CustomerRequest) GetIdentityAccounts() []IdentityAccountRequest { + if o == nil || utils.IsNil(o.IdentityAccounts) { + var ret []IdentityAccountRequest + return ret + } + return o.IdentityAccounts +} + +// GetIdentityAccountsOk returns a tuple with the IdentityAccounts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetIdentityAccountsOk() ([]IdentityAccountRequest, bool) { + if o == nil || utils.IsNil(o.IdentityAccounts) { + return nil, false + } + return o.IdentityAccounts, true +} + +// HasIdentityAccounts returns a boolean if a field has been set. +func (o *CustomerRequest) HasIdentityAccounts() bool { + if o != nil && !utils.IsNil(o.IdentityAccounts) { + return true + } + + return false +} + +// SetIdentityAccounts gets a reference to the given []IdentityAccountRequest and assigns it to the IdentityAccounts field. +func (o *CustomerRequest) SetIdentityAccounts(v []IdentityAccountRequest) { + o.IdentityAccounts = v +} + +// GetKycDocuments returns the KycDocuments field value if set, zero value otherwise. +func (o *CustomerRequest) GetKycDocuments() []KYCDocumentRequest { + if o == nil || utils.IsNil(o.KycDocuments) { + var ret []KYCDocumentRequest + return ret + } + return o.KycDocuments +} + +// GetKycDocumentsOk returns a tuple with the KycDocuments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetKycDocumentsOk() ([]KYCDocumentRequest, bool) { + if o == nil || utils.IsNil(o.KycDocuments) { + return nil, false + } + return o.KycDocuments, true +} + +// HasKycDocuments returns a boolean if a field has been set. +func (o *CustomerRequest) HasKycDocuments() bool { + if o != nil && !utils.IsNil(o.KycDocuments) { + return true + } + + return false +} + +// SetKycDocuments gets a reference to the given []KYCDocumentRequest and assigns it to the KycDocuments field. +func (o *CustomerRequest) SetKycDocuments(v []KYCDocumentRequest) { + o.KycDocuments = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CustomerRequest) GetMetadata() map[string]interface{} { + if o == nil || utils.IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerRequest) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CustomerRequest) HasMetadata() bool { + if o != nil && !utils.IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *CustomerRequest) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +func (o CustomerRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomerRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.ClientName) { + toSerialize["client_name"] = o.ClientName + } + toSerialize["reference_id"] = o.ReferenceId + if !utils.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if o.IndividualDetail.IsSet() { + toSerialize["individual_detail"] = o.IndividualDetail.Get() + } + if o.BusinessDetail.IsSet() { + toSerialize["business_detail"] = o.BusinessDetail.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !utils.IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !utils.IsNil(o.MobileNumber) { + toSerialize["mobile_number"] = o.MobileNumber + } + if !utils.IsNil(o.PhoneNumber) { + toSerialize["phone_number"] = o.PhoneNumber + } + if !utils.IsNil(o.Addresses) { + toSerialize["addresses"] = o.Addresses + } + if !utils.IsNil(o.IdentityAccounts) { + toSerialize["identity_accounts"] = o.IdentityAccounts + } + if !utils.IsNil(o.KycDocuments) { + toSerialize["kyc_documents"] = o.KycDocuments + } + if !utils.IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + return toSerialize, nil +} + +type NullableCustomerRequest struct { + value *CustomerRequest + isSet bool +} + +func (v NullableCustomerRequest) Get() *CustomerRequest { + return v.value +} + +func (v *NullableCustomerRequest) Set(val *CustomerRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCustomerRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomerRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomerRequest(val *CustomerRequest) *NullableCustomerRequest { + return &NullableCustomerRequest{value: val, isSet: true} +} + +func (v NullableCustomerRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomerRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_employment_detail.go b/customer/model_employment_detail.go new file mode 100644 index 00000000..1bb6e24b --- /dev/null +++ b/customer/model_employment_detail.go @@ -0,0 +1,232 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the EmploymentDetail type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &EmploymentDetail{} + +// EmploymentDetail struct for EmploymentDetail +type EmploymentDetail struct { + // Name of employer + EmployerName NullableString `json:"employer_name,omitempty"` + // Industry or nature of business + NatureOfBusiness NullableString `json:"nature_of_business,omitempty"` + // Occupation or title + RoleDescription NullableString `json:"role_description,omitempty"` +} + +// NewEmploymentDetail instantiates a new EmploymentDetail 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 NewEmploymentDetail() *EmploymentDetail { + this := EmploymentDetail{} + return &this +} + +// NewEmploymentDetailWithDefaults instantiates a new EmploymentDetail 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 NewEmploymentDetailWithDefaults() *EmploymentDetail { + this := EmploymentDetail{} + return &this +} + +// GetEmployerName returns the EmployerName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EmploymentDetail) GetEmployerName() string { + if o == nil || utils.IsNil(o.EmployerName.Get()) { + var ret string + return ret + } + return *o.EmployerName.Get() +} + +// GetEmployerNameOk returns a tuple with the EmployerName 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 *EmploymentDetail) GetEmployerNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EmployerName.Get(), o.EmployerName.IsSet() +} + +// HasEmployerName returns a boolean if a field has been set. +func (o *EmploymentDetail) HasEmployerName() bool { + if o != nil && o.EmployerName.IsSet() { + return true + } + + return false +} + +// SetEmployerName gets a reference to the given NullableString and assigns it to the EmployerName field. +func (o *EmploymentDetail) SetEmployerName(v string) { + o.EmployerName.Set(&v) +} +// SetEmployerNameNil sets the value for EmployerName to be an explicit nil +func (o *EmploymentDetail) SetEmployerNameNil() { + o.EmployerName.Set(nil) +} + +// UnsetEmployerName ensures that no value is present for EmployerName, not even an explicit nil +func (o *EmploymentDetail) UnsetEmployerName() { + o.EmployerName.Unset() +} + +// GetNatureOfBusiness returns the NatureOfBusiness field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EmploymentDetail) GetNatureOfBusiness() string { + if o == nil || utils.IsNil(o.NatureOfBusiness.Get()) { + var ret string + return ret + } + return *o.NatureOfBusiness.Get() +} + +// GetNatureOfBusinessOk returns a tuple with the NatureOfBusiness 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 *EmploymentDetail) GetNatureOfBusinessOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NatureOfBusiness.Get(), o.NatureOfBusiness.IsSet() +} + +// HasNatureOfBusiness returns a boolean if a field has been set. +func (o *EmploymentDetail) HasNatureOfBusiness() bool { + if o != nil && o.NatureOfBusiness.IsSet() { + return true + } + + return false +} + +// SetNatureOfBusiness gets a reference to the given NullableString and assigns it to the NatureOfBusiness field. +func (o *EmploymentDetail) SetNatureOfBusiness(v string) { + o.NatureOfBusiness.Set(&v) +} +// SetNatureOfBusinessNil sets the value for NatureOfBusiness to be an explicit nil +func (o *EmploymentDetail) SetNatureOfBusinessNil() { + o.NatureOfBusiness.Set(nil) +} + +// UnsetNatureOfBusiness ensures that no value is present for NatureOfBusiness, not even an explicit nil +func (o *EmploymentDetail) UnsetNatureOfBusiness() { + o.NatureOfBusiness.Unset() +} + +// GetRoleDescription returns the RoleDescription field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EmploymentDetail) GetRoleDescription() string { + if o == nil || utils.IsNil(o.RoleDescription.Get()) { + var ret string + return ret + } + return *o.RoleDescription.Get() +} + +// GetRoleDescriptionOk returns a tuple with the RoleDescription 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 *EmploymentDetail) GetRoleDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RoleDescription.Get(), o.RoleDescription.IsSet() +} + +// HasRoleDescription returns a boolean if a field has been set. +func (o *EmploymentDetail) HasRoleDescription() bool { + if o != nil && o.RoleDescription.IsSet() { + return true + } + + return false +} + +// SetRoleDescription gets a reference to the given NullableString and assigns it to the RoleDescription field. +func (o *EmploymentDetail) SetRoleDescription(v string) { + o.RoleDescription.Set(&v) +} +// SetRoleDescriptionNil sets the value for RoleDescription to be an explicit nil +func (o *EmploymentDetail) SetRoleDescriptionNil() { + o.RoleDescription.Set(nil) +} + +// UnsetRoleDescription ensures that no value is present for RoleDescription, not even an explicit nil +func (o *EmploymentDetail) UnsetRoleDescription() { + o.RoleDescription.Unset() +} + +func (o EmploymentDetail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmploymentDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.EmployerName.IsSet() { + toSerialize["employer_name"] = o.EmployerName.Get() + } + if o.NatureOfBusiness.IsSet() { + toSerialize["nature_of_business"] = o.NatureOfBusiness.Get() + } + if o.RoleDescription.IsSet() { + toSerialize["role_description"] = o.RoleDescription.Get() + } + return toSerialize, nil +} + +type NullableEmploymentDetail struct { + value *EmploymentDetail + isSet bool +} + +func (v NullableEmploymentDetail) Get() *EmploymentDetail { + return v.value +} + +func (v *NullableEmploymentDetail) Set(val *EmploymentDetail) { + v.value = val + v.isSet = true +} + +func (v NullableEmploymentDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableEmploymentDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmploymentDetail(val *EmploymentDetail) *NullableEmploymentDetail { + return &NullableEmploymentDetail{value: val, isSet: true} +} + +func (v NullableEmploymentDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmploymentDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_end_customer_status.go b/customer/model_end_customer_status.go new file mode 100644 index 00000000..6ed1ba1f --- /dev/null +++ b/customer/model_end_customer_status.go @@ -0,0 +1,120 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + "fmt" +) + +// EndCustomerStatus the model 'EndCustomerStatus' +type EndCustomerStatus string + +// List of EndCustomerStatus +const ( + ENDCUSTOMERSTATUS_ACTIVE EndCustomerStatus = "ACTIVE" + ENDCUSTOMERSTATUS_INACTIVE EndCustomerStatus = "INACTIVE" + ENDCUSTOMERSTATUS_PENDING EndCustomerStatus = "PENDING" + ENDCUSTOMERSTATUS_BLOCKED EndCustomerStatus = "BLOCKED" + ENDCUSTOMERSTATUS_DELETED EndCustomerStatus = "DELETED" +) + +// All allowed values of EndCustomerStatus enum +var AllowedEndCustomerStatusEnumValues = []EndCustomerStatus{ + "ACTIVE", + "INACTIVE", + "PENDING", + "BLOCKED", + "DELETED", +} + +func (v *EndCustomerStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := EndCustomerStatus(value) + for _, existing := range AllowedEndCustomerStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid EndCustomerStatus", value) +} + +// NewEndCustomerStatusFromValue returns a pointer to a valid EndCustomerStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewEndCustomerStatusFromValue(v string) (*EndCustomerStatus, error) { + ev := EndCustomerStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for EndCustomerStatus: valid values are %v", v, AllowedEndCustomerStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v EndCustomerStatus) IsValid() bool { + for _, existing := range AllowedEndCustomerStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +func (v EndCustomerStatus) String() string { + return string(v) +} + +// Ptr returns reference to EndCustomerStatus value +func (v EndCustomerStatus) Ptr() *EndCustomerStatus { + return &v +} + +type NullableEndCustomerStatus struct { + value *EndCustomerStatus + isSet bool +} + +func (v NullableEndCustomerStatus) Get() *EndCustomerStatus { + return v.value +} + +func (v *NullableEndCustomerStatus) Set(val *EndCustomerStatus) { + v.value = val + v.isSet = true +} + +func (v NullableEndCustomerStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableEndCustomerStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndCustomerStatus(val *EndCustomerStatus) *NullableEndCustomerStatus { + return &NullableEndCustomerStatus{value: val, isSet: true} +} + +func (v NullableEndCustomerStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndCustomerStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/customer/model_error.go b/customer/model_error.go new file mode 100644 index 00000000..37d42726 --- /dev/null +++ b/customer/model_error.go @@ -0,0 +1,181 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + ErrorCode string `json:"error_code"` + Message string `json:"message"` + Errors []map[string]interface{} `json:"errors,omitempty"` +} + +// NewError instantiates a new Error 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 NewError(errorCode string, message string) *Error { + this := Error{} + this.ErrorCode = errorCode + this.Message = message + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetErrorCode returns the ErrorCode field value +func (o *Error) GetErrorCode() string { + if o == nil { + var ret string + return ret + } + + return o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value +// and a boolean to check if the value has been set. +func (o *Error) GetErrorCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ErrorCode, true +} + +// SetErrorCode sets field value +func (o *Error) SetErrorCode(v string) { + o.ErrorCode = v +} + +// GetMessage returns the Message field value +func (o *Error) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *Error) SetMessage(v string) { + o.Message = v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *Error) GetErrors() []map[string]interface{} { + if o == nil || utils.IsNil(o.Errors) { + var ret []map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetErrorsOk() ([]map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *Error) HasErrors() bool { + if o != nil && !utils.IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field. +func (o *Error) SetErrors(v []map[string]interface{}) { + o.Errors = v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error_code"] = o.ErrorCode + toSerialize["message"] = o.Message + if !utils.IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_get_customer_by_reference_id_200_response.go b/customer/model_get_customer_by_reference_id_200_response.go new file mode 100644 index 00000000..df955bc0 --- /dev/null +++ b/customer/model_get_customer_by_reference_id_200_response.go @@ -0,0 +1,163 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the GetCustomerByReferenceID200Response type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &GetCustomerByReferenceID200Response{} + +// GetCustomerByReferenceID200Response struct for GetCustomerByReferenceID200Response +type GetCustomerByReferenceID200Response struct { + HasMore *bool `json:"has_more,omitempty"` + Data []Customer `json:"data,omitempty"` +} + +// NewGetCustomerByReferenceID200Response instantiates a new GetCustomerByReferenceID200Response 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 NewGetCustomerByReferenceID200Response() *GetCustomerByReferenceID200Response { + this := GetCustomerByReferenceID200Response{} + return &this +} + +// NewGetCustomerByReferenceID200ResponseWithDefaults instantiates a new GetCustomerByReferenceID200Response 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 NewGetCustomerByReferenceID200ResponseWithDefaults() *GetCustomerByReferenceID200Response { + this := GetCustomerByReferenceID200Response{} + return &this +} + +// GetHasMore returns the HasMore field value if set, zero value otherwise. +func (o *GetCustomerByReferenceID200Response) GetHasMore() bool { + if o == nil || utils.IsNil(o.HasMore) { + var ret bool + return ret + } + return *o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCustomerByReferenceID200Response) GetHasMoreOk() (*bool, bool) { + if o == nil || utils.IsNil(o.HasMore) { + return nil, false + } + return o.HasMore, true +} + +// HasHasMore returns a boolean if a field has been set. +func (o *GetCustomerByReferenceID200Response) HasHasMore() bool { + if o != nil && !utils.IsNil(o.HasMore) { + return true + } + + return false +} + +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +func (o *GetCustomerByReferenceID200Response) SetHasMore(v bool) { + o.HasMore = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetCustomerByReferenceID200Response) GetData() []Customer { + if o == nil || utils.IsNil(o.Data) { + var ret []Customer + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCustomerByReferenceID200Response) GetDataOk() ([]Customer, bool) { + if o == nil || utils.IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetCustomerByReferenceID200Response) HasData() bool { + if o != nil && !utils.IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []Customer and assigns it to the Data field. +func (o *GetCustomerByReferenceID200Response) SetData(v []Customer) { + o.Data = v +} + +func (o GetCustomerByReferenceID200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCustomerByReferenceID200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.HasMore) { + toSerialize["has_more"] = o.HasMore + } + if !utils.IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetCustomerByReferenceID200Response struct { + value *GetCustomerByReferenceID200Response + isSet bool +} + +func (v NullableGetCustomerByReferenceID200Response) Get() *GetCustomerByReferenceID200Response { + return v.value +} + +func (v *NullableGetCustomerByReferenceID200Response) Set(val *GetCustomerByReferenceID200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetCustomerByReferenceID200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCustomerByReferenceID200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCustomerByReferenceID200Response(val *GetCustomerByReferenceID200Response) *NullableGetCustomerByReferenceID200Response { + return &NullableGetCustomerByReferenceID200Response{value: val, isSet: true} +} + +func (v NullableGetCustomerByReferenceID200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCustomerByReferenceID200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_get_customer_by_reference_id_400_response.go b/customer/model_get_customer_by_reference_id_400_response.go new file mode 100644 index 00000000..9e396ab6 --- /dev/null +++ b/customer/model_get_customer_by_reference_id_400_response.go @@ -0,0 +1,189 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the GetCustomerByReferenceID400Response type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &GetCustomerByReferenceID400Response{} + +// GetCustomerByReferenceID400Response struct for GetCustomerByReferenceID400Response +type GetCustomerByReferenceID400Response struct { + ErrorCode string `json:"error_code"` + Message interface{} `json:"message"` + Errors []map[string]interface{} `json:"errors,omitempty"` +} + +// NewGetCustomerByReferenceID400Response instantiates a new GetCustomerByReferenceID400Response 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 NewGetCustomerByReferenceID400Response(errorCode string, message interface{}) *GetCustomerByReferenceID400Response { + this := GetCustomerByReferenceID400Response{} + this.ErrorCode = errorCode + this.Message = message + return &this +} + +// NewGetCustomerByReferenceID400ResponseWithDefaults instantiates a new GetCustomerByReferenceID400Response 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 NewGetCustomerByReferenceID400ResponseWithDefaults() *GetCustomerByReferenceID400Response { + this := GetCustomerByReferenceID400Response{} + return &this +} + +// GetErrorCode returns the ErrorCode field value +func (o *GetCustomerByReferenceID400Response) GetErrorCode() string { + if o == nil { + var ret string + return ret + } + + return o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value +// and a boolean to check if the value has been set. +func (o *GetCustomerByReferenceID400Response) GetErrorCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ErrorCode, true +} + +// SetErrorCode sets field value +func (o *GetCustomerByReferenceID400Response) SetErrorCode(v string) { + o.ErrorCode = v +} + +// GetMessage returns the Message field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *GetCustomerByReferenceID400Response) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// 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 *GetCustomerByReferenceID400Response) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *GetCustomerByReferenceID400Response) SetMessage(v interface{}) { + o.Message = v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *GetCustomerByReferenceID400Response) GetErrors() []map[string]interface{} { + if o == nil || utils.IsNil(o.Errors) { + var ret []map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCustomerByReferenceID400Response) GetErrorsOk() ([]map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *GetCustomerByReferenceID400Response) HasErrors() bool { + if o != nil && !utils.IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field. +func (o *GetCustomerByReferenceID400Response) SetErrors(v []map[string]interface{}) { + o.Errors = v +} + +func (o GetCustomerByReferenceID400Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCustomerByReferenceID400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "ENTITY_NOT_FOUND_ERROR" && o.ErrorCode != "CLIENT_NOT_FOUND_ERROR" && o.ErrorCode != "END_CUSTOMER_NOT_FOUND_ERROR" && o.ErrorCode != "API_VALIDATION_ERROR" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of ENTITY_NOT_FOUND_ERROR, CLIENT_NOT_FOUND_ERROR, END_CUSTOMER_NOT_FOUND_ERROR, API_VALIDATION_ERROR") + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if !utils.IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +type NullableGetCustomerByReferenceID400Response struct { + value *GetCustomerByReferenceID400Response + isSet bool +} + +func (v NullableGetCustomerByReferenceID400Response) Get() *GetCustomerByReferenceID400Response { + return v.value +} + +func (v *NullableGetCustomerByReferenceID400Response) Set(val *GetCustomerByReferenceID400Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetCustomerByReferenceID400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCustomerByReferenceID400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCustomerByReferenceID400Response(val *GetCustomerByReferenceID400Response) *NullableGetCustomerByReferenceID400Response { + return &NullableGetCustomerByReferenceID400Response{value: val, isSet: true} +} + +func (v NullableGetCustomerByReferenceID400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCustomerByReferenceID400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_get_customer_by_reference_id_400_response_all_of.go b/customer/model_get_customer_by_reference_id_400_response_all_of.go new file mode 100644 index 00000000..29182a40 --- /dev/null +++ b/customer/model_get_customer_by_reference_id_400_response_all_of.go @@ -0,0 +1,164 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the GetCustomerByReferenceID400ResponseAllOf type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &GetCustomerByReferenceID400ResponseAllOf{} + +// GetCustomerByReferenceID400ResponseAllOf struct for GetCustomerByReferenceID400ResponseAllOf +type GetCustomerByReferenceID400ResponseAllOf struct { + ErrorCode *string `json:"error_code,omitempty"` + Message interface{} `json:"message,omitempty"` +} + +// NewGetCustomerByReferenceID400ResponseAllOf instantiates a new GetCustomerByReferenceID400ResponseAllOf 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 NewGetCustomerByReferenceID400ResponseAllOf() *GetCustomerByReferenceID400ResponseAllOf { + this := GetCustomerByReferenceID400ResponseAllOf{} + return &this +} + +// NewGetCustomerByReferenceID400ResponseAllOfWithDefaults instantiates a new GetCustomerByReferenceID400ResponseAllOf 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 NewGetCustomerByReferenceID400ResponseAllOfWithDefaults() *GetCustomerByReferenceID400ResponseAllOf { + this := GetCustomerByReferenceID400ResponseAllOf{} + return &this +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *GetCustomerByReferenceID400ResponseAllOf) GetErrorCode() string { + if o == nil || utils.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCustomerByReferenceID400ResponseAllOf) GetErrorCodeOk() (*string, bool) { + if o == nil || utils.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *GetCustomerByReferenceID400ResponseAllOf) HasErrorCode() bool { + if o != nil && !utils.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *GetCustomerByReferenceID400ResponseAllOf) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetCustomerByReferenceID400ResponseAllOf) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message 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 *GetCustomerByReferenceID400ResponseAllOf) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *GetCustomerByReferenceID400ResponseAllOf) HasMessage() bool { + if o != nil && utils.IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given interface{} and assigns it to the Message field. +func (o *GetCustomerByReferenceID400ResponseAllOf) SetMessage(v interface{}) { + o.Message = v +} + +func (o GetCustomerByReferenceID400ResponseAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCustomerByReferenceID400ResponseAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.ErrorCode) { + toSerialize["error_code"] = o.ErrorCode + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableGetCustomerByReferenceID400ResponseAllOf struct { + value *GetCustomerByReferenceID400ResponseAllOf + isSet bool +} + +func (v NullableGetCustomerByReferenceID400ResponseAllOf) Get() *GetCustomerByReferenceID400ResponseAllOf { + return v.value +} + +func (v *NullableGetCustomerByReferenceID400ResponseAllOf) Set(val *GetCustomerByReferenceID400ResponseAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableGetCustomerByReferenceID400ResponseAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCustomerByReferenceID400ResponseAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCustomerByReferenceID400ResponseAllOf(val *GetCustomerByReferenceID400ResponseAllOf) *NullableGetCustomerByReferenceID400ResponseAllOf { + return &NullableGetCustomerByReferenceID400ResponseAllOf{value: val, isSet: true} +} + +func (v NullableGetCustomerByReferenceID400ResponseAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCustomerByReferenceID400ResponseAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_identity_account_request.go b/customer/model_identity_account_request.go new file mode 100644 index 00000000..f6c4ff8c --- /dev/null +++ b/customer/model_identity_account_request.go @@ -0,0 +1,284 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the IdentityAccountRequest type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &IdentityAccountRequest{} + +// IdentityAccountRequest struct for IdentityAccountRequest +type IdentityAccountRequest struct { + Type *IdentityAccountType `json:"type,omitempty"` + // The issuing institution associated with the account (e.g., OCBC, GOPAY, 7-11). If adding financial accounts that Xendit supports, we recommend you use the channel_name found at https://xendit.github.io/apireference/#payment-channels for this field + Company *string `json:"company,omitempty"` + // Free text description of this account + Description *string `json:"description,omitempty"` + // ISO3166-2 country code + Country NullableString `json:"country,omitempty"` + Properties *IdentityAccountRequestProperties `json:"properties,omitempty"` +} + +// NewIdentityAccountRequest instantiates a new IdentityAccountRequest 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 NewIdentityAccountRequest() *IdentityAccountRequest { + this := IdentityAccountRequest{} + return &this +} + +// NewIdentityAccountRequestWithDefaults instantiates a new IdentityAccountRequest 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 NewIdentityAccountRequestWithDefaults() *IdentityAccountRequest { + this := IdentityAccountRequest{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IdentityAccountRequest) GetType() IdentityAccountType { + if o == nil || utils.IsNil(o.Type) { + var ret IdentityAccountType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityAccountRequest) GetTypeOk() (*IdentityAccountType, bool) { + if o == nil || utils.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IdentityAccountRequest) HasType() bool { + if o != nil && !utils.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given IdentityAccountType and assigns it to the Type field. +func (o *IdentityAccountRequest) SetType(v IdentityAccountType) { + o.Type = &v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *IdentityAccountRequest) GetCompany() string { + if o == nil || utils.IsNil(o.Company) { + var ret string + return ret + } + return *o.Company +} + +// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityAccountRequest) GetCompanyOk() (*string, bool) { + if o == nil || utils.IsNil(o.Company) { + return nil, false + } + return o.Company, true +} + +// HasCompany returns a boolean if a field has been set. +func (o *IdentityAccountRequest) HasCompany() bool { + if o != nil && !utils.IsNil(o.Company) { + return true + } + + return false +} + +// SetCompany gets a reference to the given string and assigns it to the Company field. +func (o *IdentityAccountRequest) SetCompany(v string) { + o.Company = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *IdentityAccountRequest) GetDescription() string { + if o == nil || utils.IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityAccountRequest) GetDescriptionOk() (*string, bool) { + if o == nil || utils.IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *IdentityAccountRequest) HasDescription() bool { + if o != nil && !utils.IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *IdentityAccountRequest) SetDescription(v string) { + o.Description = &v +} + +// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IdentityAccountRequest) GetCountry() string { + if o == nil || utils.IsNil(o.Country.Get()) { + var ret string + return ret + } + return *o.Country.Get() +} + +// GetCountryOk returns a tuple with the Country 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 *IdentityAccountRequest) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Country.Get(), o.Country.IsSet() +} + +// HasCountry returns a boolean if a field has been set. +func (o *IdentityAccountRequest) HasCountry() bool { + if o != nil && o.Country.IsSet() { + return true + } + + return false +} + +// SetCountry gets a reference to the given NullableString and assigns it to the Country field. +func (o *IdentityAccountRequest) SetCountry(v string) { + o.Country.Set(&v) +} +// SetCountryNil sets the value for Country to be an explicit nil +func (o *IdentityAccountRequest) SetCountryNil() { + o.Country.Set(nil) +} + +// UnsetCountry ensures that no value is present for Country, not even an explicit nil +func (o *IdentityAccountRequest) UnsetCountry() { + o.Country.Unset() +} + +// GetProperties returns the Properties field value if set, zero value otherwise. +func (o *IdentityAccountRequest) GetProperties() IdentityAccountRequestProperties { + if o == nil || utils.IsNil(o.Properties) { + var ret IdentityAccountRequestProperties + return ret + } + return *o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityAccountRequest) GetPropertiesOk() (*IdentityAccountRequestProperties, bool) { + if o == nil || utils.IsNil(o.Properties) { + return nil, false + } + return o.Properties, true +} + +// HasProperties returns a boolean if a field has been set. +func (o *IdentityAccountRequest) HasProperties() bool { + if o != nil && !utils.IsNil(o.Properties) { + return true + } + + return false +} + +// SetProperties gets a reference to the given IdentityAccountRequestProperties and assigns it to the Properties field. +func (o *IdentityAccountRequest) SetProperties(v IdentityAccountRequestProperties) { + o.Properties = &v +} + +func (o IdentityAccountRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IdentityAccountRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !utils.IsNil(o.Company) { + toSerialize["company"] = o.Company + } + if !utils.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if o.Country.IsSet() { + toSerialize["country"] = o.Country.Get() + } + if !utils.IsNil(o.Properties) { + toSerialize["properties"] = o.Properties + } + return toSerialize, nil +} + +type NullableIdentityAccountRequest struct { + value *IdentityAccountRequest + isSet bool +} + +func (v NullableIdentityAccountRequest) Get() *IdentityAccountRequest { + return v.value +} + +func (v *NullableIdentityAccountRequest) Set(val *IdentityAccountRequest) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityAccountRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityAccountRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityAccountRequest(val *IdentityAccountRequest) *NullableIdentityAccountRequest { + return &NullableIdentityAccountRequest{value: val, isSet: true} +} + +func (v NullableIdentityAccountRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityAccountRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_identity_account_request_properties.go b/customer/model_identity_account_request_properties.go new file mode 100644 index 00000000..a494efd5 --- /dev/null +++ b/customer/model_identity_account_request_properties.go @@ -0,0 +1,176 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + "fmt" +) + +// IdentityAccountRequestProperties struct for IdentityAccountRequestProperties +type IdentityAccountRequestProperties struct { + AccountBank *AccountBank + AccountCard *AccountCard + AccountEwallet *AccountEwallet + AccountOTC *AccountOTC + AccountPayLater *AccountPayLater + AccountQRCode *AccountQRCode +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *IdentityAccountRequestProperties) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AccountBank + err = json.Unmarshal(data, &dst.AccountBank); + if err == nil { + jsonAccountBank, _ := json.Marshal(dst.AccountBank) + if string(jsonAccountBank) == "{}" { // empty struct + dst.AccountBank = nil + } else { + return nil // data stored in dst.AccountBank, return on the first match + } + } else { + dst.AccountBank = nil + } + + // try to unmarshal JSON data into AccountCard + err = json.Unmarshal(data, &dst.AccountCard); + if err == nil { + jsonAccountCard, _ := json.Marshal(dst.AccountCard) + if string(jsonAccountCard) == "{}" { // empty struct + dst.AccountCard = nil + } else { + return nil // data stored in dst.AccountCard, return on the first match + } + } else { + dst.AccountCard = nil + } + + // try to unmarshal JSON data into AccountEwallet + err = json.Unmarshal(data, &dst.AccountEwallet); + if err == nil { + jsonAccountEwallet, _ := json.Marshal(dst.AccountEwallet) + if string(jsonAccountEwallet) == "{}" { // empty struct + dst.AccountEwallet = nil + } else { + return nil // data stored in dst.AccountEwallet, return on the first match + } + } else { + dst.AccountEwallet = nil + } + + // try to unmarshal JSON data into AccountOTC + err = json.Unmarshal(data, &dst.AccountOTC); + if err == nil { + jsonAccountOTC, _ := json.Marshal(dst.AccountOTC) + if string(jsonAccountOTC) == "{}" { // empty struct + dst.AccountOTC = nil + } else { + return nil // data stored in dst.AccountOTC, return on the first match + } + } else { + dst.AccountOTC = nil + } + + // try to unmarshal JSON data into AccountPayLater + err = json.Unmarshal(data, &dst.AccountPayLater); + if err == nil { + jsonAccountPayLater, _ := json.Marshal(dst.AccountPayLater) + if string(jsonAccountPayLater) == "{}" { // empty struct + dst.AccountPayLater = nil + } else { + return nil // data stored in dst.AccountPayLater, return on the first match + } + } else { + dst.AccountPayLater = nil + } + + // try to unmarshal JSON data into AccountQRCode + err = json.Unmarshal(data, &dst.AccountQRCode); + if err == nil { + jsonAccountQRCode, _ := json.Marshal(dst.AccountQRCode) + if string(jsonAccountQRCode) == "{}" { // empty struct + dst.AccountQRCode = nil + } else { + return nil // data stored in dst.AccountQRCode, return on the first match + } + } else { + dst.AccountQRCode = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(IdentityAccountRequestProperties)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *IdentityAccountRequestProperties) MarshalJSON() ([]byte, error) { + if src.AccountBank != nil { + return json.Marshal(&src.AccountBank) + } + + if src.AccountCard != nil { + return json.Marshal(&src.AccountCard) + } + + if src.AccountEwallet != nil { + return json.Marshal(&src.AccountEwallet) + } + + if src.AccountOTC != nil { + return json.Marshal(&src.AccountOTC) + } + + if src.AccountPayLater != nil { + return json.Marshal(&src.AccountPayLater) + } + + if src.AccountQRCode != nil { + return json.Marshal(&src.AccountQRCode) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableIdentityAccountRequestProperties struct { + value *IdentityAccountRequestProperties + isSet bool +} + +func (v NullableIdentityAccountRequestProperties) Get() *IdentityAccountRequestProperties { + return v.value +} + +func (v *NullableIdentityAccountRequestProperties) Set(val *IdentityAccountRequestProperties) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityAccountRequestProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityAccountRequestProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityAccountRequestProperties(val *IdentityAccountRequestProperties) *NullableIdentityAccountRequestProperties { + return &NullableIdentityAccountRequestProperties{value: val, isSet: true} +} + +func (v NullableIdentityAccountRequestProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityAccountRequestProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_identity_account_response.go b/customer/model_identity_account_response.go new file mode 100644 index 00000000..d6699f1e --- /dev/null +++ b/customer/model_identity_account_response.go @@ -0,0 +1,408 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" + "time" +) + +// checks if the IdentityAccountResponse type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &IdentityAccountResponse{} + +// IdentityAccountResponse struct for IdentityAccountResponse +type IdentityAccountResponse struct { + Id *string `json:"id,omitempty"` + Code NullableString `json:"code,omitempty"` + Company NullableString `json:"company"` + Description NullableString `json:"description"` + // ISO3166-2 country code + Country NullableString `json:"country"` + HolderName NullableString `json:"holder_name,omitempty"` + Type NullableString `json:"type"` + Properties IdentityAccountResponseProperties `json:"properties"` + Created *time.Time `json:"created,omitempty"` +} + +// NewIdentityAccountResponse instantiates a new IdentityAccountResponse 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 NewIdentityAccountResponse(company NullableString, description NullableString, country NullableString, type_ NullableString, properties IdentityAccountResponseProperties) *IdentityAccountResponse { + this := IdentityAccountResponse{} + this.Company = company + this.Description = description + this.Country = country + this.Type = type_ + this.Properties = properties + return &this +} + +// NewIdentityAccountResponseWithDefaults instantiates a new IdentityAccountResponse 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 NewIdentityAccountResponseWithDefaults() *IdentityAccountResponse { + this := IdentityAccountResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *IdentityAccountResponse) GetId() string { + if o == nil || utils.IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityAccountResponse) GetIdOk() (*string, bool) { + if o == nil || utils.IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *IdentityAccountResponse) HasId() bool { + if o != nil && !utils.IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *IdentityAccountResponse) SetId(v string) { + o.Id = &v +} + +// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IdentityAccountResponse) GetCode() string { + if o == nil || utils.IsNil(o.Code.Get()) { + var ret string + return ret + } + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code 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 *IdentityAccountResponse) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// HasCode returns a boolean if a field has been set. +func (o *IdentityAccountResponse) HasCode() bool { + if o != nil && o.Code.IsSet() { + return true + } + + return false +} + +// SetCode gets a reference to the given NullableString and assigns it to the Code field. +func (o *IdentityAccountResponse) SetCode(v string) { + o.Code.Set(&v) +} +// SetCodeNil sets the value for Code to be an explicit nil +func (o *IdentityAccountResponse) SetCodeNil() { + o.Code.Set(nil) +} + +// UnsetCode ensures that no value is present for Code, not even an explicit nil +func (o *IdentityAccountResponse) UnsetCode() { + o.Code.Unset() +} + +// GetCompany returns the Company field value +// If the value is explicit nil, the zero value for string will be returned +func (o *IdentityAccountResponse) GetCompany() string { + if o == nil || o.Company.Get() == nil { + var ret string + return ret + } + + return *o.Company.Get() +} + +// GetCompanyOk returns a tuple with the Company field value +// 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 *IdentityAccountResponse) GetCompanyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Company.Get(), o.Company.IsSet() +} + +// SetCompany sets field value +func (o *IdentityAccountResponse) SetCompany(v string) { + o.Company.Set(&v) +} + +// GetDescription returns the Description field value +// If the value is explicit nil, the zero value for string will be returned +func (o *IdentityAccountResponse) GetDescription() string { + if o == nil || o.Description.Get() == nil { + var ret string + return ret + } + + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value +// 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 *IdentityAccountResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// SetDescription sets field value +func (o *IdentityAccountResponse) SetDescription(v string) { + o.Description.Set(&v) +} + +// GetCountry returns the Country field value +// If the value is explicit nil, the zero value for string will be returned +func (o *IdentityAccountResponse) GetCountry() string { + if o == nil || o.Country.Get() == nil { + var ret string + return ret + } + + return *o.Country.Get() +} + +// GetCountryOk returns a tuple with the Country field value +// 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 *IdentityAccountResponse) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Country.Get(), o.Country.IsSet() +} + +// SetCountry sets field value +func (o *IdentityAccountResponse) SetCountry(v string) { + o.Country.Set(&v) +} + +// GetHolderName returns the HolderName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IdentityAccountResponse) GetHolderName() string { + if o == nil || utils.IsNil(o.HolderName.Get()) { + var ret string + return ret + } + return *o.HolderName.Get() +} + +// GetHolderNameOk returns a tuple with the HolderName 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 *IdentityAccountResponse) GetHolderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HolderName.Get(), o.HolderName.IsSet() +} + +// HasHolderName returns a boolean if a field has been set. +func (o *IdentityAccountResponse) HasHolderName() bool { + if o != nil && o.HolderName.IsSet() { + return true + } + + return false +} + +// SetHolderName gets a reference to the given NullableString and assigns it to the HolderName field. +func (o *IdentityAccountResponse) SetHolderName(v string) { + o.HolderName.Set(&v) +} +// SetHolderNameNil sets the value for HolderName to be an explicit nil +func (o *IdentityAccountResponse) SetHolderNameNil() { + o.HolderName.Set(nil) +} + +// UnsetHolderName ensures that no value is present for HolderName, not even an explicit nil +func (o *IdentityAccountResponse) UnsetHolderName() { + o.HolderName.Unset() +} + +// GetType returns the Type field value +// If the value is explicit nil, the zero value for string will be returned +func (o *IdentityAccountResponse) GetType() string { + if o == nil || o.Type.Get() == nil { + var ret string + return ret + } + + return *o.Type.Get() +} + +// GetTypeOk returns a tuple with the Type field value +// 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 *IdentityAccountResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Type.Get(), o.Type.IsSet() +} + +// SetType sets field value +func (o *IdentityAccountResponse) SetType(v string) { + o.Type.Set(&v) +} + +// GetProperties returns the Properties field value +func (o *IdentityAccountResponse) GetProperties() IdentityAccountResponseProperties { + if o == nil { + var ret IdentityAccountResponseProperties + return ret + } + + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value +// and a boolean to check if the value has been set. +func (o *IdentityAccountResponse) GetPropertiesOk() (*IdentityAccountResponseProperties, bool) { + if o == nil { + return nil, false + } + return &o.Properties, true +} + +// SetProperties sets field value +func (o *IdentityAccountResponse) SetProperties(v IdentityAccountResponseProperties) { + o.Properties = v +} + +// GetCreated returns the Created field value if set, zero value otherwise. +func (o *IdentityAccountResponse) GetCreated() time.Time { + if o == nil || utils.IsNil(o.Created) { + var ret time.Time + return ret + } + return *o.Created +} + +// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IdentityAccountResponse) GetCreatedOk() (*time.Time, bool) { + if o == nil || utils.IsNil(o.Created) { + return nil, false + } + return o.Created, true +} + +// HasCreated returns a boolean if a field has been set. +func (o *IdentityAccountResponse) HasCreated() bool { + if o != nil && !utils.IsNil(o.Created) { + return true + } + + return false +} + +// SetCreated gets a reference to the given time.Time and assigns it to the Created field. +func (o *IdentityAccountResponse) SetCreated(v time.Time) { + o.Created = &v +} + +func (o IdentityAccountResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IdentityAccountResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if o.Code.IsSet() { + toSerialize["code"] = o.Code.Get() + } + toSerialize["company"] = o.Company.Get() + + toSerialize["description"] = o.Description.Get() + + toSerialize["country"] = o.Country.Get() + + if o.HolderName.IsSet() { + toSerialize["holder_name"] = o.HolderName.Get() + } + toSerialize["type"] = o.Type.Get() + if o.Type.Get() != nil && (*o.Type.Get() != "BANK_ACCOUNT" && *o.Type.Get() != "EWALLET" && *o.Type.Get() != "CREDIT_CARD" && *o.Type.Get() != "OTC" && *o.Type.Get() != "QR_CODE" && *o.Type.Get() != "CARDLESS_CREDIT") { + toSerialize["type"] = nil + return toSerialize, utils.NewError("invalid value for Type when marshalling to JSON, must be one of BANK_ACCOUNT, EWALLET, CREDIT_CARD, OTC, QR_CODE, CARDLESS_CREDIT") + } + + toSerialize["properties"] = o.Properties + if !utils.IsNil(o.Created) { + toSerialize["created"] = o.Created + } + return toSerialize, nil +} + +type NullableIdentityAccountResponse struct { + value *IdentityAccountResponse + isSet bool +} + +func (v NullableIdentityAccountResponse) Get() *IdentityAccountResponse { + return v.value +} + +func (v *NullableIdentityAccountResponse) Set(val *IdentityAccountResponse) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityAccountResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityAccountResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityAccountResponse(val *IdentityAccountResponse) *NullableIdentityAccountResponse { + return &NullableIdentityAccountResponse{value: val, isSet: true} +} + +func (v NullableIdentityAccountResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityAccountResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_identity_account_response_properties.go b/customer/model_identity_account_response_properties.go new file mode 100644 index 00000000..7ce91666 --- /dev/null +++ b/customer/model_identity_account_response_properties.go @@ -0,0 +1,176 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + "fmt" +) + +// IdentityAccountResponseProperties struct for IdentityAccountResponseProperties +type IdentityAccountResponseProperties struct { + AccountBank *AccountBank + AccountCard *AccountCard + AccountEwallet *AccountEwallet + AccountOTC *AccountOTC + AccountPayLater *AccountPayLater + AccountQRCode *AccountQRCode +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *IdentityAccountResponseProperties) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into AccountBank + err = json.Unmarshal(data, &dst.AccountBank); + if err == nil { + jsonAccountBank, _ := json.Marshal(dst.AccountBank) + if string(jsonAccountBank) == "{}" { // empty struct + dst.AccountBank = nil + } else { + return nil // data stored in dst.AccountBank, return on the first match + } + } else { + dst.AccountBank = nil + } + + // try to unmarshal JSON data into AccountCard + err = json.Unmarshal(data, &dst.AccountCard); + if err == nil { + jsonAccountCard, _ := json.Marshal(dst.AccountCard) + if string(jsonAccountCard) == "{}" { // empty struct + dst.AccountCard = nil + } else { + return nil // data stored in dst.AccountCard, return on the first match + } + } else { + dst.AccountCard = nil + } + + // try to unmarshal JSON data into AccountEwallet + err = json.Unmarshal(data, &dst.AccountEwallet); + if err == nil { + jsonAccountEwallet, _ := json.Marshal(dst.AccountEwallet) + if string(jsonAccountEwallet) == "{}" { // empty struct + dst.AccountEwallet = nil + } else { + return nil // data stored in dst.AccountEwallet, return on the first match + } + } else { + dst.AccountEwallet = nil + } + + // try to unmarshal JSON data into AccountOTC + err = json.Unmarshal(data, &dst.AccountOTC); + if err == nil { + jsonAccountOTC, _ := json.Marshal(dst.AccountOTC) + if string(jsonAccountOTC) == "{}" { // empty struct + dst.AccountOTC = nil + } else { + return nil // data stored in dst.AccountOTC, return on the first match + } + } else { + dst.AccountOTC = nil + } + + // try to unmarshal JSON data into AccountPayLater + err = json.Unmarshal(data, &dst.AccountPayLater); + if err == nil { + jsonAccountPayLater, _ := json.Marshal(dst.AccountPayLater) + if string(jsonAccountPayLater) == "{}" { // empty struct + dst.AccountPayLater = nil + } else { + return nil // data stored in dst.AccountPayLater, return on the first match + } + } else { + dst.AccountPayLater = nil + } + + // try to unmarshal JSON data into AccountQRCode + err = json.Unmarshal(data, &dst.AccountQRCode); + if err == nil { + jsonAccountQRCode, _ := json.Marshal(dst.AccountQRCode) + if string(jsonAccountQRCode) == "{}" { // empty struct + dst.AccountQRCode = nil + } else { + return nil // data stored in dst.AccountQRCode, return on the first match + } + } else { + dst.AccountQRCode = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(IdentityAccountResponseProperties)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *IdentityAccountResponseProperties) MarshalJSON() ([]byte, error) { + if src.AccountBank != nil { + return json.Marshal(&src.AccountBank) + } + + if src.AccountCard != nil { + return json.Marshal(&src.AccountCard) + } + + if src.AccountEwallet != nil { + return json.Marshal(&src.AccountEwallet) + } + + if src.AccountOTC != nil { + return json.Marshal(&src.AccountOTC) + } + + if src.AccountPayLater != nil { + return json.Marshal(&src.AccountPayLater) + } + + if src.AccountQRCode != nil { + return json.Marshal(&src.AccountQRCode) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableIdentityAccountResponseProperties struct { + value *IdentityAccountResponseProperties + isSet bool +} + +func (v NullableIdentityAccountResponseProperties) Get() *IdentityAccountResponseProperties { + return v.value +} + +func (v *NullableIdentityAccountResponseProperties) Set(val *IdentityAccountResponseProperties) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityAccountResponseProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityAccountResponseProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityAccountResponseProperties(val *IdentityAccountResponseProperties) *NullableIdentityAccountResponseProperties { + return &NullableIdentityAccountResponseProperties{value: val, isSet: true} +} + +func (v NullableIdentityAccountResponseProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityAccountResponseProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_identity_account_type.go b/customer/model_identity_account_type.go new file mode 100644 index 00000000..e67412be --- /dev/null +++ b/customer/model_identity_account_type.go @@ -0,0 +1,122 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + "fmt" +) + +// IdentityAccountType the model 'IdentityAccountType' +type IdentityAccountType string + +// List of IdentityAccountType +const ( + IDENTITYACCOUNTTYPE_BANK_ACCOUNT IdentityAccountType = "BANK_ACCOUNT" + IDENTITYACCOUNTTYPE_EWALLET IdentityAccountType = "EWALLET" + IDENTITYACCOUNTTYPE_CREDIT_CARD IdentityAccountType = "CREDIT_CARD" + IDENTITYACCOUNTTYPE_PAY_LATER IdentityAccountType = "PAY_LATER" + IDENTITYACCOUNTTYPE_OTC IdentityAccountType = "OTC" + IDENTITYACCOUNTTYPE_QR_CODE IdentityAccountType = "QR_CODE" +) + +// All allowed values of IdentityAccountType enum +var AllowedIdentityAccountTypeEnumValues = []IdentityAccountType{ + "BANK_ACCOUNT", + "EWALLET", + "CREDIT_CARD", + "PAY_LATER", + "OTC", + "QR_CODE", +} + +func (v *IdentityAccountType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := IdentityAccountType(value) + for _, existing := range AllowedIdentityAccountTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid IdentityAccountType", value) +} + +// NewIdentityAccountTypeFromValue returns a pointer to a valid IdentityAccountType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewIdentityAccountTypeFromValue(v string) (*IdentityAccountType, error) { + ev := IdentityAccountType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for IdentityAccountType: valid values are %v", v, AllowedIdentityAccountTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v IdentityAccountType) IsValid() bool { + for _, existing := range AllowedIdentityAccountTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +func (v IdentityAccountType) String() string { + return string(v) +} + +// Ptr returns reference to IdentityAccountType value +func (v IdentityAccountType) Ptr() *IdentityAccountType { + return &v +} + +type NullableIdentityAccountType struct { + value *IdentityAccountType + isSet bool +} + +func (v NullableIdentityAccountType) Get() *IdentityAccountType { + return v.value +} + +func (v *NullableIdentityAccountType) Set(val *IdentityAccountType) { + v.value = val + v.isSet = true +} + +func (v NullableIdentityAccountType) IsSet() bool { + return v.isSet +} + +func (v *NullableIdentityAccountType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIdentityAccountType(val *IdentityAccountType) *NullableIdentityAccountType { + return &NullableIdentityAccountType{value: val, isSet: true} +} + +func (v NullableIdentityAccountType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIdentityAccountType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/customer/model_individual_detail.go b/customer/model_individual_detail.go new file mode 100644 index 00000000..65047a65 --- /dev/null +++ b/customer/model_individual_detail.go @@ -0,0 +1,592 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the IndividualDetail type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &IndividualDetail{} + +// IndividualDetail struct for IndividualDetail +type IndividualDetail struct { + GivenNames *string `json:"given_names,omitempty"` + GivenNamesNonRoman NullableString `json:"given_names_non_roman,omitempty"` + MiddleName NullableString `json:"middle_name,omitempty"` + Surname NullableString `json:"surname,omitempty"` + SurnameNonRoman NullableString `json:"surname_non_roman,omitempty"` + MotherMaidenName NullableString `json:"mother_maiden_name,omitempty"` + Gender NullableString `json:"gender,omitempty"` + DateOfBirth NullableString `json:"date_of_birth,omitempty"` + // ISO3166-2 country code + Nationality NullableString `json:"nationality,omitempty"` + PlaceOfBirth NullableString `json:"place_of_birth,omitempty"` + Employment NullableEmploymentDetail `json:"employment,omitempty"` +} + +// NewIndividualDetail instantiates a new IndividualDetail 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 NewIndividualDetail() *IndividualDetail { + this := IndividualDetail{} + return &this +} + +// NewIndividualDetailWithDefaults instantiates a new IndividualDetail 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 NewIndividualDetailWithDefaults() *IndividualDetail { + this := IndividualDetail{} + return &this +} + +// GetGivenNames returns the GivenNames field value if set, zero value otherwise. +func (o *IndividualDetail) GetGivenNames() string { + if o == nil || utils.IsNil(o.GivenNames) { + var ret string + return ret + } + return *o.GivenNames +} + +// GetGivenNamesOk returns a tuple with the GivenNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndividualDetail) GetGivenNamesOk() (*string, bool) { + if o == nil || utils.IsNil(o.GivenNames) { + return nil, false + } + return o.GivenNames, true +} + +// HasGivenNames returns a boolean if a field has been set. +func (o *IndividualDetail) HasGivenNames() bool { + if o != nil && !utils.IsNil(o.GivenNames) { + return true + } + + return false +} + +// SetGivenNames gets a reference to the given string and assigns it to the GivenNames field. +func (o *IndividualDetail) SetGivenNames(v string) { + o.GivenNames = &v +} + +// GetGivenNamesNonRoman returns the GivenNamesNonRoman field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetGivenNamesNonRoman() string { + if o == nil || utils.IsNil(o.GivenNamesNonRoman.Get()) { + var ret string + return ret + } + return *o.GivenNamesNonRoman.Get() +} + +// GetGivenNamesNonRomanOk returns a tuple with the GivenNamesNonRoman 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 *IndividualDetail) GetGivenNamesNonRomanOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GivenNamesNonRoman.Get(), o.GivenNamesNonRoman.IsSet() +} + +// HasGivenNamesNonRoman returns a boolean if a field has been set. +func (o *IndividualDetail) HasGivenNamesNonRoman() bool { + if o != nil && o.GivenNamesNonRoman.IsSet() { + return true + } + + return false +} + +// SetGivenNamesNonRoman gets a reference to the given NullableString and assigns it to the GivenNamesNonRoman field. +func (o *IndividualDetail) SetGivenNamesNonRoman(v string) { + o.GivenNamesNonRoman.Set(&v) +} +// SetGivenNamesNonRomanNil sets the value for GivenNamesNonRoman to be an explicit nil +func (o *IndividualDetail) SetGivenNamesNonRomanNil() { + o.GivenNamesNonRoman.Set(nil) +} + +// UnsetGivenNamesNonRoman ensures that no value is present for GivenNamesNonRoman, not even an explicit nil +func (o *IndividualDetail) UnsetGivenNamesNonRoman() { + o.GivenNamesNonRoman.Unset() +} + +// GetMiddleName returns the MiddleName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetMiddleName() string { + if o == nil || utils.IsNil(o.MiddleName.Get()) { + var ret string + return ret + } + return *o.MiddleName.Get() +} + +// GetMiddleNameOk returns a tuple with the MiddleName 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 *IndividualDetail) GetMiddleNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MiddleName.Get(), o.MiddleName.IsSet() +} + +// HasMiddleName returns a boolean if a field has been set. +func (o *IndividualDetail) HasMiddleName() bool { + if o != nil && o.MiddleName.IsSet() { + return true + } + + return false +} + +// SetMiddleName gets a reference to the given NullableString and assigns it to the MiddleName field. +func (o *IndividualDetail) SetMiddleName(v string) { + o.MiddleName.Set(&v) +} +// SetMiddleNameNil sets the value for MiddleName to be an explicit nil +func (o *IndividualDetail) SetMiddleNameNil() { + o.MiddleName.Set(nil) +} + +// UnsetMiddleName ensures that no value is present for MiddleName, not even an explicit nil +func (o *IndividualDetail) UnsetMiddleName() { + o.MiddleName.Unset() +} + +// GetSurname returns the Surname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetSurname() string { + if o == nil || utils.IsNil(o.Surname.Get()) { + var ret string + return ret + } + return *o.Surname.Get() +} + +// GetSurnameOk returns a tuple with the Surname 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 *IndividualDetail) GetSurnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Surname.Get(), o.Surname.IsSet() +} + +// HasSurname returns a boolean if a field has been set. +func (o *IndividualDetail) HasSurname() bool { + if o != nil && o.Surname.IsSet() { + return true + } + + return false +} + +// SetSurname gets a reference to the given NullableString and assigns it to the Surname field. +func (o *IndividualDetail) SetSurname(v string) { + o.Surname.Set(&v) +} +// SetSurnameNil sets the value for Surname to be an explicit nil +func (o *IndividualDetail) SetSurnameNil() { + o.Surname.Set(nil) +} + +// UnsetSurname ensures that no value is present for Surname, not even an explicit nil +func (o *IndividualDetail) UnsetSurname() { + o.Surname.Unset() +} + +// GetSurnameNonRoman returns the SurnameNonRoman field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetSurnameNonRoman() string { + if o == nil || utils.IsNil(o.SurnameNonRoman.Get()) { + var ret string + return ret + } + return *o.SurnameNonRoman.Get() +} + +// GetSurnameNonRomanOk returns a tuple with the SurnameNonRoman 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 *IndividualDetail) GetSurnameNonRomanOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SurnameNonRoman.Get(), o.SurnameNonRoman.IsSet() +} + +// HasSurnameNonRoman returns a boolean if a field has been set. +func (o *IndividualDetail) HasSurnameNonRoman() bool { + if o != nil && o.SurnameNonRoman.IsSet() { + return true + } + + return false +} + +// SetSurnameNonRoman gets a reference to the given NullableString and assigns it to the SurnameNonRoman field. +func (o *IndividualDetail) SetSurnameNonRoman(v string) { + o.SurnameNonRoman.Set(&v) +} +// SetSurnameNonRomanNil sets the value for SurnameNonRoman to be an explicit nil +func (o *IndividualDetail) SetSurnameNonRomanNil() { + o.SurnameNonRoman.Set(nil) +} + +// UnsetSurnameNonRoman ensures that no value is present for SurnameNonRoman, not even an explicit nil +func (o *IndividualDetail) UnsetSurnameNonRoman() { + o.SurnameNonRoman.Unset() +} + +// GetMotherMaidenName returns the MotherMaidenName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetMotherMaidenName() string { + if o == nil || utils.IsNil(o.MotherMaidenName.Get()) { + var ret string + return ret + } + return *o.MotherMaidenName.Get() +} + +// GetMotherMaidenNameOk returns a tuple with the MotherMaidenName 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 *IndividualDetail) GetMotherMaidenNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MotherMaidenName.Get(), o.MotherMaidenName.IsSet() +} + +// HasMotherMaidenName returns a boolean if a field has been set. +func (o *IndividualDetail) HasMotherMaidenName() bool { + if o != nil && o.MotherMaidenName.IsSet() { + return true + } + + return false +} + +// SetMotherMaidenName gets a reference to the given NullableString and assigns it to the MotherMaidenName field. +func (o *IndividualDetail) SetMotherMaidenName(v string) { + o.MotherMaidenName.Set(&v) +} +// SetMotherMaidenNameNil sets the value for MotherMaidenName to be an explicit nil +func (o *IndividualDetail) SetMotherMaidenNameNil() { + o.MotherMaidenName.Set(nil) +} + +// UnsetMotherMaidenName ensures that no value is present for MotherMaidenName, not even an explicit nil +func (o *IndividualDetail) UnsetMotherMaidenName() { + o.MotherMaidenName.Unset() +} + +// GetGender returns the Gender field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetGender() string { + if o == nil || utils.IsNil(o.Gender.Get()) { + var ret string + return ret + } + return *o.Gender.Get() +} + +// GetGenderOk returns a tuple with the Gender 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 *IndividualDetail) GetGenderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gender.Get(), o.Gender.IsSet() +} + +// HasGender returns a boolean if a field has been set. +func (o *IndividualDetail) HasGender() bool { + if o != nil && o.Gender.IsSet() { + return true + } + + return false +} + +// SetGender gets a reference to the given NullableString and assigns it to the Gender field. +func (o *IndividualDetail) SetGender(v string) { + o.Gender.Set(&v) +} +// SetGenderNil sets the value for Gender to be an explicit nil +func (o *IndividualDetail) SetGenderNil() { + o.Gender.Set(nil) +} + +// UnsetGender ensures that no value is present for Gender, not even an explicit nil +func (o *IndividualDetail) UnsetGender() { + o.Gender.Unset() +} + +// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetDateOfBirth() string { + if o == nil || utils.IsNil(o.DateOfBirth.Get()) { + var ret string + return ret + } + return *o.DateOfBirth.Get() +} + +// GetDateOfBirthOk returns a tuple with the DateOfBirth 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 *IndividualDetail) GetDateOfBirthOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DateOfBirth.Get(), o.DateOfBirth.IsSet() +} + +// HasDateOfBirth returns a boolean if a field has been set. +func (o *IndividualDetail) HasDateOfBirth() bool { + if o != nil && o.DateOfBirth.IsSet() { + return true + } + + return false +} + +// SetDateOfBirth gets a reference to the given NullableString and assigns it to the DateOfBirth field. +func (o *IndividualDetail) SetDateOfBirth(v string) { + o.DateOfBirth.Set(&v) +} +// SetDateOfBirthNil sets the value for DateOfBirth to be an explicit nil +func (o *IndividualDetail) SetDateOfBirthNil() { + o.DateOfBirth.Set(nil) +} + +// UnsetDateOfBirth ensures that no value is present for DateOfBirth, not even an explicit nil +func (o *IndividualDetail) UnsetDateOfBirth() { + o.DateOfBirth.Unset() +} + +// GetNationality returns the Nationality field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetNationality() string { + if o == nil || utils.IsNil(o.Nationality.Get()) { + var ret string + return ret + } + return *o.Nationality.Get() +} + +// GetNationalityOk returns a tuple with the Nationality 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 *IndividualDetail) GetNationalityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Nationality.Get(), o.Nationality.IsSet() +} + +// HasNationality returns a boolean if a field has been set. +func (o *IndividualDetail) HasNationality() bool { + if o != nil && o.Nationality.IsSet() { + return true + } + + return false +} + +// SetNationality gets a reference to the given NullableString and assigns it to the Nationality field. +func (o *IndividualDetail) SetNationality(v string) { + o.Nationality.Set(&v) +} +// SetNationalityNil sets the value for Nationality to be an explicit nil +func (o *IndividualDetail) SetNationalityNil() { + o.Nationality.Set(nil) +} + +// UnsetNationality ensures that no value is present for Nationality, not even an explicit nil +func (o *IndividualDetail) UnsetNationality() { + o.Nationality.Unset() +} + +// GetPlaceOfBirth returns the PlaceOfBirth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetPlaceOfBirth() string { + if o == nil || utils.IsNil(o.PlaceOfBirth.Get()) { + var ret string + return ret + } + return *o.PlaceOfBirth.Get() +} + +// GetPlaceOfBirthOk returns a tuple with the PlaceOfBirth 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 *IndividualDetail) GetPlaceOfBirthOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PlaceOfBirth.Get(), o.PlaceOfBirth.IsSet() +} + +// HasPlaceOfBirth returns a boolean if a field has been set. +func (o *IndividualDetail) HasPlaceOfBirth() bool { + if o != nil && o.PlaceOfBirth.IsSet() { + return true + } + + return false +} + +// SetPlaceOfBirth gets a reference to the given NullableString and assigns it to the PlaceOfBirth field. +func (o *IndividualDetail) SetPlaceOfBirth(v string) { + o.PlaceOfBirth.Set(&v) +} +// SetPlaceOfBirthNil sets the value for PlaceOfBirth to be an explicit nil +func (o *IndividualDetail) SetPlaceOfBirthNil() { + o.PlaceOfBirth.Set(nil) +} + +// UnsetPlaceOfBirth ensures that no value is present for PlaceOfBirth, not even an explicit nil +func (o *IndividualDetail) UnsetPlaceOfBirth() { + o.PlaceOfBirth.Unset() +} + +// GetEmployment returns the Employment field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *IndividualDetail) GetEmployment() EmploymentDetail { + if o == nil || utils.IsNil(o.Employment.Get()) { + var ret EmploymentDetail + return ret + } + return *o.Employment.Get() +} + +// GetEmploymentOk returns a tuple with the Employment 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 *IndividualDetail) GetEmploymentOk() (*EmploymentDetail, bool) { + if o == nil { + return nil, false + } + return o.Employment.Get(), o.Employment.IsSet() +} + +// HasEmployment returns a boolean if a field has been set. +func (o *IndividualDetail) HasEmployment() bool { + if o != nil && o.Employment.IsSet() { + return true + } + + return false +} + +// SetEmployment gets a reference to the given NullableEmploymentDetail and assigns it to the Employment field. +func (o *IndividualDetail) SetEmployment(v EmploymentDetail) { + o.Employment.Set(&v) +} +// SetEmploymentNil sets the value for Employment to be an explicit nil +func (o *IndividualDetail) SetEmploymentNil() { + o.Employment.Set(nil) +} + +// UnsetEmployment ensures that no value is present for Employment, not even an explicit nil +func (o *IndividualDetail) UnsetEmployment() { + o.Employment.Unset() +} + +func (o IndividualDetail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndividualDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.GivenNames) { + toSerialize["given_names"] = o.GivenNames + } + if o.GivenNamesNonRoman.IsSet() { + toSerialize["given_names_non_roman"] = o.GivenNamesNonRoman.Get() + } + if o.MiddleName.IsSet() { + toSerialize["middle_name"] = o.MiddleName.Get() + } + if o.Surname.IsSet() { + toSerialize["surname"] = o.Surname.Get() + } + if o.SurnameNonRoman.IsSet() { + toSerialize["surname_non_roman"] = o.SurnameNonRoman.Get() + } + if o.MotherMaidenName.IsSet() { + toSerialize["mother_maiden_name"] = o.MotherMaidenName.Get() + } + if o.Gender.IsSet() { + toSerialize["gender"] = o.Gender.Get() + if o.Gender.Get() != nil && (*o.Gender.Get() != "MALE" && *o.Gender.Get() != "FEMALE" && *o.Gender.Get() != "OTHER") { + toSerialize["gender"] = nil + return toSerialize, utils.NewError("invalid value for Gender when marshalling to JSON, must be one of MALE, FEMALE, OTHER") + } + } + if o.DateOfBirth.IsSet() { + toSerialize["date_of_birth"] = o.DateOfBirth.Get() + } + if o.Nationality.IsSet() { + toSerialize["nationality"] = o.Nationality.Get() + } + if o.PlaceOfBirth.IsSet() { + toSerialize["place_of_birth"] = o.PlaceOfBirth.Get() + } + if o.Employment.IsSet() { + toSerialize["employment"] = o.Employment.Get() + } + return toSerialize, nil +} + +type NullableIndividualDetail struct { + value *IndividualDetail + isSet bool +} + +func (v NullableIndividualDetail) Get() *IndividualDetail { + return v.value +} + +func (v *NullableIndividualDetail) Set(val *IndividualDetail) { + v.value = val + v.isSet = true +} + +func (v NullableIndividualDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableIndividualDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndividualDetail(val *IndividualDetail) *NullableIndividualDetail { + return &NullableIndividualDetail{value: val, isSet: true} +} + +func (v NullableIndividualDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndividualDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_kyc_document_request.go b/customer/model_kyc_document_request.go new file mode 100644 index 00000000..484c0172 --- /dev/null +++ b/customer/model_kyc_document_request.go @@ -0,0 +1,400 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the KYCDocumentRequest type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &KYCDocumentRequest{} + +// KYCDocumentRequest struct for KYCDocumentRequest +type KYCDocumentRequest struct { + // ISO3166-2 country code + Country NullableString `json:"country,omitempty"` + Type *KYCDocumentType `json:"type,omitempty"` + SubType NullableKYCDocumentSubType `json:"sub_type,omitempty"` + DocumentName *string `json:"document_name,omitempty"` + DocumentNumber *string `json:"document_number,omitempty"` + ExpiresAt *string `json:"expires_at,omitempty"` + HolderName *string `json:"holder_name,omitempty"` + DocumentImages []string `json:"document_images,omitempty"` +} + +// NewKYCDocumentRequest instantiates a new KYCDocumentRequest 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 NewKYCDocumentRequest() *KYCDocumentRequest { + this := KYCDocumentRequest{} + return &this +} + +// NewKYCDocumentRequestWithDefaults instantiates a new KYCDocumentRequest 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 NewKYCDocumentRequestWithDefaults() *KYCDocumentRequest { + this := KYCDocumentRequest{} + return &this +} + +// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KYCDocumentRequest) GetCountry() string { + if o == nil || utils.IsNil(o.Country.Get()) { + var ret string + return ret + } + return *o.Country.Get() +} + +// GetCountryOk returns a tuple with the Country 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 *KYCDocumentRequest) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Country.Get(), o.Country.IsSet() +} + +// HasCountry returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasCountry() bool { + if o != nil && o.Country.IsSet() { + return true + } + + return false +} + +// SetCountry gets a reference to the given NullableString and assigns it to the Country field. +func (o *KYCDocumentRequest) SetCountry(v string) { + o.Country.Set(&v) +} +// SetCountryNil sets the value for Country to be an explicit nil +func (o *KYCDocumentRequest) SetCountryNil() { + o.Country.Set(nil) +} + +// UnsetCountry ensures that no value is present for Country, not even an explicit nil +func (o *KYCDocumentRequest) UnsetCountry() { + o.Country.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *KYCDocumentRequest) GetType() KYCDocumentType { + if o == nil || utils.IsNil(o.Type) { + var ret KYCDocumentType + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KYCDocumentRequest) GetTypeOk() (*KYCDocumentType, bool) { + if o == nil || utils.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasType() bool { + if o != nil && !utils.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given KYCDocumentType and assigns it to the Type field. +func (o *KYCDocumentRequest) SetType(v KYCDocumentType) { + o.Type = &v +} + +// GetSubType returns the SubType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KYCDocumentRequest) GetSubType() KYCDocumentSubType { + if o == nil || utils.IsNil(o.SubType.Get()) { + var ret KYCDocumentSubType + return ret + } + return *o.SubType.Get() +} + +// GetSubTypeOk returns a tuple with the SubType 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 *KYCDocumentRequest) GetSubTypeOk() (*KYCDocumentSubType, bool) { + if o == nil { + return nil, false + } + return o.SubType.Get(), o.SubType.IsSet() +} + +// HasSubType returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasSubType() bool { + if o != nil && o.SubType.IsSet() { + return true + } + + return false +} + +// SetSubType gets a reference to the given NullableKYCDocumentSubType and assigns it to the SubType field. +func (o *KYCDocumentRequest) SetSubType(v KYCDocumentSubType) { + o.SubType.Set(&v) +} +// SetSubTypeNil sets the value for SubType to be an explicit nil +func (o *KYCDocumentRequest) SetSubTypeNil() { + o.SubType.Set(nil) +} + +// UnsetSubType ensures that no value is present for SubType, not even an explicit nil +func (o *KYCDocumentRequest) UnsetSubType() { + o.SubType.Unset() +} + +// GetDocumentName returns the DocumentName field value if set, zero value otherwise. +func (o *KYCDocumentRequest) GetDocumentName() string { + if o == nil || utils.IsNil(o.DocumentName) { + var ret string + return ret + } + return *o.DocumentName +} + +// GetDocumentNameOk returns a tuple with the DocumentName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KYCDocumentRequest) GetDocumentNameOk() (*string, bool) { + if o == nil || utils.IsNil(o.DocumentName) { + return nil, false + } + return o.DocumentName, true +} + +// HasDocumentName returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasDocumentName() bool { + if o != nil && !utils.IsNil(o.DocumentName) { + return true + } + + return false +} + +// SetDocumentName gets a reference to the given string and assigns it to the DocumentName field. +func (o *KYCDocumentRequest) SetDocumentName(v string) { + o.DocumentName = &v +} + +// GetDocumentNumber returns the DocumentNumber field value if set, zero value otherwise. +func (o *KYCDocumentRequest) GetDocumentNumber() string { + if o == nil || utils.IsNil(o.DocumentNumber) { + var ret string + return ret + } + return *o.DocumentNumber +} + +// GetDocumentNumberOk returns a tuple with the DocumentNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KYCDocumentRequest) GetDocumentNumberOk() (*string, bool) { + if o == nil || utils.IsNil(o.DocumentNumber) { + return nil, false + } + return o.DocumentNumber, true +} + +// HasDocumentNumber returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasDocumentNumber() bool { + if o != nil && !utils.IsNil(o.DocumentNumber) { + return true + } + + return false +} + +// SetDocumentNumber gets a reference to the given string and assigns it to the DocumentNumber field. +func (o *KYCDocumentRequest) SetDocumentNumber(v string) { + o.DocumentNumber = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *KYCDocumentRequest) GetExpiresAt() string { + if o == nil || utils.IsNil(o.ExpiresAt) { + var ret string + 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 *KYCDocumentRequest) GetExpiresAtOk() (*string, bool) { + if o == nil || utils.IsNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasExpiresAt() bool { + if o != nil && !utils.IsNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. +func (o *KYCDocumentRequest) SetExpiresAt(v string) { + o.ExpiresAt = &v +} + +// GetHolderName returns the HolderName field value if set, zero value otherwise. +func (o *KYCDocumentRequest) GetHolderName() string { + if o == nil || utils.IsNil(o.HolderName) { + var ret string + return ret + } + return *o.HolderName +} + +// GetHolderNameOk returns a tuple with the HolderName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KYCDocumentRequest) GetHolderNameOk() (*string, bool) { + if o == nil || utils.IsNil(o.HolderName) { + return nil, false + } + return o.HolderName, true +} + +// HasHolderName returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasHolderName() bool { + if o != nil && !utils.IsNil(o.HolderName) { + return true + } + + return false +} + +// SetHolderName gets a reference to the given string and assigns it to the HolderName field. +func (o *KYCDocumentRequest) SetHolderName(v string) { + o.HolderName = &v +} + +// GetDocumentImages returns the DocumentImages field value if set, zero value otherwise. +func (o *KYCDocumentRequest) GetDocumentImages() []string { + if o == nil || utils.IsNil(o.DocumentImages) { + var ret []string + return ret + } + return o.DocumentImages +} + +// GetDocumentImagesOk returns a tuple with the DocumentImages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KYCDocumentRequest) GetDocumentImagesOk() ([]string, bool) { + if o == nil || utils.IsNil(o.DocumentImages) { + return nil, false + } + return o.DocumentImages, true +} + +// HasDocumentImages returns a boolean if a field has been set. +func (o *KYCDocumentRequest) HasDocumentImages() bool { + if o != nil && !utils.IsNil(o.DocumentImages) { + return true + } + + return false +} + +// SetDocumentImages gets a reference to the given []string and assigns it to the DocumentImages field. +func (o *KYCDocumentRequest) SetDocumentImages(v []string) { + o.DocumentImages = v +} + +func (o KYCDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KYCDocumentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Country.IsSet() { + toSerialize["country"] = o.Country.Get() + } + if !utils.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if o.SubType.IsSet() { + toSerialize["sub_type"] = o.SubType.Get() + } + if !utils.IsNil(o.DocumentName) { + toSerialize["document_name"] = o.DocumentName + } + if !utils.IsNil(o.DocumentNumber) { + toSerialize["document_number"] = o.DocumentNumber + } + if !utils.IsNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + if !utils.IsNil(o.HolderName) { + toSerialize["holder_name"] = o.HolderName + } + if !utils.IsNil(o.DocumentImages) { + toSerialize["document_images"] = o.DocumentImages + } + return toSerialize, nil +} + +type NullableKYCDocumentRequest struct { + value *KYCDocumentRequest + isSet bool +} + +func (v NullableKYCDocumentRequest) Get() *KYCDocumentRequest { + return v.value +} + +func (v *NullableKYCDocumentRequest) Set(val *KYCDocumentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableKYCDocumentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableKYCDocumentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKYCDocumentRequest(val *KYCDocumentRequest) *NullableKYCDocumentRequest { + return &NullableKYCDocumentRequest{value: val, isSet: true} +} + +func (v NullableKYCDocumentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKYCDocumentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_kyc_document_response.go b/customer/model_kyc_document_response.go new file mode 100644 index 00000000..931bf423 --- /dev/null +++ b/customer/model_kyc_document_response.go @@ -0,0 +1,323 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the KYCDocumentResponse type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &KYCDocumentResponse{} + +// KYCDocumentResponse struct for KYCDocumentResponse +type KYCDocumentResponse struct { + Country string `json:"country"` + Type KYCDocumentType `json:"type"` + SubType KYCDocumentSubType `json:"sub_type"` + DocumentName NullableString `json:"document_name"` + DocumentNumber NullableString `json:"document_number"` + ExpiresAt NullableString `json:"expires_at"` + HolderName NullableString `json:"holder_name"` + DocumentImages []string `json:"document_images"` +} + +// NewKYCDocumentResponse instantiates a new KYCDocumentResponse 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 NewKYCDocumentResponse(country string, type_ KYCDocumentType, subType KYCDocumentSubType, documentName NullableString, documentNumber NullableString, expiresAt NullableString, holderName NullableString, documentImages []string) *KYCDocumentResponse { + this := KYCDocumentResponse{} + this.Country = country + this.Type = type_ + this.SubType = subType + this.DocumentName = documentName + this.DocumentNumber = documentNumber + this.ExpiresAt = expiresAt + this.HolderName = holderName + this.DocumentImages = documentImages + return &this +} + +// NewKYCDocumentResponseWithDefaults instantiates a new KYCDocumentResponse 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 NewKYCDocumentResponseWithDefaults() *KYCDocumentResponse { + this := KYCDocumentResponse{} + return &this +} + +// GetCountry returns the Country field value +func (o *KYCDocumentResponse) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *KYCDocumentResponse) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *KYCDocumentResponse) SetCountry(v string) { + o.Country = v +} + +// GetType returns the Type field value +func (o *KYCDocumentResponse) GetType() KYCDocumentType { + if o == nil { + var ret KYCDocumentType + 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 *KYCDocumentResponse) GetTypeOk() (*KYCDocumentType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *KYCDocumentResponse) SetType(v KYCDocumentType) { + o.Type = v +} + +// GetSubType returns the SubType field value +func (o *KYCDocumentResponse) GetSubType() KYCDocumentSubType { + if o == nil { + var ret KYCDocumentSubType + return ret + } + + return o.SubType +} + +// GetSubTypeOk returns a tuple with the SubType field value +// and a boolean to check if the value has been set. +func (o *KYCDocumentResponse) GetSubTypeOk() (*KYCDocumentSubType, bool) { + if o == nil { + return nil, false + } + return &o.SubType, true +} + +// SetSubType sets field value +func (o *KYCDocumentResponse) SetSubType(v KYCDocumentSubType) { + o.SubType = v +} + +// GetDocumentName returns the DocumentName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *KYCDocumentResponse) GetDocumentName() string { + if o == nil || o.DocumentName.Get() == nil { + var ret string + return ret + } + + return *o.DocumentName.Get() +} + +// GetDocumentNameOk returns a tuple with the DocumentName field value +// 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 *KYCDocumentResponse) GetDocumentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DocumentName.Get(), o.DocumentName.IsSet() +} + +// SetDocumentName sets field value +func (o *KYCDocumentResponse) SetDocumentName(v string) { + o.DocumentName.Set(&v) +} + +// GetDocumentNumber returns the DocumentNumber field value +// If the value is explicit nil, the zero value for string will be returned +func (o *KYCDocumentResponse) GetDocumentNumber() string { + if o == nil || o.DocumentNumber.Get() == nil { + var ret string + return ret + } + + return *o.DocumentNumber.Get() +} + +// GetDocumentNumberOk returns a tuple with the DocumentNumber field value +// 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 *KYCDocumentResponse) GetDocumentNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DocumentNumber.Get(), o.DocumentNumber.IsSet() +} + +// SetDocumentNumber sets field value +func (o *KYCDocumentResponse) SetDocumentNumber(v string) { + o.DocumentNumber.Set(&v) +} + +// GetExpiresAt returns the ExpiresAt field value +// If the value is explicit nil, the zero value for string will be returned +func (o *KYCDocumentResponse) GetExpiresAt() string { + if o == nil || o.ExpiresAt.Get() == nil { + var ret string + return ret + } + + return *o.ExpiresAt.Get() +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value +// 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 *KYCDocumentResponse) GetExpiresAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() +} + +// SetExpiresAt sets field value +func (o *KYCDocumentResponse) SetExpiresAt(v string) { + o.ExpiresAt.Set(&v) +} + +// GetHolderName returns the HolderName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *KYCDocumentResponse) GetHolderName() string { + if o == nil || o.HolderName.Get() == nil { + var ret string + return ret + } + + return *o.HolderName.Get() +} + +// GetHolderNameOk returns a tuple with the HolderName field value +// 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 *KYCDocumentResponse) GetHolderNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HolderName.Get(), o.HolderName.IsSet() +} + +// SetHolderName sets field value +func (o *KYCDocumentResponse) SetHolderName(v string) { + o.HolderName.Set(&v) +} + +// GetDocumentImages returns the DocumentImages field value +// If the value is explicit nil, the zero value for []string will be returned +func (o *KYCDocumentResponse) GetDocumentImages() []string { + if o == nil { + var ret []string + return ret + } + + return o.DocumentImages +} + +// GetDocumentImagesOk returns a tuple with the DocumentImages field value +// 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 *KYCDocumentResponse) GetDocumentImagesOk() ([]string, bool) { + if o == nil || utils.IsNil(o.DocumentImages) { + return nil, false + } + return o.DocumentImages, true +} + +// SetDocumentImages sets field value +func (o *KYCDocumentResponse) SetDocumentImages(v []string) { + o.DocumentImages = v +} + +func (o KYCDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KYCDocumentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["country"] = o.Country + toSerialize["type"] = o.Type + toSerialize["sub_type"] = o.SubType + toSerialize["document_name"] = o.DocumentName.Get() + + toSerialize["document_number"] = o.DocumentNumber.Get() + + toSerialize["expires_at"] = o.ExpiresAt.Get() + + toSerialize["holder_name"] = o.HolderName.Get() + + if o.DocumentImages != nil { + toSerialize["document_images"] = o.DocumentImages + } + return toSerialize, nil +} + +type NullableKYCDocumentResponse struct { + value *KYCDocumentResponse + isSet bool +} + +func (v NullableKYCDocumentResponse) Get() *KYCDocumentResponse { + return v.value +} + +func (v *NullableKYCDocumentResponse) Set(val *KYCDocumentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableKYCDocumentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableKYCDocumentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKYCDocumentResponse(val *KYCDocumentResponse) *NullableKYCDocumentResponse { + return &NullableKYCDocumentResponse{value: val, isSet: true} +} + +func (v NullableKYCDocumentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKYCDocumentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_kyc_document_sub_type.go b/customer/model_kyc_document_sub_type.go new file mode 100644 index 00000000..494b2d38 --- /dev/null +++ b/customer/model_kyc_document_sub_type.go @@ -0,0 +1,130 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + "fmt" +) + +// KYCDocumentSubType the model 'KYCDocumentSubType' +type KYCDocumentSubType string + +// List of KYCDocumentSubType +const ( + KYCDOCUMENTSUBTYPE_NATIONAL_ID KYCDocumentSubType = "NATIONAL_ID" + KYCDOCUMENTSUBTYPE_CONSULAR_ID KYCDocumentSubType = "CONSULAR_ID" + KYCDOCUMENTSUBTYPE_VOTER_ID KYCDocumentSubType = "VOTER_ID" + KYCDOCUMENTSUBTYPE_POSTAL_ID KYCDocumentSubType = "POSTAL_ID" + KYCDOCUMENTSUBTYPE_RESIDENCE_PERMIT KYCDocumentSubType = "RESIDENCE_PERMIT" + KYCDOCUMENTSUBTYPE_TAX_ID KYCDocumentSubType = "TAX_ID" + KYCDOCUMENTSUBTYPE_STUDENT_ID KYCDocumentSubType = "STUDENT_ID" + KYCDOCUMENTSUBTYPE_MILITARY_ID KYCDocumentSubType = "MILITARY_ID" + KYCDOCUMENTSUBTYPE_MEDICAL_ID KYCDocumentSubType = "MEDICAL_ID" + KYCDOCUMENTSUBTYPE_OTHERS KYCDocumentSubType = "OTHERS" +) + +// All allowed values of KYCDocumentSubType enum +var AllowedKYCDocumentSubTypeEnumValues = []KYCDocumentSubType{ + "NATIONAL_ID", + "CONSULAR_ID", + "VOTER_ID", + "POSTAL_ID", + "RESIDENCE_PERMIT", + "TAX_ID", + "STUDENT_ID", + "MILITARY_ID", + "MEDICAL_ID", + "OTHERS", +} + +func (v *KYCDocumentSubType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := KYCDocumentSubType(value) + for _, existing := range AllowedKYCDocumentSubTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid KYCDocumentSubType", value) +} + +// NewKYCDocumentSubTypeFromValue returns a pointer to a valid KYCDocumentSubType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewKYCDocumentSubTypeFromValue(v string) (*KYCDocumentSubType, error) { + ev := KYCDocumentSubType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for KYCDocumentSubType: valid values are %v", v, AllowedKYCDocumentSubTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v KYCDocumentSubType) IsValid() bool { + for _, existing := range AllowedKYCDocumentSubTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +func (v KYCDocumentSubType) String() string { + return string(v) +} + +// Ptr returns reference to KYCDocumentSubType value +func (v KYCDocumentSubType) Ptr() *KYCDocumentSubType { + return &v +} + +type NullableKYCDocumentSubType struct { + value *KYCDocumentSubType + isSet bool +} + +func (v NullableKYCDocumentSubType) Get() *KYCDocumentSubType { + return v.value +} + +func (v *NullableKYCDocumentSubType) Set(val *KYCDocumentSubType) { + v.value = val + v.isSet = true +} + +func (v NullableKYCDocumentSubType) IsSet() bool { + return v.isSet +} + +func (v *NullableKYCDocumentSubType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKYCDocumentSubType(val *KYCDocumentSubType) *NullableKYCDocumentSubType { + return &NullableKYCDocumentSubType{value: val, isSet: true} +} + +func (v NullableKYCDocumentSubType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKYCDocumentSubType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/customer/model_kyc_document_type.go b/customer/model_kyc_document_type.go new file mode 100644 index 00000000..4715111f --- /dev/null +++ b/customer/model_kyc_document_type.go @@ -0,0 +1,126 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + "fmt" +) + +// KYCDocumentType the model 'KYCDocumentType' +type KYCDocumentType string + +// List of KYCDocumentType +const ( + KYCDOCUMENTTYPE_BIRTH_CERTIFICATE KYCDocumentType = "BIRTH_CERTIFICATE" + KYCDOCUMENTTYPE_BANK_STATEMENT KYCDocumentType = "BANK_STATEMENT" + KYCDOCUMENTTYPE_DRIVING_LICENSE KYCDocumentType = "DRIVING_LICENSE" + KYCDOCUMENTTYPE_IDENTITY_CARD KYCDocumentType = "IDENTITY_CARD" + KYCDOCUMENTTYPE_PASSPORT KYCDocumentType = "PASSPORT" + KYCDOCUMENTTYPE_VISA KYCDocumentType = "VISA" + KYCDOCUMENTTYPE_BUSINESS_REGISTRATION KYCDocumentType = "BUSINESS_REGISTRATION" + KYCDOCUMENTTYPE_BUSINESS_LICENSE KYCDocumentType = "BUSINESS_LICENSE" +) + +// All allowed values of KYCDocumentType enum +var AllowedKYCDocumentTypeEnumValues = []KYCDocumentType{ + "BIRTH_CERTIFICATE", + "BANK_STATEMENT", + "DRIVING_LICENSE", + "IDENTITY_CARD", + "PASSPORT", + "VISA", + "BUSINESS_REGISTRATION", + "BUSINESS_LICENSE", +} + +func (v *KYCDocumentType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := KYCDocumentType(value) + for _, existing := range AllowedKYCDocumentTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid KYCDocumentType", value) +} + +// NewKYCDocumentTypeFromValue returns a pointer to a valid KYCDocumentType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewKYCDocumentTypeFromValue(v string) (*KYCDocumentType, error) { + ev := KYCDocumentType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for KYCDocumentType: valid values are %v", v, AllowedKYCDocumentTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v KYCDocumentType) IsValid() bool { + for _, existing := range AllowedKYCDocumentTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +func (v KYCDocumentType) String() string { + return string(v) +} + +// Ptr returns reference to KYCDocumentType value +func (v KYCDocumentType) Ptr() *KYCDocumentType { + return &v +} + +type NullableKYCDocumentType struct { + value *KYCDocumentType + isSet bool +} + +func (v NullableKYCDocumentType) Get() *KYCDocumentType { + return v.value +} + +func (v *NullableKYCDocumentType) Set(val *KYCDocumentType) { + v.value = val + v.isSet = true +} + +func (v NullableKYCDocumentType) IsSet() bool { + return v.isSet +} + +func (v *NullableKYCDocumentType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKYCDocumentType(val *KYCDocumentType) *NullableKYCDocumentType { + return &NullableKYCDocumentType{value: val, isSet: true} +} + +func (v NullableKYCDocumentType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKYCDocumentType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/customer/model_patch_customer.go b/customer/model_patch_customer.go new file mode 100644 index 00000000..c0e6bddb --- /dev/null +++ b/customer/model_patch_customer.go @@ -0,0 +1,655 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the PatchCustomer type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &PatchCustomer{} + +// PatchCustomer struct for PatchCustomer +type PatchCustomer struct { + // Entity's name for this client + ClientName NullableString `json:"client_name,omitempty"` + // Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. + ReferenceId NullableString `json:"reference_id,omitempty"` + IndividualDetail NullableIndividualDetail `json:"individual_detail,omitempty"` + BusinessDetail NullableBusinessDetail `json:"business_detail,omitempty"` + Description NullableString `json:"description,omitempty"` + Email NullableString `json:"email,omitempty"` + MobileNumber NullableString `json:"mobile_number,omitempty"` + PhoneNumber NullableString `json:"phone_number,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Addresses []AddressRequest `json:"addresses,omitempty"` + IdentityAccounts []IdentityAccountRequest `json:"identity_accounts,omitempty"` + KycDocuments []KYCDocumentRequest `json:"kyc_documents,omitempty"` + Status NullableEndCustomerStatus `json:"status,omitempty"` +} + +// NewPatchCustomer instantiates a new PatchCustomer 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 NewPatchCustomer() *PatchCustomer { + this := PatchCustomer{} + return &this +} + +// NewPatchCustomerWithDefaults instantiates a new PatchCustomer 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 NewPatchCustomerWithDefaults() *PatchCustomer { + this := PatchCustomer{} + return &this +} + +// GetClientName returns the ClientName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetClientName() string { + if o == nil || utils.IsNil(o.ClientName.Get()) { + var ret string + return ret + } + return *o.ClientName.Get() +} + +// GetClientNameOk returns a tuple with the ClientName 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 *PatchCustomer) GetClientNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientName.Get(), o.ClientName.IsSet() +} + +// HasClientName returns a boolean if a field has been set. +func (o *PatchCustomer) HasClientName() bool { + if o != nil && o.ClientName.IsSet() { + return true + } + + return false +} + +// SetClientName gets a reference to the given NullableString and assigns it to the ClientName field. +func (o *PatchCustomer) SetClientName(v string) { + o.ClientName.Set(&v) +} +// SetClientNameNil sets the value for ClientName to be an explicit nil +func (o *PatchCustomer) SetClientNameNil() { + o.ClientName.Set(nil) +} + +// UnsetClientName ensures that no value is present for ClientName, not even an explicit nil +func (o *PatchCustomer) UnsetClientName() { + o.ClientName.Unset() +} + +// GetReferenceId returns the ReferenceId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetReferenceId() string { + if o == nil || utils.IsNil(o.ReferenceId.Get()) { + var ret string + return ret + } + return *o.ReferenceId.Get() +} + +// GetReferenceIdOk returns a tuple with the ReferenceId 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 *PatchCustomer) GetReferenceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ReferenceId.Get(), o.ReferenceId.IsSet() +} + +// HasReferenceId returns a boolean if a field has been set. +func (o *PatchCustomer) HasReferenceId() bool { + if o != nil && o.ReferenceId.IsSet() { + return true + } + + return false +} + +// SetReferenceId gets a reference to the given NullableString and assigns it to the ReferenceId field. +func (o *PatchCustomer) SetReferenceId(v string) { + o.ReferenceId.Set(&v) +} +// SetReferenceIdNil sets the value for ReferenceId to be an explicit nil +func (o *PatchCustomer) SetReferenceIdNil() { + o.ReferenceId.Set(nil) +} + +// UnsetReferenceId ensures that no value is present for ReferenceId, not even an explicit nil +func (o *PatchCustomer) UnsetReferenceId() { + o.ReferenceId.Unset() +} + +// GetIndividualDetail returns the IndividualDetail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetIndividualDetail() IndividualDetail { + if o == nil || utils.IsNil(o.IndividualDetail.Get()) { + var ret IndividualDetail + return ret + } + return *o.IndividualDetail.Get() +} + +// GetIndividualDetailOk returns a tuple with the IndividualDetail 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 *PatchCustomer) GetIndividualDetailOk() (*IndividualDetail, bool) { + if o == nil { + return nil, false + } + return o.IndividualDetail.Get(), o.IndividualDetail.IsSet() +} + +// HasIndividualDetail returns a boolean if a field has been set. +func (o *PatchCustomer) HasIndividualDetail() bool { + if o != nil && o.IndividualDetail.IsSet() { + return true + } + + return false +} + +// SetIndividualDetail gets a reference to the given NullableIndividualDetail and assigns it to the IndividualDetail field. +func (o *PatchCustomer) SetIndividualDetail(v IndividualDetail) { + o.IndividualDetail.Set(&v) +} +// SetIndividualDetailNil sets the value for IndividualDetail to be an explicit nil +func (o *PatchCustomer) SetIndividualDetailNil() { + o.IndividualDetail.Set(nil) +} + +// UnsetIndividualDetail ensures that no value is present for IndividualDetail, not even an explicit nil +func (o *PatchCustomer) UnsetIndividualDetail() { + o.IndividualDetail.Unset() +} + +// GetBusinessDetail returns the BusinessDetail field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetBusinessDetail() BusinessDetail { + if o == nil || utils.IsNil(o.BusinessDetail.Get()) { + var ret BusinessDetail + return ret + } + return *o.BusinessDetail.Get() +} + +// GetBusinessDetailOk returns a tuple with the BusinessDetail 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 *PatchCustomer) GetBusinessDetailOk() (*BusinessDetail, bool) { + if o == nil { + return nil, false + } + return o.BusinessDetail.Get(), o.BusinessDetail.IsSet() +} + +// HasBusinessDetail returns a boolean if a field has been set. +func (o *PatchCustomer) HasBusinessDetail() bool { + if o != nil && o.BusinessDetail.IsSet() { + return true + } + + return false +} + +// SetBusinessDetail gets a reference to the given NullableBusinessDetail and assigns it to the BusinessDetail field. +func (o *PatchCustomer) SetBusinessDetail(v BusinessDetail) { + o.BusinessDetail.Set(&v) +} +// SetBusinessDetailNil sets the value for BusinessDetail to be an explicit nil +func (o *PatchCustomer) SetBusinessDetailNil() { + o.BusinessDetail.Set(nil) +} + +// UnsetBusinessDetail ensures that no value is present for BusinessDetail, not even an explicit nil +func (o *PatchCustomer) UnsetBusinessDetail() { + o.BusinessDetail.Unset() +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetDescription() string { + if o == nil || utils.IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description 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 *PatchCustomer) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchCustomer) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchCustomer) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchCustomer) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchCustomer) UnsetDescription() { + o.Description.Unset() +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetEmail() string { + if o == nil || utils.IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email 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 *PatchCustomer) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *PatchCustomer) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *PatchCustomer) SetEmail(v string) { + o.Email.Set(&v) +} +// SetEmailNil sets the value for Email to be an explicit nil +func (o *PatchCustomer) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *PatchCustomer) UnsetEmail() { + o.Email.Unset() +} + +// GetMobileNumber returns the MobileNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetMobileNumber() string { + if o == nil || utils.IsNil(o.MobileNumber.Get()) { + var ret string + return ret + } + return *o.MobileNumber.Get() +} + +// GetMobileNumberOk returns a tuple with the MobileNumber 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 *PatchCustomer) GetMobileNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MobileNumber.Get(), o.MobileNumber.IsSet() +} + +// HasMobileNumber returns a boolean if a field has been set. +func (o *PatchCustomer) HasMobileNumber() bool { + if o != nil && o.MobileNumber.IsSet() { + return true + } + + return false +} + +// SetMobileNumber gets a reference to the given NullableString and assigns it to the MobileNumber field. +func (o *PatchCustomer) SetMobileNumber(v string) { + o.MobileNumber.Set(&v) +} +// SetMobileNumberNil sets the value for MobileNumber to be an explicit nil +func (o *PatchCustomer) SetMobileNumberNil() { + o.MobileNumber.Set(nil) +} + +// UnsetMobileNumber ensures that no value is present for MobileNumber, not even an explicit nil +func (o *PatchCustomer) UnsetMobileNumber() { + o.MobileNumber.Unset() +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetPhoneNumber() string { + if o == nil || utils.IsNil(o.PhoneNumber.Get()) { + var ret string + return ret + } + return *o.PhoneNumber.Get() +} + +// GetPhoneNumberOk returns a tuple with the PhoneNumber 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 *PatchCustomer) GetPhoneNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PhoneNumber.Get(), o.PhoneNumber.IsSet() +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *PatchCustomer) HasPhoneNumber() bool { + if o != nil && o.PhoneNumber.IsSet() { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given NullableString and assigns it to the PhoneNumber field. +func (o *PatchCustomer) SetPhoneNumber(v string) { + o.PhoneNumber.Set(&v) +} +// SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil +func (o *PatchCustomer) SetPhoneNumberNil() { + o.PhoneNumber.Set(nil) +} + +// UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +func (o *PatchCustomer) UnsetPhoneNumber() { + o.PhoneNumber.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata 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 *PatchCustomer) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *PatchCustomer) HasMetadata() bool { + if o != nil && utils.IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *PatchCustomer) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetAddresses returns the Addresses field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetAddresses() []AddressRequest { + if o == nil { + var ret []AddressRequest + return ret + } + return o.Addresses +} + +// GetAddressesOk returns a tuple with the Addresses 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 *PatchCustomer) GetAddressesOk() ([]AddressRequest, bool) { + if o == nil || utils.IsNil(o.Addresses) { + return nil, false + } + return o.Addresses, true +} + +// HasAddresses returns a boolean if a field has been set. +func (o *PatchCustomer) HasAddresses() bool { + if o != nil && utils.IsNil(o.Addresses) { + return true + } + + return false +} + +// SetAddresses gets a reference to the given []AddressRequest and assigns it to the Addresses field. +func (o *PatchCustomer) SetAddresses(v []AddressRequest) { + o.Addresses = v +} + +// GetIdentityAccounts returns the IdentityAccounts field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetIdentityAccounts() []IdentityAccountRequest { + if o == nil { + var ret []IdentityAccountRequest + return ret + } + return o.IdentityAccounts +} + +// GetIdentityAccountsOk returns a tuple with the IdentityAccounts 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 *PatchCustomer) GetIdentityAccountsOk() ([]IdentityAccountRequest, bool) { + if o == nil || utils.IsNil(o.IdentityAccounts) { + return nil, false + } + return o.IdentityAccounts, true +} + +// HasIdentityAccounts returns a boolean if a field has been set. +func (o *PatchCustomer) HasIdentityAccounts() bool { + if o != nil && utils.IsNil(o.IdentityAccounts) { + return true + } + + return false +} + +// SetIdentityAccounts gets a reference to the given []IdentityAccountRequest and assigns it to the IdentityAccounts field. +func (o *PatchCustomer) SetIdentityAccounts(v []IdentityAccountRequest) { + o.IdentityAccounts = v +} + +// GetKycDocuments returns the KycDocuments field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetKycDocuments() []KYCDocumentRequest { + if o == nil { + var ret []KYCDocumentRequest + return ret + } + return o.KycDocuments +} + +// GetKycDocumentsOk returns a tuple with the KycDocuments 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 *PatchCustomer) GetKycDocumentsOk() ([]KYCDocumentRequest, bool) { + if o == nil || utils.IsNil(o.KycDocuments) { + return nil, false + } + return o.KycDocuments, true +} + +// HasKycDocuments returns a boolean if a field has been set. +func (o *PatchCustomer) HasKycDocuments() bool { + if o != nil && utils.IsNil(o.KycDocuments) { + return true + } + + return false +} + +// SetKycDocuments gets a reference to the given []KYCDocumentRequest and assigns it to the KycDocuments field. +func (o *PatchCustomer) SetKycDocuments(v []KYCDocumentRequest) { + o.KycDocuments = v +} + +// GetStatus returns the Status field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchCustomer) GetStatus() EndCustomerStatus { + if o == nil || utils.IsNil(o.Status.Get()) { + var ret EndCustomerStatus + return ret + } + return *o.Status.Get() +} + +// GetStatusOk returns a tuple with the Status 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 *PatchCustomer) GetStatusOk() (*EndCustomerStatus, bool) { + if o == nil { + return nil, false + } + return o.Status.Get(), o.Status.IsSet() +} + +// HasStatus returns a boolean if a field has been set. +func (o *PatchCustomer) HasStatus() bool { + if o != nil && o.Status.IsSet() { + return true + } + + return false +} + +// SetStatus gets a reference to the given NullableEndCustomerStatus and assigns it to the Status field. +func (o *PatchCustomer) SetStatus(v EndCustomerStatus) { + o.Status.Set(&v) +} +// SetStatusNil sets the value for Status to be an explicit nil +func (o *PatchCustomer) SetStatusNil() { + o.Status.Set(nil) +} + +// UnsetStatus ensures that no value is present for Status, not even an explicit nil +func (o *PatchCustomer) UnsetStatus() { + o.Status.Unset() +} + +func (o PatchCustomer) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchCustomer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ClientName.IsSet() { + toSerialize["client_name"] = o.ClientName.Get() + } + if o.ReferenceId.IsSet() { + toSerialize["reference_id"] = o.ReferenceId.Get() + } + if o.IndividualDetail.IsSet() { + toSerialize["individual_detail"] = o.IndividualDetail.Get() + } + if o.BusinessDetail.IsSet() { + toSerialize["business_detail"] = o.BusinessDetail.Get() + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if o.MobileNumber.IsSet() { + toSerialize["mobile_number"] = o.MobileNumber.Get() + } + if o.PhoneNumber.IsSet() { + toSerialize["phone_number"] = o.PhoneNumber.Get() + } + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if o.Addresses != nil { + toSerialize["addresses"] = o.Addresses + } + if o.IdentityAccounts != nil { + toSerialize["identity_accounts"] = o.IdentityAccounts + } + if o.KycDocuments != nil { + toSerialize["kyc_documents"] = o.KycDocuments + } + if o.Status.IsSet() { + toSerialize["status"] = o.Status.Get() + } + return toSerialize, nil +} + +type NullablePatchCustomer struct { + value *PatchCustomer + isSet bool +} + +func (v NullablePatchCustomer) Get() *PatchCustomer { + return v.value +} + +func (v *NullablePatchCustomer) Set(val *PatchCustomer) { + v.value = val + v.isSet = true +} + +func (v NullablePatchCustomer) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchCustomer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchCustomer(val *PatchCustomer) *NullablePatchCustomer { + return &NullablePatchCustomer{value: val, isSet: true} +} + +func (v NullablePatchCustomer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchCustomer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_response_data_not_found.go b/customer/model_response_data_not_found.go new file mode 100644 index 00000000..133a3698 --- /dev/null +++ b/customer/model_response_data_not_found.go @@ -0,0 +1,164 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the ResponseDataNotFound type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &ResponseDataNotFound{} + +// ResponseDataNotFound struct for ResponseDataNotFound +type ResponseDataNotFound struct { + ErrorCode *string `json:"error_code,omitempty"` + Message interface{} `json:"message,omitempty"` +} + +// NewResponseDataNotFound instantiates a new ResponseDataNotFound 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 NewResponseDataNotFound() *ResponseDataNotFound { + this := ResponseDataNotFound{} + return &this +} + +// NewResponseDataNotFoundWithDefaults instantiates a new ResponseDataNotFound 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 NewResponseDataNotFoundWithDefaults() *ResponseDataNotFound { + this := ResponseDataNotFound{} + return &this +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *ResponseDataNotFound) GetErrorCode() string { + if o == nil || utils.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDataNotFound) GetErrorCodeOk() (*string, bool) { + if o == nil || utils.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *ResponseDataNotFound) HasErrorCode() bool { + if o != nil && !utils.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *ResponseDataNotFound) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResponseDataNotFound) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message 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 *ResponseDataNotFound) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ResponseDataNotFound) HasMessage() bool { + if o != nil && utils.IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given interface{} and assigns it to the Message field. +func (o *ResponseDataNotFound) SetMessage(v interface{}) { + o.Message = v +} + +func (o ResponseDataNotFound) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDataNotFound) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.ErrorCode) { + toSerialize["error_code"] = o.ErrorCode + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableResponseDataNotFound struct { + value *ResponseDataNotFound + isSet bool +} + +func (v NullableResponseDataNotFound) Get() *ResponseDataNotFound { + return v.value +} + +func (v *NullableResponseDataNotFound) Set(val *ResponseDataNotFound) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDataNotFound) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDataNotFound) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDataNotFound(val *ResponseDataNotFound) *NullableResponseDataNotFound { + return &NullableResponseDataNotFound{value: val, isSet: true} +} + +func (v NullableResponseDataNotFound) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDataNotFound) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_update_customer_400_response.go b/customer/model_update_customer_400_response.go new file mode 100644 index 00000000..25302d54 --- /dev/null +++ b/customer/model_update_customer_400_response.go @@ -0,0 +1,189 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the UpdateCustomer400Response type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &UpdateCustomer400Response{} + +// UpdateCustomer400Response struct for UpdateCustomer400Response +type UpdateCustomer400Response struct { + ErrorCode string `json:"error_code"` + Message interface{} `json:"message"` + Errors []map[string]interface{} `json:"errors,omitempty"` +} + +// NewUpdateCustomer400Response instantiates a new UpdateCustomer400Response 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 NewUpdateCustomer400Response(errorCode string, message interface{}) *UpdateCustomer400Response { + this := UpdateCustomer400Response{} + this.ErrorCode = errorCode + this.Message = message + return &this +} + +// NewUpdateCustomer400ResponseWithDefaults instantiates a new UpdateCustomer400Response 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 NewUpdateCustomer400ResponseWithDefaults() *UpdateCustomer400Response { + this := UpdateCustomer400Response{} + return &this +} + +// GetErrorCode returns the ErrorCode field value +func (o *UpdateCustomer400Response) GetErrorCode() string { + if o == nil { + var ret string + return ret + } + + return o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value +// and a boolean to check if the value has been set. +func (o *UpdateCustomer400Response) GetErrorCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ErrorCode, true +} + +// SetErrorCode sets field value +func (o *UpdateCustomer400Response) SetErrorCode(v string) { + o.ErrorCode = v +} + +// GetMessage returns the Message field value +// If the value is explicit nil, the zero value for interface{} will be returned +func (o *UpdateCustomer400Response) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// 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 *UpdateCustomer400Response) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *UpdateCustomer400Response) SetMessage(v interface{}) { + o.Message = v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *UpdateCustomer400Response) GetErrors() []map[string]interface{} { + if o == nil || utils.IsNil(o.Errors) { + var ret []map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCustomer400Response) GetErrorsOk() ([]map[string]interface{}, bool) { + if o == nil || utils.IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *UpdateCustomer400Response) HasErrors() bool { + if o != nil && !utils.IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field. +func (o *UpdateCustomer400Response) SetErrors(v []map[string]interface{}) { + o.Errors = v +} + +func (o UpdateCustomer400Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateCustomer400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "ENTITY_NOT_FOUND_ERROR" && o.ErrorCode != "CLIENT_NOT_FOUND_ERROR" && o.ErrorCode != "END_CUSTOMER_NOT_FOUND_ERROR" && o.ErrorCode != "DUPLICATE_END_CUSTOMER_ERROR" && o.ErrorCode != "API_VALIDATION_ERROR" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of ENTITY_NOT_FOUND_ERROR, CLIENT_NOT_FOUND_ERROR, END_CUSTOMER_NOT_FOUND_ERROR, DUPLICATE_END_CUSTOMER_ERROR, API_VALIDATION_ERROR") + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if !utils.IsNil(o.Errors) { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +type NullableUpdateCustomer400Response struct { + value *UpdateCustomer400Response + isSet bool +} + +func (v NullableUpdateCustomer400Response) Get() *UpdateCustomer400Response { + return v.value +} + +func (v *NullableUpdateCustomer400Response) Set(val *UpdateCustomer400Response) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCustomer400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCustomer400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCustomer400Response(val *UpdateCustomer400Response) *NullableUpdateCustomer400Response { + return &NullableUpdateCustomer400Response{value: val, isSet: true} +} + +func (v NullableUpdateCustomer400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCustomer400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/model_update_customer_400_response_all_of.go b/customer/model_update_customer_400_response_all_of.go new file mode 100644 index 00000000..7409bff2 --- /dev/null +++ b/customer/model_update_customer_400_response_all_of.go @@ -0,0 +1,164 @@ +/* +XENDIT SDK openapi spec + +XENDIT SDK openapi spec + +API version: 1.0.0 +*/ + + +package customer + +import ( + "encoding/json" + + utils "github.com/xendit/xendit-go/v3/utils" +) + +// checks if the UpdateCustomer400ResponseAllOf type satisfies the MappedNullable interface at compile time +var _ utils.MappedNullable = &UpdateCustomer400ResponseAllOf{} + +// UpdateCustomer400ResponseAllOf struct for UpdateCustomer400ResponseAllOf +type UpdateCustomer400ResponseAllOf struct { + ErrorCode *string `json:"error_code,omitempty"` + Message interface{} `json:"message,omitempty"` +} + +// NewUpdateCustomer400ResponseAllOf instantiates a new UpdateCustomer400ResponseAllOf 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 NewUpdateCustomer400ResponseAllOf() *UpdateCustomer400ResponseAllOf { + this := UpdateCustomer400ResponseAllOf{} + return &this +} + +// NewUpdateCustomer400ResponseAllOfWithDefaults instantiates a new UpdateCustomer400ResponseAllOf 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 NewUpdateCustomer400ResponseAllOfWithDefaults() *UpdateCustomer400ResponseAllOf { + this := UpdateCustomer400ResponseAllOf{} + return &this +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *UpdateCustomer400ResponseAllOf) GetErrorCode() string { + if o == nil || utils.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCustomer400ResponseAllOf) GetErrorCodeOk() (*string, bool) { + if o == nil || utils.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *UpdateCustomer400ResponseAllOf) HasErrorCode() bool { + if o != nil && !utils.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *UpdateCustomer400ResponseAllOf) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateCustomer400ResponseAllOf) GetMessage() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message 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 *UpdateCustomer400ResponseAllOf) GetMessageOk() (*interface{}, bool) { + if o == nil || utils.IsNil(o.Message) { + return nil, false + } + return &o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *UpdateCustomer400ResponseAllOf) HasMessage() bool { + if o != nil && utils.IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given interface{} and assigns it to the Message field. +func (o *UpdateCustomer400ResponseAllOf) SetMessage(v interface{}) { + o.Message = v +} + +func (o UpdateCustomer400ResponseAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateCustomer400ResponseAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !utils.IsNil(o.ErrorCode) { + toSerialize["error_code"] = o.ErrorCode + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableUpdateCustomer400ResponseAllOf struct { + value *UpdateCustomer400ResponseAllOf + isSet bool +} + +func (v NullableUpdateCustomer400ResponseAllOf) Get() *UpdateCustomer400ResponseAllOf { + return v.value +} + +func (v *NullableUpdateCustomer400ResponseAllOf) Set(val *UpdateCustomer400ResponseAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateCustomer400ResponseAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateCustomer400ResponseAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateCustomer400ResponseAllOf(val *UpdateCustomer400ResponseAllOf) *NullableUpdateCustomer400ResponseAllOf { + return &NullableUpdateCustomer400ResponseAllOf{value: val, isSet: true} +} + +func (v NullableUpdateCustomer400ResponseAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateCustomer400ResponseAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/customer/nullable.go b/customer/nullable.go new file mode 100644 index 00000000..5a60c04a --- /dev/null +++ b/customer/nullable.go @@ -0,0 +1,300 @@ +package customer + +import ( + "encoding/json" + "time" +) + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} \ No newline at end of file diff --git a/docs/CustomerApi.md b/docs/CustomerApi.md new file mode 100644 index 00000000..9ae9c544 --- /dev/null +++ b/docs/CustomerApi.md @@ -0,0 +1,324 @@ +# xendit\CustomerApi + +All URIs are relative to *https://api.xendit.co* + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**CreateCustomer**](CustomerApi.md#CreateCustomer) | **Post** /customers | Create Customer | +| [**GetCustomer**](CustomerApi.md#GetCustomer) | **Get** /customers/{id} | Get Customer By ID | +| [**GetCustomerByReferenceID**](CustomerApi.md#GetCustomerByReferenceID) | **Get** /customers | GET customers by reference id | +| [**UpdateCustomer**](CustomerApi.md#UpdateCustomer) | **Patch** /customers/{id} | Update End Customer Resource | + + + +## CreateCustomer + +Create Customer + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + xendit "github.com/xendit/xendit-go/v3" + customer "github.com/xendit/xendit-go/v3/customer" +) + +func main() { + + // A unique key to prevent processing duplicate requests. + iDEMPOTENCYKEY := "idempotency-123" // [OPTIONAL] | string + + // The sub-account user-id that you want to make this transaction for. + forUserId := "user-1" // [OPTIONAL] | string + + // Request object for end customer object + customerRequest := *customer.NewCustomerRequest("ReferenceId_example") // [OPTIONAL] | CustomerRequest + + xenditClient := xendit.NewClient("API-KEY") + + resp, r, err := xenditClient.CustomerApi.CreateCustomer(context.Background()). + IDEMPOTENCYKEY(iDEMPOTENCYKEY). + ForUserId(forUserId). + CustomerRequest(customerRequest). // [OPTIONAL] + Execute() + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomerApi.CreateCustomer``: %v\n", err.Error()) + + b, _ := json.Marshal(err.FullError()) + fmt.Fprintf(os.Stderr, "Full Error Struct: %v\n", string(b)) + + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCustomer`: Customer + fmt.Fprintf(os.Stdout, "Response from `CustomerApi.CreateCustomer`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCustomerRequest struct via the builder pattern + + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **iDEMPOTENCYKEY** |**string**| A unique key to prevent processing duplicate requests. | | +| **forUserId** |**string**| The sub-account user-id that you want to make this transaction for. | | +| **customerRequest** |[**CustomerRequest**](customer/CustomerRequest.md)| Request object for end customer object | | + +### Return type + +[**Customer**](customer/Customer.md) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) +[[Back to README]](../README.md) + + +## GetCustomer + +Get Customer By ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + xendit "github.com/xendit/xendit-go/v3" + customer "github.com/xendit/xendit-go/v3/customer" +) + +func main() { + + // End customer resource id + id := "d290f1ee-6c54-4b01-90e6-d701748f0851" // [REQUIRED] | string + + // The sub-account user-id that you want to make this transaction for. + forUserId := "user-1" // [OPTIONAL] | string + + xenditClient := xendit.NewClient("API-KEY") + + resp, r, err := xenditClient.CustomerApi.GetCustomer(context.Background(), id). + ForUserId(forUserId). // [OPTIONAL] + Execute() + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomerApi.GetCustomer``: %v\n", err.Error()) + + b, _ := json.Marshal(err.FullError()) + fmt.Fprintf(os.Stderr, "Full Error Struct: %v\n", string(b)) + + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetCustomer`: Customer + fmt.Fprintf(os.Stdout, "Response from `CustomerApi.GetCustomer`: %v\n", resp) +} +``` + +### Path Parameters + + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | -------------| +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| | +| **id** | **string** | End customer resource id | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCustomerRequest struct via the builder pattern + + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| +| **forUserId** |**string**| The sub-account user-id that you want to make this transaction for. | | + +### Return type + +[**Customer**](customer/Customer.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) +[[Back to README]](../README.md) + + +## GetCustomerByReferenceID + +GET customers by reference id + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + xendit "github.com/xendit/xendit-go/v3" + customer "github.com/xendit/xendit-go/v3/customer" +) + +func main() { + + // Merchant's reference of end customer + referenceId := "referenceId_example" // [REQUIRED] | string + + // The sub-account user-id that you want to make this transaction for. + forUserId := "user-1" // [OPTIONAL] | string + + xenditClient := xendit.NewClient("API-KEY") + + resp, r, err := xenditClient.CustomerApi.GetCustomerByReferenceID(context.Background()). + ReferenceId(referenceId). + ForUserId(forUserId). // [OPTIONAL] + Execute() + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomerApi.GetCustomerByReferenceID``: %v\n", err.Error()) + + b, _ := json.Marshal(err.FullError()) + fmt.Fprintf(os.Stderr, "Full Error Struct: %v\n", string(b)) + + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetCustomerByReferenceID`: GetCustomerByReferenceID200Response + fmt.Fprintf(os.Stdout, "Response from `CustomerApi.GetCustomerByReferenceID`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCustomerByReferenceIDRequest struct via the builder pattern + + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **referenceId** |**string**| Merchant's reference of end customer | | +| **forUserId** |**string**| The sub-account user-id that you want to make this transaction for. | | + +### Return type + +[**GetCustomerByReferenceID200Response**](customer/GetCustomerByReferenceID200Response.md) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) +[[Back to README]](../README.md) + + +## UpdateCustomer + +Update End Customer Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + xendit "github.com/xendit/xendit-go/v3" + customer "github.com/xendit/xendit-go/v3/customer" +) + +func main() { + + // End customer resource id + id := "d290f1ee-6c54-4b01-90e6-d701748f0851" // [REQUIRED] | string + + // The sub-account user-id that you want to make this transaction for. + forUserId := "user-1" // [OPTIONAL] | string + + // Update Request for end customer object + patchCustomer := *customer.NewPatchCustomer() // [OPTIONAL] | PatchCustomer + + xenditClient := xendit.NewClient("API-KEY") + + resp, r, err := xenditClient.CustomerApi.UpdateCustomer(context.Background(), id). + ForUserId(forUserId). + PatchCustomer(patchCustomer). // [OPTIONAL] + Execute() + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomerApi.UpdateCustomer``: %v\n", err.Error()) + + b, _ := json.Marshal(err.FullError()) + fmt.Fprintf(os.Stderr, "Full Error Struct: %v\n", string(b)) + + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCustomer`: Customer + fmt.Fprintf(os.Stdout, "Response from `CustomerApi.UpdateCustomer`: %v\n", resp) +} +``` + +### Path Parameters + + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | -------------| +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| | +| **id** | **string** | End customer resource id | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateCustomerRequest struct via the builder pattern + + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| +| **forUserId** |**string**| The sub-account user-id that you want to make this transaction for. | | +| **patchCustomer** |[**PatchCustomer**](customer/PatchCustomer.md)| Update Request for end customer object | | + +### Return type + +[**Customer**](customer/Customer.md) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) +[[Back to README]](../README.md) + diff --git a/docs/PaymentMethodApi.md b/docs/PaymentMethodApi.md index a273ce3c..c9bd8c3b 100644 --- a/docs/PaymentMethodApi.md +++ b/docs/PaymentMethodApi.md @@ -7,7 +7,6 @@ All URIs are relative to *https://api.xendit.co* | [**AuthPaymentMethod**](PaymentMethodApi.md#AuthPaymentMethod) | **Post** /v2/payment_methods/{paymentMethodId}/auth | Validate a payment method's linking OTP | | [**CreatePaymentMethod**](PaymentMethodApi.md#CreatePaymentMethod) | **Post** /v2/payment_methods | Creates payment method | | [**ExpirePaymentMethod**](PaymentMethodApi.md#ExpirePaymentMethod) | **Post** /v2/payment_methods/{paymentMethodId}/expire | Expires a payment method | -| [**GetAllPaymentChannels**](PaymentMethodApi.md#GetAllPaymentChannels) | **Get** /v2/payment_methods/channels | Get all payment channels | | [**GetAllPaymentMethods**](PaymentMethodApi.md#GetAllPaymentMethods) | **Get** /v2/payment_methods | Get all payment methods by filters | | [**GetPaymentMethodByID**](PaymentMethodApi.md#GetPaymentMethodByID) | **Get** /v2/payment_methods/{paymentMethodId} | Get payment method by ID | | [**GetPaymentsByPaymentMethodId**](PaymentMethodApi.md#GetPaymentsByPaymentMethodId) | **Get** /v2/payment_methods/{paymentMethodId}/payments | Returns payments with matching PaymentMethodID. | @@ -234,79 +233,6 @@ Other parameters are passed through a pointer to a apiExpirePaymentMethodRequest [[Back to README]](../README.md) -## GetAllPaymentChannels - -Get all payment channels - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - xendit "github.com/xendit/xendit-go/v3" - payment_method "github.com/xendit/xendit-go/v3/payment_method" -) - -func main() { - - // (default to true) - isActivated := true // [OPTIONAL] | bool - - type_ := "DIRECT_DEBIT" // [OPTIONAL] | string - - xenditClient := xendit.NewClient("API-KEY") - - resp, r, err := xenditClient.PaymentMethodApi.GetAllPaymentChannels(context.Background()). - IsActivated(isActivated). - Type_(type_). // [OPTIONAL] - Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodApi.GetAllPaymentChannels``: %v\n", err.Error()) - - b, _ := json.Marshal(err.FullError()) - fmt.Fprintf(os.Stderr, "Full Error Struct: %v\n", string(b)) - - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAllPaymentChannels`: PaymentChannelList - fmt.Fprintf(os.Stdout, "Response from `PaymentMethodApi.GetAllPaymentChannels`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAllPaymentChannelsRequest struct via the builder pattern - - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **isActivated** |**bool**| | [default to true] | -| **type_** |**string**| | | - -### Return type - -[**PaymentChannelList**](payment_method/PaymentChannelList.md) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) -[[Back to README]](../README.md) - - ## GetAllPaymentMethods Get all payment methods by filters diff --git a/docs/balance_and_transaction.yaml b/docs/balance_and_transaction.yaml index 08feb4de..a47247e7 100644 --- a/docs/balance_and_transaction.yaml +++ b/docs/balance_and_transaction.yaml @@ -118,7 +118,7 @@ info: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: Transaction Service V4 API - version: 3.4.2 + version: 3.4.3 x-logo: url: https://dashboard.xendit.co/assets/images/xendit-blue-logo.svg servers: diff --git a/docs/customer.yaml b/docs/customer.yaml new file mode 100644 index 00000000..b4703f39 --- /dev/null +++ b/docs/customer.yaml @@ -0,0 +1,1555 @@ +openapi: 3.0.2 +info: + contact: + name: '#data-product-dev' + url: https://xendit.slack.com/archives/CA97LL668 + description: XENDIT SDK openapi spec + license: + name: No License + url: https://choosealicense.com/no-permission/ + title: XENDIT SDK openapi spec + version: 1.0.0 +servers: +- description: Xendit API Server + url: https://api.xendit.co +paths: + /customers: + get: + description: "Retrieves an array with a customer object that matches the provided\ + \ reference_id - the identifier provided by you For detail explanations, see\ + \ this link: https://developers.xendit.co/api-reference/#get-customer-by-reference-id" + operationId: getCustomerByReferenceID + parameters: + - description: Merchant's reference of end customer + explode: true + in: query + name: reference_id + required: true + schema: + maxLength: 255 + type: string + style: form + - description: The sub-account user-id that you want to make this transaction + for. + explode: false + in: header + name: for-user-id + required: false + schema: + example: user-1 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getCustomerByReferenceID_200_response' + description: End Customers + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/getCustomerByReferenceID_400_response' + description: Various errors + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Error + summary: GET customers by reference id + tags: + - customer + post: + description: "Function to create a customer that you may use in your Invoice\ + \ or Payment Requests. For detail explanations, see this link: https://developers.xendit.co/api-reference/#create-customer" + operationId: createCustomer + parameters: + - description: A unique key to prevent processing duplicate requests. + explode: false + in: header + name: IDEMPOTENCY-KEY + required: false + schema: + example: idempotency-123 + type: string + style: simple + - description: The sub-account user-id that you want to make this transaction + for. + explode: false + in: header + name: for-user-id + required: false + schema: + example: user-1 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerRequest' + description: Request object for end customer object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + description: Created End Customer + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/createCustomer_400_response' + description: Various errors + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Error + summary: Create Customer + tags: + - customer + /customers/{id}: + get: + description: "Retrieves a single customer object For detail explanations, see\ + \ this link: https://developers.xendit.co/api-reference/#get-customer" + operationId: getCustomer + parameters: + - description: End customer resource id + explode: false + in: path + name: id + required: true + schema: + example: d290f1ee-6c54-4b01-90e6-d701748f0851 + format: uuid + type: string + style: simple + - description: The sub-account user-id that you want to make this transaction + for. + explode: false + in: header + name: for-user-id + required: false + schema: + example: user-1 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + description: End Customer Resource + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/getCustomerByReferenceID_400_response' + description: Various errors + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseDataNotFound' + description: Customer not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Error + summary: Get Customer By ID + tags: + - customer + patch: + description: "Function to update an existing customer. For a detailed explanation\ + \ For detail explanations, see this link: https://developers.xendit.co/api-reference/#update-customer" + operationId: updateCustomer + parameters: + - description: End customer resource id + explode: false + in: path + name: id + required: true + schema: + example: d290f1ee-6c54-4b01-90e6-d701748f0851 + format: uuid + type: string + style: simple + - description: The sub-account user-id that you want to make this transaction + for. + explode: false + in: header + name: for-user-id + required: false + schema: + example: user-1 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchCustomer' + description: Update Request for end customer object + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' + description: Updated End Customer + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/updateCustomer_400_response' + description: Various errors + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Error + summary: Update End Customer Resource + tags: + - customer +components: + schemas: + Error: + properties: + error_code: + example: SERVER_ERROR + type: string + message: + example: "Something unexpected happened, we are investigating this issue\ + \ right now" + type: string + errors: + items: + type: object + type: array + required: + - error_code + - message + type: object + CountryCode: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + EmploymentDetail: + example: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + nullable: true + properties: + employer_name: + description: Name of employer + nullable: true + type: string + nature_of_business: + description: Industry or nature of business + nullable: true + type: string + role_description: + description: Occupation or title + nullable: true + type: string + type: object + IndividualDetail: + example: + place_of_birth: place_of_birth + gender: MALE + nationality: ID + surname: surname + date_of_birth: 2017-07-21 + surname_non_roman: surname_non_roman + employment: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + given_names: given_names + given_names_non_roman: given_names_non_roman + middle_name: middle_name + mother_maiden_name: mother_maiden_name + nullable: true + properties: + given_names: + maxLength: 255 + type: string + given_names_non_roman: + maxLength: 255 + nullable: true + type: string + middle_name: + maxLength: 255 + nullable: true + type: string + surname: + maxLength: 255 + nullable: true + type: string + surname_non_roman: + maxLength: 255 + nullable: true + type: string + mother_maiden_name: + maxLength: 255 + nullable: true + type: string + gender: + enum: + - MALE + - FEMALE + - OTHER + nullable: true + type: string + date_of_birth: + example: 2017-07-21 + maxLength: 30 + nullable: true + type: string + nationality: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + place_of_birth: + maxLength: 255 + nullable: true + type: string + employment: + $ref: '#/components/schemas/EmploymentDetail' + type: object + BusinessDetail: + example: + business_name: business_name + nature_of_business: nature_of_business + business_type: CORPORATION + date_of_registration: 2017-07-21 + business_domicile: ID + nullable: true + properties: + business_name: + maxLength: 255 + type: string + business_type: + enum: + - CORPORATION + - SOLE_PROPRIETOR + - PARTNERSHIP + - COOPERATIVE + - TRUST + - NON_PROFIT + - GOVERNMENT + nullable: true + type: string + date_of_registration: + example: 2017-07-21 + maxLength: 10 + nullable: true + type: string + nature_of_business: + maxLength: 255 + nullable: true + type: string + business_domicile: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + type: object + AddressStatus: + enum: + - ACTIVE + - DELETED + nullable: true + type: string + Address: + example: + country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + properties: + id: + example: d290f1ee-6c54-4b01-90e6-d701748f0851 + format: uuid + type: string + category: + maxLength: 255 + nullable: true + type: string + country: + allOf: + - $ref: '#/components/schemas/CountryCode' + - nullable: true + province_state: + nullable: true + type: string + city: + nullable: true + type: string + postal_code: + nullable: true + type: string + street_line1: + nullable: true + type: string + street_line2: + nullable: true + type: string + status: + $ref: '#/components/schemas/AddressStatus' + is_primary: + nullable: true + type: boolean + meta: + nullable: true + type: object + created: + example: 2016-08-29T09:12:33.001Z + format: date-time + type: string + updated: + example: 2016-08-29T09:12:33.001Z + format: date-time + type: string + required: + - category + - city + - country + - is_primary + - postal_code + - province_state + - street_line1 + - street_line2 + type: object + Currency: + description: "Primary currency of the account, if relevant. ISO 4217 Currency\ + \ Code" + example: IDR + type: string + AccountBank: + properties: + account_number: + description: Unique account identifier as per the bank records. + type: string + account_holder_name: + description: Name of account holder as per the bank records. Needs to match + the registered account name exactly. . + nullable: true + type: string + swift_code: + description: The SWIFT code for international payments + nullable: true + type: string + account_type: + description: "Free text account type, e.g., Savings, Transaction, Virtual\ + \ Account." + nullable: true + type: string + account_details: + description: "Potentially masked account detail, for display purposes only." + nullable: true + type: string + currency: + allOf: + - $ref: '#/components/schemas/Currency' + - nullable: true + type: object + AccountEwallet: + properties: + account_number: + description: Unique account identifier as per the bank records. + type: string + account_holder_name: + description: Name of account holder as per the bank records. Needs to match + the registered account name exactly. + nullable: true + type: string + currency: + allOf: + - $ref: '#/components/schemas/Currency' + - nullable: true + type: object + AccountCard: + properties: + token_id: + description: The token id returned in tokenisation + type: string + type: object + AccountOTC: + properties: + payment_code: + description: Complete fixed payment code (including prefix) + type: string + expires_at: + description: YYYY-MM-DD string with expiry date for the payment code + nullable: true + type: string + type: object + AccountQRCode: + properties: + qr_string: + description: String representation of the QR Code image + type: string + type: object + AccountPayLater: + properties: + account_id: + description: Alphanumeric string identifying this account. Usually an email + address or phone number. + type: string + account_holder_name: + description: Name of account holder as per the cardless credit account. + nullable: true + type: string + currency: + allOf: + - $ref: '#/components/schemas/Currency' + - nullable: true + type: object + IdentityAccountResponse: + example: + country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + properties: + id: + example: d290f1ee-6c54-4b01-90e6-d701748f0851 + format: uuid + type: string + code: + nullable: true + type: string + company: + nullable: true + type: string + description: + nullable: true + type: string + country: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + holder_name: + nullable: true + type: string + type: + enum: + - BANK_ACCOUNT + - EWALLET + - CREDIT_CARD + - OTC + - QR_CODE + - CARDLESS_CREDIT + nullable: true + type: string + properties: + $ref: '#/components/schemas/IdentityAccountResponse_properties' + created: + example: 2016-08-29T09:12:33.001Z + format: date-time + type: string + required: + - company + - country + - description + - properties + - type + type: object + KYCDocumentType: + enum: + - BIRTH_CERTIFICATE + - BANK_STATEMENT + - DRIVING_LICENSE + - IDENTITY_CARD + - PASSPORT + - VISA + - BUSINESS_REGISTRATION + - BUSINESS_LICENSE + type: string + KYCDocumentSubType: + enum: + - NATIONAL_ID + - CONSULAR_ID + - VOTER_ID + - POSTAL_ID + - RESIDENCE_PERMIT + - TAX_ID + - STUDENT_ID + - MILITARY_ID + - MEDICAL_ID + - OTHERS + nullable: true + type: string + KYCDocumentResponse: + example: + country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + properties: + country: + allOf: + - $ref: '#/components/schemas/CountryCode' + - nullable: true + type: + allOf: + - $ref: '#/components/schemas/KYCDocumentType' + - nullable: true + sub_type: + allOf: + - $ref: '#/components/schemas/KYCDocumentSubType' + - nullable: true + document_name: + nullable: true + type: string + document_number: + nullable: true + type: string + expires_at: + nullable: true + type: string + holder_name: + nullable: true + type: string + document_images: + items: + type: string + nullable: true + type: array + required: + - country + - document_images + - document_name + - document_number + - expires_at + - holder_name + - sub_type + - type + type: object + EndCustomerStatus: + enum: + - ACTIVE + - INACTIVE + - PENDING + - BLOCKED + - DELETED + nullable: true + type: string + Customer: + example: + individual_detail: + place_of_birth: place_of_birth + gender: MALE + nationality: ID + surname: surname + date_of_birth: 2017-07-21 + surname_non_roman: surname_non_roman + employment: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + given_names: given_names + given_names_non_roman: given_names_non_roman + middle_name: middle_name + mother_maiden_name: mother_maiden_name + business_detail: + business_name: business_name + nature_of_business: nature_of_business + business_type: CORPORATION + date_of_registration: 2017-07-21 + business_domicile: ID + addresses: + - country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + - country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + metadata: "{}" + reference_id: reference_id + kyc_documents: + - country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + - country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + created: 2016-08-29T09:12:33.001Z + description: description + type: INDIVIDUAL + phone_number: +6281295412345 + id: id + mobile_number: +6281295412345 + identity_accounts: + - country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + - country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + updated: 2016-08-29T09:12:33.001Z + email: info@xendit.co + status: null + properties: + type: + default: INDIVIDUAL + enum: + - INDIVIDUAL + - BUSINESS + type: string + reference_id: + description: "Merchant's reference of this end customer, eg Merchant's user's\ + \ id. Must be unique." + maxLength: 255 + type: string + individual_detail: + $ref: '#/components/schemas/IndividualDetail' + business_detail: + $ref: '#/components/schemas/BusinessDetail' + description: + maxLength: 1000 + nullable: true + type: string + email: + example: info@xendit.co + format: email + nullable: true + type: string + mobile_number: + example: +6281295412345 + format: E164 + nullable: true + type: string + phone_number: + example: +6281295412345 + format: E164 + nullable: true + type: string + addresses: + items: + $ref: '#/components/schemas/Address' + nullable: true + type: array + identity_accounts: + items: + $ref: '#/components/schemas/IdentityAccountResponse' + nullable: true + type: array + kyc_documents: + items: + $ref: '#/components/schemas/KYCDocumentResponse' + nullable: true + type: array + metadata: + nullable: true + type: object + status: + $ref: '#/components/schemas/EndCustomerStatus' + id: + type: string + created: + example: 2016-08-29T09:12:33.001Z + format: date-time + type: string + updated: + example: 2016-08-29T09:12:33.001Z + format: date-time + type: string + required: + - addresses + - business_detail + - created + - description + - email + - id + - identity_accounts + - individual_detail + - kyc_documents + - metadata + - mobile_number + - phone_number + - reference_id + - type + - updated + type: object + AddressRequest: + example: + line_1: line_1 + country_code: ID + line_2: line_2 + is_primary: false + city: city + province_state: province_state + suburb: suburb + category: category + postal_code: postal_code + status: null + properties: + category: + description: "Home, work or provincial" + maxLength: 255 + type: string + country_code: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + province_state: + type: string + city: + type: string + suburb: + type: string + postal_code: + type: string + line_1: + type: string + line_2: + type: string + status: + $ref: '#/components/schemas/AddressStatus' + is_primary: + default: false + type: boolean + type: object + IdentityAccountType: + enum: + - BANK_ACCOUNT + - EWALLET + - CREDIT_CARD + - PAY_LATER + - OTC + - QR_CODE + type: string + IdentityAccountRequest: + example: + country: ID + description: description + company: company + type: null + properties: null + properties: + type: + $ref: '#/components/schemas/IdentityAccountType' + company: + description: "The issuing institution associated with the account (e.g.,\ + \ OCBC, GOPAY, 7-11). If adding financial accounts that Xendit supports,\ + \ we recommend you use the channel_name found at https://xendit.github.io/apireference/#payment-channels\ + \ for this field" + maxLength: 100 + type: string + description: + description: Free text description of this account + maxLength: 255 + type: string + country: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + properties: + $ref: '#/components/schemas/IdentityAccountRequest_properties' + type: object + KYCDocumentRequest: + example: + country: ID + document_name: KTP + document_number: AA123467890 + expires_at: 2017-07-21 + sub_type: null + type: null + document_images: + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + holder_name: John Doe + properties: + country: + description: ISO3166-2 country code + example: ID + maxLength: 2 + nullable: true + type: string + type: + $ref: '#/components/schemas/KYCDocumentType' + sub_type: + $ref: '#/components/schemas/KYCDocumentSubType' + document_name: + example: KTP + type: string + document_number: + example: AA123467890 + type: string + expires_at: + example: 2017-07-21 + type: string + holder_name: + example: John Doe + type: string + document_images: + items: + description: pointer to file stored in xendit s3 + example: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + type: string + type: array + type: object + CustomerRequest: + example: + individual_detail: + place_of_birth: place_of_birth + gender: MALE + nationality: ID + surname: surname + date_of_birth: 2017-07-21 + surname_non_roman: surname_non_roman + employment: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + given_names: given_names + given_names_non_roman: given_names_non_roman + middle_name: middle_name + mother_maiden_name: mother_maiden_name + business_detail: + business_name: business_name + nature_of_business: nature_of_business + business_type: CORPORATION + date_of_registration: 2017-07-21 + business_domicile: ID + addresses: + - line_1: line_1 + country_code: ID + line_2: line_2 + is_primary: false + city: city + province_state: province_state + suburb: suburb + category: category + postal_code: postal_code + status: null + - line_1: line_1 + country_code: ID + line_2: line_2 + is_primary: false + city: city + province_state: province_state + suburb: suburb + category: category + postal_code: postal_code + status: null + metadata: "{}" + reference_id: reference_id + kyc_documents: + - country: ID + document_name: KTP + document_number: AA123467890 + expires_at: 2017-07-21 + sub_type: null + type: null + document_images: + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + holder_name: John Doe + - country: ID + document_name: KTP + document_number: AA123467890 + expires_at: 2017-07-21 + sub_type: null + type: null + document_images: + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + holder_name: John Doe + description: description + type: INDIVIDUAL + phone_number: +6281295412345 + mobile_number: +6281295412345 + client_name: AirAsia Indonesia + identity_accounts: + - country: ID + description: description + company: company + type: null + properties: null + - country: ID + description: description + company: company + type: null + properties: null + email: info@xendit.co + properties: + client_name: + description: Entity's name for this client + example: AirAsia Indonesia + type: string + reference_id: + description: "Merchant's reference of this end customer, eg Merchant's user's\ + \ id. Must be unique." + maxLength: 255 + type: string + type: + default: INDIVIDUAL + enum: + - INDIVIDUAL + - BUSINESS + type: string + individual_detail: + $ref: '#/components/schemas/IndividualDetail' + business_detail: + $ref: '#/components/schemas/BusinessDetail' + description: + maxLength: 1000 + nullable: true + type: string + email: + example: info@xendit.co + format: email + type: string + mobile_number: + example: +6281295412345 + format: E164 + type: string + phone_number: + example: +6281295412345 + format: E164 + type: string + addresses: + items: + $ref: '#/components/schemas/AddressRequest' + type: array + identity_accounts: + items: + $ref: '#/components/schemas/IdentityAccountRequest' + type: array + kyc_documents: + items: + $ref: '#/components/schemas/KYCDocumentRequest' + type: array + metadata: + type: object + required: + - client + - entity + - reference_id + type: object + ResponseDataNotFound: + properties: + error_code: + enum: + - DATA_NOT_FOUND + - ENTITY_NOT_FOUND_ERROR + - CLIENT_NOT_FOUND_ERROR + example: DATA_NOT_FOUND + type: string + message: + example: Provided customer_id does not exist + type: object + PatchCustomer: + example: + individual_detail: + place_of_birth: place_of_birth + gender: MALE + nationality: ID + surname: surname + date_of_birth: 2017-07-21 + surname_non_roman: surname_non_roman + employment: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + given_names: given_names + given_names_non_roman: given_names_non_roman + middle_name: middle_name + mother_maiden_name: mother_maiden_name + business_detail: + business_name: business_name + nature_of_business: nature_of_business + business_type: CORPORATION + date_of_registration: 2017-07-21 + business_domicile: ID + metadata: "{}" + addresses: + - line_1: line_1 + country_code: ID + line_2: line_2 + is_primary: false + city: city + province_state: province_state + suburb: suburb + category: category + postal_code: postal_code + status: null + - line_1: line_1 + country_code: ID + line_2: line_2 + is_primary: false + city: city + province_state: province_state + suburb: suburb + category: category + postal_code: postal_code + status: null + reference_id: reference_id + kyc_documents: + - country: ID + document_name: KTP + document_number: AA123467890 + expires_at: 2017-07-21 + sub_type: null + type: null + document_images: + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + holder_name: John Doe + - country: ID + document_name: KTP + document_number: AA123467890 + expires_at: 2017-07-21 + sub_type: null + type: null + document_images: + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwc= + holder_name: John Doe + description: description + phone_number: +6281295412345 + mobile_number: +6281295412345 + client_name: AirAsia Indonesia + identity_accounts: + - country: ID + description: description + company: company + type: null + properties: null + - country: ID + description: description + company: company + type: null + properties: null + email: info@xendit.co + status: null + properties: + client_name: + description: Entity's name for this client + example: AirAsia Indonesia + nullable: true + type: string + reference_id: + description: "Merchant's reference of this end customer, eg Merchant's user's\ + \ id. Must be unique." + maxLength: 255 + nullable: true + type: string + individual_detail: + $ref: '#/components/schemas/IndividualDetail' + business_detail: + $ref: '#/components/schemas/BusinessDetail' + description: + maxLength: 1000 + nullable: true + type: string + email: + example: info@xendit.co + format: email + nullable: true + type: string + mobile_number: + example: +6281295412345 + format: E164 + nullable: true + type: string + phone_number: + example: +6281295412345 + format: E164 + nullable: true + type: string + metadata: + nullable: true + type: object + addresses: + items: + $ref: '#/components/schemas/AddressRequest' + nullable: true + type: array + identity_accounts: + items: + $ref: '#/components/schemas/IdentityAccountRequest' + nullable: true + type: array + kyc_documents: + items: + $ref: '#/components/schemas/KYCDocumentRequest' + nullable: true + type: array + status: + $ref: '#/components/schemas/EndCustomerStatus' + required: + - client + - entity + type: object + getCustomerByReferenceID_200_response: + example: + data: + - individual_detail: + place_of_birth: place_of_birth + gender: MALE + nationality: ID + surname: surname + date_of_birth: 2017-07-21 + surname_non_roman: surname_non_roman + employment: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + given_names: given_names + given_names_non_roman: given_names_non_roman + middle_name: middle_name + mother_maiden_name: mother_maiden_name + business_detail: + business_name: business_name + nature_of_business: nature_of_business + business_type: CORPORATION + date_of_registration: 2017-07-21 + business_domicile: ID + addresses: + - country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + - country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + metadata: "{}" + reference_id: reference_id + kyc_documents: + - country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + - country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + created: 2016-08-29T09:12:33.001Z + description: description + type: INDIVIDUAL + phone_number: +6281295412345 + id: id + mobile_number: +6281295412345 + identity_accounts: + - country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + - country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + updated: 2016-08-29T09:12:33.001Z + email: info@xendit.co + status: null + - individual_detail: + place_of_birth: place_of_birth + gender: MALE + nationality: ID + surname: surname + date_of_birth: 2017-07-21 + surname_non_roman: surname_non_roman + employment: + nature_of_business: nature_of_business + employer_name: employer_name + role_description: role_description + given_names: given_names + given_names_non_roman: given_names_non_roman + middle_name: middle_name + mother_maiden_name: mother_maiden_name + business_detail: + business_name: business_name + nature_of_business: nature_of_business + business_type: CORPORATION + date_of_registration: 2017-07-21 + business_domicile: ID + addresses: + - country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + - country: "" + is_primary: true + city: city + created: 2016-08-29T09:12:33.001Z + province_state: province_state + street_line2: street_line2 + street_line1: street_line1 + meta: "{}" + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + category: category + postal_code: postal_code + updated: 2016-08-29T09:12:33.001Z + status: null + metadata: "{}" + reference_id: reference_id + kyc_documents: + - country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + - country: "" + document_name: document_name + document_number: document_number + expires_at: expires_at + sub_type: "" + type: "" + document_images: + - document_images + - document_images + holder_name: holder_name + created: 2016-08-29T09:12:33.001Z + description: description + type: INDIVIDUAL + phone_number: +6281295412345 + id: id + mobile_number: +6281295412345 + identity_accounts: + - country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + - country: ID + code: code + created: 2016-08-29T09:12:33.001Z + description: description + company: company + id: d290f1ee-6c54-4b01-90e6-d701748f0851 + type: BANK_ACCOUNT + properties: null + holder_name: holder_name + updated: 2016-08-29T09:12:33.001Z + email: info@xendit.co + status: null + has_more: true + properties: + has_more: + type: boolean + data: + items: + $ref: '#/components/schemas/Customer' + type: array + type: object + getCustomerByReferenceID_400_response_allOf: + properties: + error_code: + enum: + - ENTITY_NOT_FOUND_ERROR + - CLIENT_NOT_FOUND_ERROR + - END_CUSTOMER_NOT_FOUND_ERROR + - API_VALIDATION_ERROR + example: ENTITY_NOT_FOUND_ERROR + type: string + message: + example: Entity does not exist + type: object + getCustomerByReferenceID_400_response: + allOf: + - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/getCustomerByReferenceID_400_response_allOf' + createCustomer_400_response_allOf: + properties: + error_code: + enum: + - DUPLICATE_END_CUSTOMER_ERROR + - API_VALIDATION_ERROR + example: DUPLICATE_END_CUSTOMER_ERROR + type: string + message: + example: Client reference already exist + type: object + createCustomer_400_response: + allOf: + - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/createCustomer_400_response_allOf' + updateCustomer_400_response_allOf: + properties: + error_code: + enum: + - ENTITY_NOT_FOUND_ERROR + - CLIENT_NOT_FOUND_ERROR + - END_CUSTOMER_NOT_FOUND_ERROR + - DUPLICATE_END_CUSTOMER_ERROR + - API_VALIDATION_ERROR + example: ENTITY_NOT_FOUND_ERROR + type: string + message: + example: Entity does not exist + type: object + updateCustomer_400_response: + allOf: + - $ref: '#/components/schemas/Error' + - $ref: '#/components/schemas/updateCustomer_400_response_allOf' + IdentityAccountResponse_properties: + anyOf: + - $ref: '#/components/schemas/AccountBank' + - $ref: '#/components/schemas/AccountEwallet' + - $ref: '#/components/schemas/AccountCard' + - $ref: '#/components/schemas/AccountOTC' + - $ref: '#/components/schemas/AccountQRCode' + - $ref: '#/components/schemas/AccountPayLater' + IdentityAccountRequest_properties: + anyOf: + - $ref: '#/components/schemas/AccountBank' + - $ref: '#/components/schemas/AccountEwallet' + - $ref: '#/components/schemas/AccountCard' + - $ref: '#/components/schemas/AccountPayLater' + - $ref: '#/components/schemas/AccountOTC' + - $ref: '#/components/schemas/AccountQRCode' +x-owner: xendit +x-repositories: +- name: iluma-identity-service-v2 + branch: master +x-repositories-folder: docs/repositories diff --git a/docs/customer/AccountBank.md b/docs/customer/AccountBank.md new file mode 100644 index 00000000..61b5fdc3 --- /dev/null +++ b/docs/customer/AccountBank.md @@ -0,0 +1,226 @@ +# AccountBank + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **AccountNumber** | Pointer to **string** | Unique account identifier as per the bank records. | [optional] | +| **AccountHolderName** | Pointer to **NullableString** | Name of account holder as per the bank records. Needs to match the registered account name exactly. . | [optional] | +| **SwiftCode** | Pointer to **NullableString** | The SWIFT code for international payments | [optional] | +| **AccountType** | Pointer to **NullableString** | Free text account type, e.g., Savings, Transaction, Virtual Account. | [optional] | +| **AccountDetails** | Pointer to **NullableString** | Potentially masked account detail, for display purposes only. | [optional] | +| **Currency** | Pointer to **string** | | [optional] | + +## Methods + +### NewAccountBank + +`func NewAccountBank() *AccountBank` + +NewAccountBank instantiates a new AccountBank 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 + +### NewAccountBankWithDefaults + +`func NewAccountBankWithDefaults() *AccountBank` + +NewAccountBankWithDefaults instantiates a new AccountBank 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 + +### GetAccountNumber + +`func (o *AccountBank) GetAccountNumber() string` + +GetAccountNumber returns the AccountNumber field if non-nil, zero value otherwise. + +### GetAccountNumberOk + +`func (o *AccountBank) GetAccountNumberOk() (*string, bool)` + +GetAccountNumberOk returns a tuple with the AccountNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountNumber + +`func (o *AccountBank) SetAccountNumber(v string)` + +SetAccountNumber sets AccountNumber field to given value. + +### HasAccountNumber + +`func (o *AccountBank) HasAccountNumber() bool` + +HasAccountNumber returns a boolean if a field has been set. + +### GetAccountHolderName + +`func (o *AccountBank) GetAccountHolderName() string` + +GetAccountHolderName returns the AccountHolderName field if non-nil, zero value otherwise. + +### GetAccountHolderNameOk + +`func (o *AccountBank) GetAccountHolderNameOk() (*string, bool)` + +GetAccountHolderNameOk returns a tuple with the AccountHolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountHolderName + +`func (o *AccountBank) SetAccountHolderName(v string)` + +SetAccountHolderName sets AccountHolderName field to given value. + +### HasAccountHolderName + +`func (o *AccountBank) HasAccountHolderName() bool` + +HasAccountHolderName returns a boolean if a field has been set. + +### SetAccountHolderNameNil + +`func (o *AccountBank) SetAccountHolderNameNil(b bool)` + + SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil + +### UnsetAccountHolderName +`func (o *AccountBank) UnsetAccountHolderName()` + +UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +### GetSwiftCode + +`func (o *AccountBank) GetSwiftCode() string` + +GetSwiftCode returns the SwiftCode field if non-nil, zero value otherwise. + +### GetSwiftCodeOk + +`func (o *AccountBank) GetSwiftCodeOk() (*string, bool)` + +GetSwiftCodeOk returns a tuple with the SwiftCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSwiftCode + +`func (o *AccountBank) SetSwiftCode(v string)` + +SetSwiftCode sets SwiftCode field to given value. + +### HasSwiftCode + +`func (o *AccountBank) HasSwiftCode() bool` + +HasSwiftCode returns a boolean if a field has been set. + +### SetSwiftCodeNil + +`func (o *AccountBank) SetSwiftCodeNil(b bool)` + + SetSwiftCodeNil sets the value for SwiftCode to be an explicit nil + +### UnsetSwiftCode +`func (o *AccountBank) UnsetSwiftCode()` + +UnsetSwiftCode ensures that no value is present for SwiftCode, not even an explicit nil +### GetAccountType + +`func (o *AccountBank) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *AccountBank) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *AccountBank) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *AccountBank) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### SetAccountTypeNil + +`func (o *AccountBank) SetAccountTypeNil(b bool)` + + SetAccountTypeNil sets the value for AccountType to be an explicit nil + +### UnsetAccountType +`func (o *AccountBank) UnsetAccountType()` + +UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +### GetAccountDetails + +`func (o *AccountBank) GetAccountDetails() string` + +GetAccountDetails returns the AccountDetails field if non-nil, zero value otherwise. + +### GetAccountDetailsOk + +`func (o *AccountBank) GetAccountDetailsOk() (*string, bool)` + +GetAccountDetailsOk returns a tuple with the AccountDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountDetails + +`func (o *AccountBank) SetAccountDetails(v string)` + +SetAccountDetails sets AccountDetails field to given value. + +### HasAccountDetails + +`func (o *AccountBank) HasAccountDetails() bool` + +HasAccountDetails returns a boolean if a field has been set. + +### SetAccountDetailsNil + +`func (o *AccountBank) SetAccountDetailsNil(b bool)` + + SetAccountDetailsNil sets the value for AccountDetails to be an explicit nil + +### UnsetAccountDetails +`func (o *AccountBank) UnsetAccountDetails()` + +UnsetAccountDetails ensures that no value is present for AccountDetails, not even an explicit nil +### GetCurrency + +`func (o *AccountBank) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *AccountBank) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *AccountBank) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *AccountBank) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AccountCard.md b/docs/customer/AccountCard.md new file mode 100644 index 00000000..817a834a --- /dev/null +++ b/docs/customer/AccountCard.md @@ -0,0 +1,56 @@ +# AccountCard + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **TokenId** | Pointer to **string** | The token id returned in tokenisation | [optional] | + +## Methods + +### NewAccountCard + +`func NewAccountCard() *AccountCard` + +NewAccountCard instantiates a new AccountCard 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 + +### NewAccountCardWithDefaults + +`func NewAccountCardWithDefaults() *AccountCard` + +NewAccountCardWithDefaults instantiates a new AccountCard 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 + +### GetTokenId + +`func (o *AccountCard) GetTokenId() string` + +GetTokenId returns the TokenId field if non-nil, zero value otherwise. + +### GetTokenIdOk + +`func (o *AccountCard) 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 *AccountCard) SetTokenId(v string)` + +SetTokenId sets TokenId field to given value. + +### HasTokenId + +`func (o *AccountCard) HasTokenId() bool` + +HasTokenId returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AccountEwallet.md b/docs/customer/AccountEwallet.md new file mode 100644 index 00000000..ff54804c --- /dev/null +++ b/docs/customer/AccountEwallet.md @@ -0,0 +1,118 @@ +# AccountEwallet + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **AccountNumber** | Pointer to **string** | Unique account identifier as per the bank records. | [optional] | +| **AccountHolderName** | Pointer to **NullableString** | Name of account holder as per the bank records. Needs to match the registered account name exactly. | [optional] | +| **Currency** | Pointer to **string** | | [optional] | + +## Methods + +### NewAccountEwallet + +`func NewAccountEwallet() *AccountEwallet` + +NewAccountEwallet instantiates a new AccountEwallet 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 + +### NewAccountEwalletWithDefaults + +`func NewAccountEwalletWithDefaults() *AccountEwallet` + +NewAccountEwalletWithDefaults instantiates a new AccountEwallet 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 + +### GetAccountNumber + +`func (o *AccountEwallet) GetAccountNumber() string` + +GetAccountNumber returns the AccountNumber field if non-nil, zero value otherwise. + +### GetAccountNumberOk + +`func (o *AccountEwallet) GetAccountNumberOk() (*string, bool)` + +GetAccountNumberOk returns a tuple with the AccountNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountNumber + +`func (o *AccountEwallet) SetAccountNumber(v string)` + +SetAccountNumber sets AccountNumber field to given value. + +### HasAccountNumber + +`func (o *AccountEwallet) HasAccountNumber() bool` + +HasAccountNumber returns a boolean if a field has been set. + +### GetAccountHolderName + +`func (o *AccountEwallet) GetAccountHolderName() string` + +GetAccountHolderName returns the AccountHolderName field if non-nil, zero value otherwise. + +### GetAccountHolderNameOk + +`func (o *AccountEwallet) GetAccountHolderNameOk() (*string, bool)` + +GetAccountHolderNameOk returns a tuple with the AccountHolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountHolderName + +`func (o *AccountEwallet) SetAccountHolderName(v string)` + +SetAccountHolderName sets AccountHolderName field to given value. + +### HasAccountHolderName + +`func (o *AccountEwallet) HasAccountHolderName() bool` + +HasAccountHolderName returns a boolean if a field has been set. + +### SetAccountHolderNameNil + +`func (o *AccountEwallet) SetAccountHolderNameNil(b bool)` + + SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil + +### UnsetAccountHolderName +`func (o *AccountEwallet) UnsetAccountHolderName()` + +UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +### GetCurrency + +`func (o *AccountEwallet) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *AccountEwallet) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *AccountEwallet) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *AccountEwallet) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AccountOTC.md b/docs/customer/AccountOTC.md new file mode 100644 index 00000000..ec63ba92 --- /dev/null +++ b/docs/customer/AccountOTC.md @@ -0,0 +1,92 @@ +# AccountOTC + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **PaymentCode** | Pointer to **string** | Complete fixed payment code (including prefix) | [optional] | +| **ExpiresAt** | Pointer to **NullableString** | YYYY-MM-DD string with expiry date for the payment code | [optional] | + +## Methods + +### NewAccountOTC + +`func NewAccountOTC() *AccountOTC` + +NewAccountOTC instantiates a new AccountOTC 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 + +### NewAccountOTCWithDefaults + +`func NewAccountOTCWithDefaults() *AccountOTC` + +NewAccountOTCWithDefaults instantiates a new AccountOTC 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 + +### GetPaymentCode + +`func (o *AccountOTC) GetPaymentCode() string` + +GetPaymentCode returns the PaymentCode field if non-nil, zero value otherwise. + +### GetPaymentCodeOk + +`func (o *AccountOTC) GetPaymentCodeOk() (*string, bool)` + +GetPaymentCodeOk returns a tuple with the PaymentCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentCode + +`func (o *AccountOTC) SetPaymentCode(v string)` + +SetPaymentCode sets PaymentCode field to given value. + +### HasPaymentCode + +`func (o *AccountOTC) HasPaymentCode() bool` + +HasPaymentCode returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *AccountOTC) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *AccountOTC) GetExpiresAtOk() (*string, 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 *AccountOTC) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *AccountOTC) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### SetExpiresAtNil + +`func (o *AccountOTC) SetExpiresAtNil(b bool)` + + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil + +### UnsetExpiresAt +`func (o *AccountOTC) UnsetExpiresAt()` + +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AccountPayLater.md b/docs/customer/AccountPayLater.md new file mode 100644 index 00000000..d4f3ba1d --- /dev/null +++ b/docs/customer/AccountPayLater.md @@ -0,0 +1,118 @@ +# AccountPayLater + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **AccountId** | Pointer to **string** | Alphanumeric string identifying this account. Usually an email address or phone number. | [optional] | +| **AccountHolderName** | Pointer to **NullableString** | Name of account holder as per the cardless credit account. | [optional] | +| **Currency** | Pointer to **string** | | [optional] | + +## Methods + +### NewAccountPayLater + +`func NewAccountPayLater() *AccountPayLater` + +NewAccountPayLater instantiates a new AccountPayLater 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 + +### NewAccountPayLaterWithDefaults + +`func NewAccountPayLaterWithDefaults() *AccountPayLater` + +NewAccountPayLaterWithDefaults instantiates a new AccountPayLater 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 + +### GetAccountId + +`func (o *AccountPayLater) GetAccountId() string` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *AccountPayLater) GetAccountIdOk() (*string, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *AccountPayLater) SetAccountId(v string)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *AccountPayLater) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### GetAccountHolderName + +`func (o *AccountPayLater) GetAccountHolderName() string` + +GetAccountHolderName returns the AccountHolderName field if non-nil, zero value otherwise. + +### GetAccountHolderNameOk + +`func (o *AccountPayLater) GetAccountHolderNameOk() (*string, bool)` + +GetAccountHolderNameOk returns a tuple with the AccountHolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountHolderName + +`func (o *AccountPayLater) SetAccountHolderName(v string)` + +SetAccountHolderName sets AccountHolderName field to given value. + +### HasAccountHolderName + +`func (o *AccountPayLater) HasAccountHolderName() bool` + +HasAccountHolderName returns a boolean if a field has been set. + +### SetAccountHolderNameNil + +`func (o *AccountPayLater) SetAccountHolderNameNil(b bool)` + + SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil + +### UnsetAccountHolderName +`func (o *AccountPayLater) UnsetAccountHolderName()` + +UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +### GetCurrency + +`func (o *AccountPayLater) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *AccountPayLater) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *AccountPayLater) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *AccountPayLater) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AccountQRCode.md b/docs/customer/AccountQRCode.md new file mode 100644 index 00000000..56526e53 --- /dev/null +++ b/docs/customer/AccountQRCode.md @@ -0,0 +1,56 @@ +# AccountQRCode + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **QrString** | Pointer to **string** | String representation of the QR Code image | [optional] | + +## Methods + +### NewAccountQRCode + +`func NewAccountQRCode() *AccountQRCode` + +NewAccountQRCode instantiates a new AccountQRCode 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 + +### NewAccountQRCodeWithDefaults + +`func NewAccountQRCodeWithDefaults() *AccountQRCode` + +NewAccountQRCodeWithDefaults instantiates a new AccountQRCode 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 + +### GetQrString + +`func (o *AccountQRCode) GetQrString() string` + +GetQrString returns the QrString field if non-nil, zero value otherwise. + +### GetQrStringOk + +`func (o *AccountQRCode) GetQrStringOk() (*string, bool)` + +GetQrStringOk returns a tuple with the QrString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQrString + +`func (o *AccountQRCode) SetQrString(v string)` + +SetQrString sets QrString field to given value. + +### HasQrString + +`func (o *AccountQRCode) HasQrString() bool` + +HasQrString returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/Address.md b/docs/customer/Address.md new file mode 100644 index 00000000..21aac0dd --- /dev/null +++ b/docs/customer/Address.md @@ -0,0 +1,418 @@ +# Address + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Id** | Pointer to **string** | | [optional] | +| **Category** | **NullableString** | | | +| **Country** | **string** | | | +| **ProvinceState** | **NullableString** | | | +| **City** | **NullableString** | | | +| **PostalCode** | **NullableString** | | | +| **StreetLine1** | **NullableString** | | | +| **StreetLine2** | **NullableString** | | | +| **Status** | Pointer to [**NullableAddressStatus**](AddressStatus.md) | | [optional] | +| **IsPrimary** | **NullableBool** | | | +| **Meta** | Pointer to **map[string]interface{}** | | [optional] | +| **Created** | Pointer to **time.Time** | | [optional] | +| **Updated** | Pointer to **time.Time** | | [optional] | + +## Methods + +### NewAddress + +`func NewAddress(category NullableString, country string, provinceState NullableString, city NullableString, postalCode NullableString, streetLine1 NullableString, streetLine2 NullableString, isPrimary NullableBool, ) *Address` + +NewAddress instantiates a new Address 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 + +### NewAddressWithDefaults + +`func NewAddressWithDefaults() *Address` + +NewAddressWithDefaults instantiates a new Address 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 + +### GetId + +`func (o *Address) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Address) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Address) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Address) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCategory + +`func (o *Address) GetCategory() string` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *Address) GetCategoryOk() (*string, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategory + +`func (o *Address) SetCategory(v string)` + +SetCategory sets Category field to given value. + + +### SetCategoryNil + +`func (o *Address) SetCategoryNil(b bool)` + + SetCategoryNil sets the value for Category to be an explicit nil + +### UnsetCategory +`func (o *Address) UnsetCategory()` + +UnsetCategory ensures that no value is present for Category, not even an explicit nil +### GetCountry + +`func (o *Address) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *Address) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *Address) SetCountry(v string)` + +SetCountry sets Country field to given value. + + +### GetProvinceState + +`func (o *Address) GetProvinceState() string` + +GetProvinceState returns the ProvinceState field if non-nil, zero value otherwise. + +### GetProvinceStateOk + +`func (o *Address) GetProvinceStateOk() (*string, bool)` + +GetProvinceStateOk returns a tuple with the ProvinceState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvinceState + +`func (o *Address) SetProvinceState(v string)` + +SetProvinceState sets ProvinceState field to given value. + + +### SetProvinceStateNil + +`func (o *Address) SetProvinceStateNil(b bool)` + + SetProvinceStateNil sets the value for ProvinceState to be an explicit nil + +### UnsetProvinceState +`func (o *Address) UnsetProvinceState()` + +UnsetProvinceState ensures that no value is present for ProvinceState, not even an explicit nil +### GetCity + +`func (o *Address) GetCity() string` + +GetCity returns the City field if non-nil, zero value otherwise. + +### GetCityOk + +`func (o *Address) GetCityOk() (*string, bool)` + +GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCity + +`func (o *Address) SetCity(v string)` + +SetCity sets City field to given value. + + +### SetCityNil + +`func (o *Address) SetCityNil(b bool)` + + SetCityNil sets the value for City to be an explicit nil + +### UnsetCity +`func (o *Address) UnsetCity()` + +UnsetCity ensures that no value is present for City, not even an explicit nil +### GetPostalCode + +`func (o *Address) GetPostalCode() string` + +GetPostalCode returns the PostalCode field if non-nil, zero value otherwise. + +### GetPostalCodeOk + +`func (o *Address) GetPostalCodeOk() (*string, bool)` + +GetPostalCodeOk returns a tuple with the PostalCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostalCode + +`func (o *Address) SetPostalCode(v string)` + +SetPostalCode sets PostalCode field to given value. + + +### SetPostalCodeNil + +`func (o *Address) SetPostalCodeNil(b bool)` + + SetPostalCodeNil sets the value for PostalCode to be an explicit nil + +### UnsetPostalCode +`func (o *Address) UnsetPostalCode()` + +UnsetPostalCode ensures that no value is present for PostalCode, not even an explicit nil +### GetStreetLine1 + +`func (o *Address) GetStreetLine1() string` + +GetStreetLine1 returns the StreetLine1 field if non-nil, zero value otherwise. + +### GetStreetLine1Ok + +`func (o *Address) GetStreetLine1Ok() (*string, bool)` + +GetStreetLine1Ok returns a tuple with the StreetLine1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreetLine1 + +`func (o *Address) SetStreetLine1(v string)` + +SetStreetLine1 sets StreetLine1 field to given value. + + +### SetStreetLine1Nil + +`func (o *Address) SetStreetLine1Nil(b bool)` + + SetStreetLine1Nil sets the value for StreetLine1 to be an explicit nil + +### UnsetStreetLine1 +`func (o *Address) UnsetStreetLine1()` + +UnsetStreetLine1 ensures that no value is present for StreetLine1, not even an explicit nil +### GetStreetLine2 + +`func (o *Address) GetStreetLine2() string` + +GetStreetLine2 returns the StreetLine2 field if non-nil, zero value otherwise. + +### GetStreetLine2Ok + +`func (o *Address) GetStreetLine2Ok() (*string, bool)` + +GetStreetLine2Ok returns a tuple with the StreetLine2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreetLine2 + +`func (o *Address) SetStreetLine2(v string)` + +SetStreetLine2 sets StreetLine2 field to given value. + + +### SetStreetLine2Nil + +`func (o *Address) SetStreetLine2Nil(b bool)` + + SetStreetLine2Nil sets the value for StreetLine2 to be an explicit nil + +### UnsetStreetLine2 +`func (o *Address) UnsetStreetLine2()` + +UnsetStreetLine2 ensures that no value is present for StreetLine2, not even an explicit nil +### GetStatus + +`func (o *Address) GetStatus() AddressStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Address) GetStatusOk() (*AddressStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Address) SetStatus(v AddressStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Address) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatusNil + +`func (o *Address) SetStatusNil(b bool)` + + SetStatusNil sets the value for Status to be an explicit nil + +### UnsetStatus +`func (o *Address) UnsetStatus()` + +UnsetStatus ensures that no value is present for Status, not even an explicit nil +### GetIsPrimary + +`func (o *Address) GetIsPrimary() bool` + +GetIsPrimary returns the IsPrimary field if non-nil, zero value otherwise. + +### GetIsPrimaryOk + +`func (o *Address) GetIsPrimaryOk() (*bool, bool)` + +GetIsPrimaryOk returns a tuple with the IsPrimary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrimary + +`func (o *Address) SetIsPrimary(v bool)` + +SetIsPrimary sets IsPrimary field to given value. + + +### SetIsPrimaryNil + +`func (o *Address) SetIsPrimaryNil(b bool)` + + SetIsPrimaryNil sets the value for IsPrimary to be an explicit nil + +### UnsetIsPrimary +`func (o *Address) UnsetIsPrimary()` + +UnsetIsPrimary ensures that no value is present for IsPrimary, not even an explicit nil +### GetMeta + +`func (o *Address) GetMeta() map[string]interface{}` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *Address) GetMetaOk() (*map[string]interface{}, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *Address) SetMeta(v map[string]interface{})` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *Address) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + +### SetMetaNil + +`func (o *Address) SetMetaNil(b bool)` + + SetMetaNil sets the value for Meta to be an explicit nil + +### UnsetMeta +`func (o *Address) UnsetMeta()` + +UnsetMeta ensures that no value is present for Meta, not even an explicit nil +### GetCreated + +`func (o *Address) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Address) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Address) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *Address) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### GetUpdated + +`func (o *Address) GetUpdated() time.Time` + +GetUpdated returns the Updated field if non-nil, zero value otherwise. + +### GetUpdatedOk + +`func (o *Address) GetUpdatedOk() (*time.Time, bool)` + +GetUpdatedOk returns a tuple with the Updated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdated + +`func (o *Address) SetUpdated(v time.Time)` + +SetUpdated sets Updated field to given value. + +### HasUpdated + +`func (o *Address) HasUpdated() bool` + +HasUpdated returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AddressRequest.md b/docs/customer/AddressRequest.md new file mode 100644 index 00000000..92b89f4c --- /dev/null +++ b/docs/customer/AddressRequest.md @@ -0,0 +1,310 @@ +# AddressRequest + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Category** | Pointer to **string** | Home, work or provincial | [optional] | +| **CountryCode** | Pointer to **NullableString** | ISO3166-2 country code | [optional] | +| **ProvinceState** | Pointer to **string** | | [optional] | +| **City** | Pointer to **string** | | [optional] | +| **Suburb** | Pointer to **string** | | [optional] | +| **PostalCode** | Pointer to **string** | | [optional] | +| **Line1** | Pointer to **string** | | [optional] | +| **Line2** | Pointer to **string** | | [optional] | +| **Status** | Pointer to [**NullableAddressStatus**](AddressStatus.md) | | [optional] | +| **IsPrimary** | Pointer to **bool** | | [optional] [default to false] | + +## Methods + +### NewAddressRequest + +`func NewAddressRequest() *AddressRequest` + +NewAddressRequest instantiates a new AddressRequest 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 + +### NewAddressRequestWithDefaults + +`func NewAddressRequestWithDefaults() *AddressRequest` + +NewAddressRequestWithDefaults instantiates a new AddressRequest 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 + +### GetCategory + +`func (o *AddressRequest) GetCategory() string` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *AddressRequest) GetCategoryOk() (*string, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategory + +`func (o *AddressRequest) SetCategory(v string)` + +SetCategory sets Category field to given value. + +### HasCategory + +`func (o *AddressRequest) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### GetCountryCode + +`func (o *AddressRequest) GetCountryCode() string` + +GetCountryCode returns the CountryCode field if non-nil, zero value otherwise. + +### GetCountryCodeOk + +`func (o *AddressRequest) GetCountryCodeOk() (*string, bool)` + +GetCountryCodeOk returns a tuple with the CountryCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountryCode + +`func (o *AddressRequest) SetCountryCode(v string)` + +SetCountryCode sets CountryCode field to given value. + +### HasCountryCode + +`func (o *AddressRequest) HasCountryCode() bool` + +HasCountryCode returns a boolean if a field has been set. + +### SetCountryCodeNil + +`func (o *AddressRequest) SetCountryCodeNil(b bool)` + + SetCountryCodeNil sets the value for CountryCode to be an explicit nil + +### UnsetCountryCode +`func (o *AddressRequest) UnsetCountryCode()` + +UnsetCountryCode ensures that no value is present for CountryCode, not even an explicit nil +### GetProvinceState + +`func (o *AddressRequest) GetProvinceState() string` + +GetProvinceState returns the ProvinceState field if non-nil, zero value otherwise. + +### GetProvinceStateOk + +`func (o *AddressRequest) GetProvinceStateOk() (*string, bool)` + +GetProvinceStateOk returns a tuple with the ProvinceState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvinceState + +`func (o *AddressRequest) SetProvinceState(v string)` + +SetProvinceState sets ProvinceState field to given value. + +### HasProvinceState + +`func (o *AddressRequest) HasProvinceState() bool` + +HasProvinceState returns a boolean if a field has been set. + +### GetCity + +`func (o *AddressRequest) GetCity() string` + +GetCity returns the City field if non-nil, zero value otherwise. + +### GetCityOk + +`func (o *AddressRequest) GetCityOk() (*string, bool)` + +GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCity + +`func (o *AddressRequest) SetCity(v string)` + +SetCity sets City field to given value. + +### HasCity + +`func (o *AddressRequest) HasCity() bool` + +HasCity returns a boolean if a field has been set. + +### GetSuburb + +`func (o *AddressRequest) GetSuburb() string` + +GetSuburb returns the Suburb field if non-nil, zero value otherwise. + +### GetSuburbOk + +`func (o *AddressRequest) GetSuburbOk() (*string, bool)` + +GetSuburbOk returns a tuple with the Suburb field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuburb + +`func (o *AddressRequest) SetSuburb(v string)` + +SetSuburb sets Suburb field to given value. + +### HasSuburb + +`func (o *AddressRequest) HasSuburb() bool` + +HasSuburb returns a boolean if a field has been set. + +### GetPostalCode + +`func (o *AddressRequest) GetPostalCode() string` + +GetPostalCode returns the PostalCode field if non-nil, zero value otherwise. + +### GetPostalCodeOk + +`func (o *AddressRequest) GetPostalCodeOk() (*string, bool)` + +GetPostalCodeOk returns a tuple with the PostalCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostalCode + +`func (o *AddressRequest) SetPostalCode(v string)` + +SetPostalCode sets PostalCode field to given value. + +### HasPostalCode + +`func (o *AddressRequest) HasPostalCode() bool` + +HasPostalCode returns a boolean if a field has been set. + +### GetLine1 + +`func (o *AddressRequest) GetLine1() string` + +GetLine1 returns the Line1 field if non-nil, zero value otherwise. + +### GetLine1Ok + +`func (o *AddressRequest) GetLine1Ok() (*string, bool)` + +GetLine1Ok returns a tuple with the Line1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLine1 + +`func (o *AddressRequest) SetLine1(v string)` + +SetLine1 sets Line1 field to given value. + +### HasLine1 + +`func (o *AddressRequest) HasLine1() bool` + +HasLine1 returns a boolean if a field has been set. + +### GetLine2 + +`func (o *AddressRequest) GetLine2() string` + +GetLine2 returns the Line2 field if non-nil, zero value otherwise. + +### GetLine2Ok + +`func (o *AddressRequest) GetLine2Ok() (*string, bool)` + +GetLine2Ok returns a tuple with the Line2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLine2 + +`func (o *AddressRequest) SetLine2(v string)` + +SetLine2 sets Line2 field to given value. + +### HasLine2 + +`func (o *AddressRequest) HasLine2() bool` + +HasLine2 returns a boolean if a field has been set. + +### GetStatus + +`func (o *AddressRequest) GetStatus() AddressStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AddressRequest) GetStatusOk() (*AddressStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *AddressRequest) SetStatus(v AddressStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *AddressRequest) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatusNil + +`func (o *AddressRequest) SetStatusNil(b bool)` + + SetStatusNil sets the value for Status to be an explicit nil + +### UnsetStatus +`func (o *AddressRequest) UnsetStatus()` + +UnsetStatus ensures that no value is present for Status, not even an explicit nil +### GetIsPrimary + +`func (o *AddressRequest) GetIsPrimary() bool` + +GetIsPrimary returns the IsPrimary field if non-nil, zero value otherwise. + +### GetIsPrimaryOk + +`func (o *AddressRequest) GetIsPrimaryOk() (*bool, bool)` + +GetIsPrimaryOk returns a tuple with the IsPrimary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPrimary + +`func (o *AddressRequest) SetIsPrimary(v bool)` + +SetIsPrimary sets IsPrimary field to given value. + +### HasIsPrimary + +`func (o *AddressRequest) HasIsPrimary() bool` + +HasIsPrimary returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/AddressStatus.md b/docs/customer/AddressStatus.md new file mode 100644 index 00000000..93e890d0 --- /dev/null +++ b/docs/customer/AddressStatus.md @@ -0,0 +1,13 @@ +# AddressStatus + +## Enum + + +* `ACTIVE` (value: `"ACTIVE"`) + +* `DELETED` (value: `"DELETED"`) + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/BusinessDetail.md b/docs/customer/BusinessDetail.md new file mode 100644 index 00000000..df1e5ee2 --- /dev/null +++ b/docs/customer/BusinessDetail.md @@ -0,0 +1,200 @@ +# BusinessDetail + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **BusinessName** | Pointer to **string** | | [optional] | +| **BusinessType** | Pointer to **NullableString** | | [optional] | +| **DateOfRegistration** | Pointer to **NullableString** | | [optional] | +| **NatureOfBusiness** | Pointer to **NullableString** | | [optional] | +| **BusinessDomicile** | Pointer to **NullableString** | ISO3166-2 country code | [optional] | + +## Methods + +### NewBusinessDetail + +`func NewBusinessDetail() *BusinessDetail` + +NewBusinessDetail instantiates a new BusinessDetail 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 + +### NewBusinessDetailWithDefaults + +`func NewBusinessDetailWithDefaults() *BusinessDetail` + +NewBusinessDetailWithDefaults instantiates a new BusinessDetail 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 + +### GetBusinessName + +`func (o *BusinessDetail) GetBusinessName() string` + +GetBusinessName returns the BusinessName field if non-nil, zero value otherwise. + +### GetBusinessNameOk + +`func (o *BusinessDetail) GetBusinessNameOk() (*string, bool)` + +GetBusinessNameOk returns a tuple with the BusinessName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBusinessName + +`func (o *BusinessDetail) SetBusinessName(v string)` + +SetBusinessName sets BusinessName field to given value. + +### HasBusinessName + +`func (o *BusinessDetail) HasBusinessName() bool` + +HasBusinessName returns a boolean if a field has been set. + +### GetBusinessType + +`func (o *BusinessDetail) GetBusinessType() string` + +GetBusinessType returns the BusinessType field if non-nil, zero value otherwise. + +### GetBusinessTypeOk + +`func (o *BusinessDetail) GetBusinessTypeOk() (*string, bool)` + +GetBusinessTypeOk returns a tuple with the BusinessType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBusinessType + +`func (o *BusinessDetail) SetBusinessType(v string)` + +SetBusinessType sets BusinessType field to given value. + +### HasBusinessType + +`func (o *BusinessDetail) HasBusinessType() bool` + +HasBusinessType returns a boolean if a field has been set. + +### SetBusinessTypeNil + +`func (o *BusinessDetail) SetBusinessTypeNil(b bool)` + + SetBusinessTypeNil sets the value for BusinessType to be an explicit nil + +### UnsetBusinessType +`func (o *BusinessDetail) UnsetBusinessType()` + +UnsetBusinessType ensures that no value is present for BusinessType, not even an explicit nil +### GetDateOfRegistration + +`func (o *BusinessDetail) GetDateOfRegistration() string` + +GetDateOfRegistration returns the DateOfRegistration field if non-nil, zero value otherwise. + +### GetDateOfRegistrationOk + +`func (o *BusinessDetail) GetDateOfRegistrationOk() (*string, bool)` + +GetDateOfRegistrationOk returns a tuple with the DateOfRegistration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDateOfRegistration + +`func (o *BusinessDetail) SetDateOfRegistration(v string)` + +SetDateOfRegistration sets DateOfRegistration field to given value. + +### HasDateOfRegistration + +`func (o *BusinessDetail) HasDateOfRegistration() bool` + +HasDateOfRegistration returns a boolean if a field has been set. + +### SetDateOfRegistrationNil + +`func (o *BusinessDetail) SetDateOfRegistrationNil(b bool)` + + SetDateOfRegistrationNil sets the value for DateOfRegistration to be an explicit nil + +### UnsetDateOfRegistration +`func (o *BusinessDetail) UnsetDateOfRegistration()` + +UnsetDateOfRegistration ensures that no value is present for DateOfRegistration, not even an explicit nil +### GetNatureOfBusiness + +`func (o *BusinessDetail) GetNatureOfBusiness() string` + +GetNatureOfBusiness returns the NatureOfBusiness field if non-nil, zero value otherwise. + +### GetNatureOfBusinessOk + +`func (o *BusinessDetail) GetNatureOfBusinessOk() (*string, bool)` + +GetNatureOfBusinessOk returns a tuple with the NatureOfBusiness field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNatureOfBusiness + +`func (o *BusinessDetail) SetNatureOfBusiness(v string)` + +SetNatureOfBusiness sets NatureOfBusiness field to given value. + +### HasNatureOfBusiness + +`func (o *BusinessDetail) HasNatureOfBusiness() bool` + +HasNatureOfBusiness returns a boolean if a field has been set. + +### SetNatureOfBusinessNil + +`func (o *BusinessDetail) SetNatureOfBusinessNil(b bool)` + + SetNatureOfBusinessNil sets the value for NatureOfBusiness to be an explicit nil + +### UnsetNatureOfBusiness +`func (o *BusinessDetail) UnsetNatureOfBusiness()` + +UnsetNatureOfBusiness ensures that no value is present for NatureOfBusiness, not even an explicit nil +### GetBusinessDomicile + +`func (o *BusinessDetail) GetBusinessDomicile() string` + +GetBusinessDomicile returns the BusinessDomicile field if non-nil, zero value otherwise. + +### GetBusinessDomicileOk + +`func (o *BusinessDetail) GetBusinessDomicileOk() (*string, bool)` + +GetBusinessDomicileOk returns a tuple with the BusinessDomicile field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBusinessDomicile + +`func (o *BusinessDetail) SetBusinessDomicile(v string)` + +SetBusinessDomicile sets BusinessDomicile field to given value. + +### HasBusinessDomicile + +`func (o *BusinessDetail) HasBusinessDomicile() bool` + +HasBusinessDomicile returns a boolean if a field has been set. + +### SetBusinessDomicileNil + +`func (o *BusinessDetail) SetBusinessDomicileNil(b bool)` + + SetBusinessDomicileNil sets the value for BusinessDomicile to be an explicit nil + +### UnsetBusinessDomicile +`func (o *BusinessDetail) UnsetBusinessDomicile()` + +UnsetBusinessDomicile ensures that no value is present for BusinessDomicile, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/CreateCustomer400Response.md b/docs/customer/CreateCustomer400Response.md new file mode 100644 index 00000000..2791f24d --- /dev/null +++ b/docs/customer/CreateCustomer400Response.md @@ -0,0 +1,108 @@ +# CreateCustomer400Response + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | **string** | | | +| **Message** | **interface{}** | | | +| **Errors** | Pointer to **map[string]interface{}[]** | | [optional] | + +## Methods + +### NewCreateCustomer400Response + +`func NewCreateCustomer400Response(errorCode string, message interface{}, ) *CreateCustomer400Response` + +NewCreateCustomer400Response instantiates a new CreateCustomer400Response 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 + +### NewCreateCustomer400ResponseWithDefaults + +`func NewCreateCustomer400ResponseWithDefaults() *CreateCustomer400Response` + +NewCreateCustomer400ResponseWithDefaults instantiates a new CreateCustomer400Response 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 + +### GetErrorCode + +`func (o *CreateCustomer400Response) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *CreateCustomer400Response) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *CreateCustomer400Response) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + + +### GetMessage + +`func (o *CreateCustomer400Response) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CreateCustomer400Response) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *CreateCustomer400Response) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + + +### SetMessageNil + +`func (o *CreateCustomer400Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *CreateCustomer400Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil +### GetErrors + +`func (o *CreateCustomer400Response) GetErrors() []map[string]interface{}` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *CreateCustomer400Response) GetErrorsOk() (*[]map[string]interface{}, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *CreateCustomer400Response) SetErrors(v []map[string]interface{})` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *CreateCustomer400Response) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/CreateCustomer400ResponseAllOf.md b/docs/customer/CreateCustomer400ResponseAllOf.md new file mode 100644 index 00000000..b778d162 --- /dev/null +++ b/docs/customer/CreateCustomer400ResponseAllOf.md @@ -0,0 +1,92 @@ +# CreateCustomer400ResponseAllOf + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | Pointer to **string** | | [optional] | +| **Message** | Pointer to **interface{}** | | [optional] | + +## Methods + +### NewCreateCustomer400ResponseAllOf + +`func NewCreateCustomer400ResponseAllOf() *CreateCustomer400ResponseAllOf` + +NewCreateCustomer400ResponseAllOf instantiates a new CreateCustomer400ResponseAllOf 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 + +### NewCreateCustomer400ResponseAllOfWithDefaults + +`func NewCreateCustomer400ResponseAllOfWithDefaults() *CreateCustomer400ResponseAllOf` + +NewCreateCustomer400ResponseAllOfWithDefaults instantiates a new CreateCustomer400ResponseAllOf 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 + +### GetErrorCode + +`func (o *CreateCustomer400ResponseAllOf) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *CreateCustomer400ResponseAllOf) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *CreateCustomer400ResponseAllOf) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + +### HasErrorCode + +`func (o *CreateCustomer400ResponseAllOf) HasErrorCode() bool` + +HasErrorCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *CreateCustomer400ResponseAllOf) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CreateCustomer400ResponseAllOf) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *CreateCustomer400ResponseAllOf) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CreateCustomer400ResponseAllOf) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *CreateCustomer400ResponseAllOf) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *CreateCustomer400ResponseAllOf) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/Customer.md b/docs/customer/Customer.md new file mode 100644 index 00000000..5ecea782 --- /dev/null +++ b/docs/customer/Customer.md @@ -0,0 +1,481 @@ +# Customer + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Type** | **string** | | [default to "INDIVIDUAL"] | +| **ReferenceId** | **string** | Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. | | +| **IndividualDetail** | [**NullableIndividualDetail**](IndividualDetail.md) | | | +| **BusinessDetail** | [**NullableBusinessDetail**](BusinessDetail.md) | | | +| **Description** | **NullableString** | | | +| **Email** | **NullableString** | | | +| **MobileNumber** | **NullableString** | | | +| **PhoneNumber** | **NullableString** | | | +| **Addresses** | [**Address[]**](Address.md) | | | +| **IdentityAccounts** | [**IdentityAccountResponse[]**](IdentityAccountResponse.md) | | | +| **KycDocuments** | [**KYCDocumentResponse[]**](KYCDocumentResponse.md) | | | +| **Metadata** | **map[string]interface{}** | | | +| **Status** | Pointer to [**NullableEndCustomerStatus**](EndCustomerStatus.md) | | [optional] | +| **Id** | **string** | | | +| **Created** | **time.Time** | | | +| **Updated** | **time.Time** | | | + +## Methods + +### NewCustomer + +`func NewCustomer(type_ string, referenceId string, individualDetail NullableIndividualDetail, businessDetail NullableBusinessDetail, description NullableString, email NullableString, mobileNumber NullableString, phoneNumber NullableString, addresses []Address, identityAccounts []IdentityAccountResponse, kycDocuments []KYCDocumentResponse, metadata map[string]interface{}, id string, created time.Time, updated time.Time, ) *Customer` + +NewCustomer instantiates a new Customer 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 + +### NewCustomerWithDefaults + +`func NewCustomerWithDefaults() *Customer` + +NewCustomerWithDefaults instantiates a new Customer 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 *Customer) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Customer) 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 *Customer) SetType(v string)` + +SetType sets Type field to given value. + + +### GetReferenceId + +`func (o *Customer) GetReferenceId() string` + +GetReferenceId returns the ReferenceId field if non-nil, zero value otherwise. + +### GetReferenceIdOk + +`func (o *Customer) GetReferenceIdOk() (*string, bool)` + +GetReferenceIdOk returns a tuple with the ReferenceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferenceId + +`func (o *Customer) SetReferenceId(v string)` + +SetReferenceId sets ReferenceId field to given value. + + +### GetIndividualDetail + +`func (o *Customer) GetIndividualDetail() IndividualDetail` + +GetIndividualDetail returns the IndividualDetail field if non-nil, zero value otherwise. + +### GetIndividualDetailOk + +`func (o *Customer) GetIndividualDetailOk() (*IndividualDetail, bool)` + +GetIndividualDetailOk returns a tuple with the IndividualDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndividualDetail + +`func (o *Customer) SetIndividualDetail(v IndividualDetail)` + +SetIndividualDetail sets IndividualDetail field to given value. + + +### SetIndividualDetailNil + +`func (o *Customer) SetIndividualDetailNil(b bool)` + + SetIndividualDetailNil sets the value for IndividualDetail to be an explicit nil + +### UnsetIndividualDetail +`func (o *Customer) UnsetIndividualDetail()` + +UnsetIndividualDetail ensures that no value is present for IndividualDetail, not even an explicit nil +### GetBusinessDetail + +`func (o *Customer) GetBusinessDetail() BusinessDetail` + +GetBusinessDetail returns the BusinessDetail field if non-nil, zero value otherwise. + +### GetBusinessDetailOk + +`func (o *Customer) GetBusinessDetailOk() (*BusinessDetail, bool)` + +GetBusinessDetailOk returns a tuple with the BusinessDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBusinessDetail + +`func (o *Customer) SetBusinessDetail(v BusinessDetail)` + +SetBusinessDetail sets BusinessDetail field to given value. + + +### SetBusinessDetailNil + +`func (o *Customer) SetBusinessDetailNil(b bool)` + + SetBusinessDetailNil sets the value for BusinessDetail to be an explicit nil + +### UnsetBusinessDetail +`func (o *Customer) UnsetBusinessDetail()` + +UnsetBusinessDetail ensures that no value is present for BusinessDetail, not even an explicit nil +### GetDescription + +`func (o *Customer) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Customer) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Customer) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### SetDescriptionNil + +`func (o *Customer) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *Customer) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetEmail + +`func (o *Customer) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *Customer) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *Customer) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### SetEmailNil + +`func (o *Customer) SetEmailNil(b bool)` + + SetEmailNil sets the value for Email to be an explicit nil + +### UnsetEmail +`func (o *Customer) UnsetEmail()` + +UnsetEmail ensures that no value is present for Email, not even an explicit nil +### GetMobileNumber + +`func (o *Customer) GetMobileNumber() string` + +GetMobileNumber returns the MobileNumber field if non-nil, zero value otherwise. + +### GetMobileNumberOk + +`func (o *Customer) GetMobileNumberOk() (*string, bool)` + +GetMobileNumberOk returns a tuple with the MobileNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMobileNumber + +`func (o *Customer) SetMobileNumber(v string)` + +SetMobileNumber sets MobileNumber field to given value. + + +### SetMobileNumberNil + +`func (o *Customer) SetMobileNumberNil(b bool)` + + SetMobileNumberNil sets the value for MobileNumber to be an explicit nil + +### UnsetMobileNumber +`func (o *Customer) UnsetMobileNumber()` + +UnsetMobileNumber ensures that no value is present for MobileNumber, not even an explicit nil +### GetPhoneNumber + +`func (o *Customer) GetPhoneNumber() string` + +GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. + +### GetPhoneNumberOk + +`func (o *Customer) GetPhoneNumberOk() (*string, bool)` + +GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhoneNumber + +`func (o *Customer) SetPhoneNumber(v string)` + +SetPhoneNumber sets PhoneNumber field to given value. + + +### SetPhoneNumberNil + +`func (o *Customer) SetPhoneNumberNil(b bool)` + + SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil + +### UnsetPhoneNumber +`func (o *Customer) UnsetPhoneNumber()` + +UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +### GetAddresses + +`func (o *Customer) GetAddresses() []Address` + +GetAddresses returns the Addresses field if non-nil, zero value otherwise. + +### GetAddressesOk + +`func (o *Customer) GetAddressesOk() (*[]Address, bool)` + +GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddresses + +`func (o *Customer) SetAddresses(v []Address)` + +SetAddresses sets Addresses field to given value. + + +### SetAddressesNil + +`func (o *Customer) SetAddressesNil(b bool)` + + SetAddressesNil sets the value for Addresses to be an explicit nil + +### UnsetAddresses +`func (o *Customer) UnsetAddresses()` + +UnsetAddresses ensures that no value is present for Addresses, not even an explicit nil +### GetIdentityAccounts + +`func (o *Customer) GetIdentityAccounts() []IdentityAccountResponse` + +GetIdentityAccounts returns the IdentityAccounts field if non-nil, zero value otherwise. + +### GetIdentityAccountsOk + +`func (o *Customer) GetIdentityAccountsOk() (*[]IdentityAccountResponse, bool)` + +GetIdentityAccountsOk returns a tuple with the IdentityAccounts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityAccounts + +`func (o *Customer) SetIdentityAccounts(v []IdentityAccountResponse)` + +SetIdentityAccounts sets IdentityAccounts field to given value. + + +### SetIdentityAccountsNil + +`func (o *Customer) SetIdentityAccountsNil(b bool)` + + SetIdentityAccountsNil sets the value for IdentityAccounts to be an explicit nil + +### UnsetIdentityAccounts +`func (o *Customer) UnsetIdentityAccounts()` + +UnsetIdentityAccounts ensures that no value is present for IdentityAccounts, not even an explicit nil +### GetKycDocuments + +`func (o *Customer) GetKycDocuments() []KYCDocumentResponse` + +GetKycDocuments returns the KycDocuments field if non-nil, zero value otherwise. + +### GetKycDocumentsOk + +`func (o *Customer) GetKycDocumentsOk() (*[]KYCDocumentResponse, bool)` + +GetKycDocumentsOk returns a tuple with the KycDocuments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKycDocuments + +`func (o *Customer) SetKycDocuments(v []KYCDocumentResponse)` + +SetKycDocuments sets KycDocuments field to given value. + + +### SetKycDocumentsNil + +`func (o *Customer) SetKycDocumentsNil(b bool)` + + SetKycDocumentsNil sets the value for KycDocuments to be an explicit nil + +### UnsetKycDocuments +`func (o *Customer) UnsetKycDocuments()` + +UnsetKycDocuments ensures that no value is present for KycDocuments, not even an explicit nil +### GetMetadata + +`func (o *Customer) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *Customer) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *Customer) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + + +### SetMetadataNil + +`func (o *Customer) SetMetadataNil(b bool)` + + SetMetadataNil sets the value for Metadata to be an explicit nil + +### UnsetMetadata +`func (o *Customer) UnsetMetadata()` + +UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil +### GetStatus + +`func (o *Customer) GetStatus() EndCustomerStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Customer) GetStatusOk() (*EndCustomerStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Customer) SetStatus(v EndCustomerStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Customer) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatusNil + +`func (o *Customer) SetStatusNil(b bool)` + + SetStatusNil sets the value for Status to be an explicit nil + +### UnsetStatus +`func (o *Customer) UnsetStatus()` + +UnsetStatus ensures that no value is present for Status, not even an explicit nil +### GetId + +`func (o *Customer) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Customer) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Customer) SetId(v string)` + +SetId sets Id field to given value. + + +### GetCreated + +`func (o *Customer) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Customer) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Customer) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetUpdated + +`func (o *Customer) GetUpdated() time.Time` + +GetUpdated returns the Updated field if non-nil, zero value otherwise. + +### GetUpdatedOk + +`func (o *Customer) GetUpdatedOk() (*time.Time, bool)` + +GetUpdatedOk returns a tuple with the Updated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdated + +`func (o *Customer) SetUpdated(v time.Time)` + +SetUpdated sets Updated field to given value. + + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/CustomerRequest.md b/docs/customer/CustomerRequest.md new file mode 100644 index 00000000..65d3deb7 --- /dev/null +++ b/docs/customer/CustomerRequest.md @@ -0,0 +1,393 @@ +# CustomerRequest + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ClientName** | Pointer to **string** | Entity's name for this client | [optional] | +| **ReferenceId** | **string** | Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. | | +| **Type** | Pointer to **string** | | [optional] [default to "INDIVIDUAL"] | +| **IndividualDetail** | Pointer to [**NullableIndividualDetail**](IndividualDetail.md) | | [optional] | +| **BusinessDetail** | Pointer to [**NullableBusinessDetail**](BusinessDetail.md) | | [optional] | +| **Description** | Pointer to **NullableString** | | [optional] | +| **Email** | Pointer to **string** | | [optional] | +| **MobileNumber** | Pointer to **string** | | [optional] | +| **PhoneNumber** | Pointer to **string** | | [optional] | +| **Addresses** | Pointer to [**AddressRequest[]**](AddressRequest.md) | | [optional] | +| **IdentityAccounts** | Pointer to [**IdentityAccountRequest[]**](IdentityAccountRequest.md) | | [optional] | +| **KycDocuments** | Pointer to [**KYCDocumentRequest[]**](KYCDocumentRequest.md) | | [optional] | +| **Metadata** | Pointer to **map[string]interface{}** | | [optional] | + +## Methods + +### NewCustomerRequest + +`func NewCustomerRequest(referenceId string, ) *CustomerRequest` + +NewCustomerRequest instantiates a new CustomerRequest 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 + +### NewCustomerRequestWithDefaults + +`func NewCustomerRequestWithDefaults() *CustomerRequest` + +NewCustomerRequestWithDefaults instantiates a new CustomerRequest 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 + +### GetClientName + +`func (o *CustomerRequest) GetClientName() string` + +GetClientName returns the ClientName field if non-nil, zero value otherwise. + +### GetClientNameOk + +`func (o *CustomerRequest) GetClientNameOk() (*string, bool)` + +GetClientNameOk returns a tuple with the ClientName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientName + +`func (o *CustomerRequest) SetClientName(v string)` + +SetClientName sets ClientName field to given value. + +### HasClientName + +`func (o *CustomerRequest) HasClientName() bool` + +HasClientName returns a boolean if a field has been set. + +### GetReferenceId + +`func (o *CustomerRequest) GetReferenceId() string` + +GetReferenceId returns the ReferenceId field if non-nil, zero value otherwise. + +### GetReferenceIdOk + +`func (o *CustomerRequest) GetReferenceIdOk() (*string, bool)` + +GetReferenceIdOk returns a tuple with the ReferenceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferenceId + +`func (o *CustomerRequest) SetReferenceId(v string)` + +SetReferenceId sets ReferenceId field to given value. + + +### GetType + +`func (o *CustomerRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CustomerRequest) 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 *CustomerRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CustomerRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetIndividualDetail + +`func (o *CustomerRequest) GetIndividualDetail() IndividualDetail` + +GetIndividualDetail returns the IndividualDetail field if non-nil, zero value otherwise. + +### GetIndividualDetailOk + +`func (o *CustomerRequest) GetIndividualDetailOk() (*IndividualDetail, bool)` + +GetIndividualDetailOk returns a tuple with the IndividualDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndividualDetail + +`func (o *CustomerRequest) SetIndividualDetail(v IndividualDetail)` + +SetIndividualDetail sets IndividualDetail field to given value. + +### HasIndividualDetail + +`func (o *CustomerRequest) HasIndividualDetail() bool` + +HasIndividualDetail returns a boolean if a field has been set. + +### SetIndividualDetailNil + +`func (o *CustomerRequest) SetIndividualDetailNil(b bool)` + + SetIndividualDetailNil sets the value for IndividualDetail to be an explicit nil + +### UnsetIndividualDetail +`func (o *CustomerRequest) UnsetIndividualDetail()` + +UnsetIndividualDetail ensures that no value is present for IndividualDetail, not even an explicit nil +### GetBusinessDetail + +`func (o *CustomerRequest) GetBusinessDetail() BusinessDetail` + +GetBusinessDetail returns the BusinessDetail field if non-nil, zero value otherwise. + +### GetBusinessDetailOk + +`func (o *CustomerRequest) GetBusinessDetailOk() (*BusinessDetail, bool)` + +GetBusinessDetailOk returns a tuple with the BusinessDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBusinessDetail + +`func (o *CustomerRequest) SetBusinessDetail(v BusinessDetail)` + +SetBusinessDetail sets BusinessDetail field to given value. + +### HasBusinessDetail + +`func (o *CustomerRequest) HasBusinessDetail() bool` + +HasBusinessDetail returns a boolean if a field has been set. + +### SetBusinessDetailNil + +`func (o *CustomerRequest) SetBusinessDetailNil(b bool)` + + SetBusinessDetailNil sets the value for BusinessDetail to be an explicit nil + +### UnsetBusinessDetail +`func (o *CustomerRequest) UnsetBusinessDetail()` + +UnsetBusinessDetail ensures that no value is present for BusinessDetail, not even an explicit nil +### GetDescription + +`func (o *CustomerRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CustomerRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CustomerRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CustomerRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *CustomerRequest) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *CustomerRequest) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetEmail + +`func (o *CustomerRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *CustomerRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *CustomerRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *CustomerRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetMobileNumber + +`func (o *CustomerRequest) GetMobileNumber() string` + +GetMobileNumber returns the MobileNumber field if non-nil, zero value otherwise. + +### GetMobileNumberOk + +`func (o *CustomerRequest) GetMobileNumberOk() (*string, bool)` + +GetMobileNumberOk returns a tuple with the MobileNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMobileNumber + +`func (o *CustomerRequest) SetMobileNumber(v string)` + +SetMobileNumber sets MobileNumber field to given value. + +### HasMobileNumber + +`func (o *CustomerRequest) HasMobileNumber() bool` + +HasMobileNumber returns a boolean if a field has been set. + +### GetPhoneNumber + +`func (o *CustomerRequest) GetPhoneNumber() string` + +GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. + +### GetPhoneNumberOk + +`func (o *CustomerRequest) GetPhoneNumberOk() (*string, bool)` + +GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhoneNumber + +`func (o *CustomerRequest) SetPhoneNumber(v string)` + +SetPhoneNumber sets PhoneNumber field to given value. + +### HasPhoneNumber + +`func (o *CustomerRequest) HasPhoneNumber() bool` + +HasPhoneNumber returns a boolean if a field has been set. + +### GetAddresses + +`func (o *CustomerRequest) GetAddresses() []AddressRequest` + +GetAddresses returns the Addresses field if non-nil, zero value otherwise. + +### GetAddressesOk + +`func (o *CustomerRequest) GetAddressesOk() (*[]AddressRequest, bool)` + +GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddresses + +`func (o *CustomerRequest) SetAddresses(v []AddressRequest)` + +SetAddresses sets Addresses field to given value. + +### HasAddresses + +`func (o *CustomerRequest) HasAddresses() bool` + +HasAddresses returns a boolean if a field has been set. + +### GetIdentityAccounts + +`func (o *CustomerRequest) GetIdentityAccounts() []IdentityAccountRequest` + +GetIdentityAccounts returns the IdentityAccounts field if non-nil, zero value otherwise. + +### GetIdentityAccountsOk + +`func (o *CustomerRequest) GetIdentityAccountsOk() (*[]IdentityAccountRequest, bool)` + +GetIdentityAccountsOk returns a tuple with the IdentityAccounts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityAccounts + +`func (o *CustomerRequest) SetIdentityAccounts(v []IdentityAccountRequest)` + +SetIdentityAccounts sets IdentityAccounts field to given value. + +### HasIdentityAccounts + +`func (o *CustomerRequest) HasIdentityAccounts() bool` + +HasIdentityAccounts returns a boolean if a field has been set. + +### GetKycDocuments + +`func (o *CustomerRequest) GetKycDocuments() []KYCDocumentRequest` + +GetKycDocuments returns the KycDocuments field if non-nil, zero value otherwise. + +### GetKycDocumentsOk + +`func (o *CustomerRequest) GetKycDocumentsOk() (*[]KYCDocumentRequest, bool)` + +GetKycDocumentsOk returns a tuple with the KycDocuments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKycDocuments + +`func (o *CustomerRequest) SetKycDocuments(v []KYCDocumentRequest)` + +SetKycDocuments sets KycDocuments field to given value. + +### HasKycDocuments + +`func (o *CustomerRequest) HasKycDocuments() bool` + +HasKycDocuments returns a boolean if a field has been set. + +### GetMetadata + +`func (o *CustomerRequest) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *CustomerRequest) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *CustomerRequest) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *CustomerRequest) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/EmploymentDetail.md b/docs/customer/EmploymentDetail.md new file mode 100644 index 00000000..5de9bc86 --- /dev/null +++ b/docs/customer/EmploymentDetail.md @@ -0,0 +1,138 @@ +# EmploymentDetail + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **EmployerName** | Pointer to **NullableString** | Name of employer | [optional] | +| **NatureOfBusiness** | Pointer to **NullableString** | Industry or nature of business | [optional] | +| **RoleDescription** | Pointer to **NullableString** | Occupation or title | [optional] | + +## Methods + +### NewEmploymentDetail + +`func NewEmploymentDetail() *EmploymentDetail` + +NewEmploymentDetail instantiates a new EmploymentDetail 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 + +### NewEmploymentDetailWithDefaults + +`func NewEmploymentDetailWithDefaults() *EmploymentDetail` + +NewEmploymentDetailWithDefaults instantiates a new EmploymentDetail 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 + +### GetEmployerName + +`func (o *EmploymentDetail) GetEmployerName() string` + +GetEmployerName returns the EmployerName field if non-nil, zero value otherwise. + +### GetEmployerNameOk + +`func (o *EmploymentDetail) GetEmployerNameOk() (*string, bool)` + +GetEmployerNameOk returns a tuple with the EmployerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmployerName + +`func (o *EmploymentDetail) SetEmployerName(v string)` + +SetEmployerName sets EmployerName field to given value. + +### HasEmployerName + +`func (o *EmploymentDetail) HasEmployerName() bool` + +HasEmployerName returns a boolean if a field has been set. + +### SetEmployerNameNil + +`func (o *EmploymentDetail) SetEmployerNameNil(b bool)` + + SetEmployerNameNil sets the value for EmployerName to be an explicit nil + +### UnsetEmployerName +`func (o *EmploymentDetail) UnsetEmployerName()` + +UnsetEmployerName ensures that no value is present for EmployerName, not even an explicit nil +### GetNatureOfBusiness + +`func (o *EmploymentDetail) GetNatureOfBusiness() string` + +GetNatureOfBusiness returns the NatureOfBusiness field if non-nil, zero value otherwise. + +### GetNatureOfBusinessOk + +`func (o *EmploymentDetail) GetNatureOfBusinessOk() (*string, bool)` + +GetNatureOfBusinessOk returns a tuple with the NatureOfBusiness field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNatureOfBusiness + +`func (o *EmploymentDetail) SetNatureOfBusiness(v string)` + +SetNatureOfBusiness sets NatureOfBusiness field to given value. + +### HasNatureOfBusiness + +`func (o *EmploymentDetail) HasNatureOfBusiness() bool` + +HasNatureOfBusiness returns a boolean if a field has been set. + +### SetNatureOfBusinessNil + +`func (o *EmploymentDetail) SetNatureOfBusinessNil(b bool)` + + SetNatureOfBusinessNil sets the value for NatureOfBusiness to be an explicit nil + +### UnsetNatureOfBusiness +`func (o *EmploymentDetail) UnsetNatureOfBusiness()` + +UnsetNatureOfBusiness ensures that no value is present for NatureOfBusiness, not even an explicit nil +### GetRoleDescription + +`func (o *EmploymentDetail) GetRoleDescription() string` + +GetRoleDescription returns the RoleDescription field if non-nil, zero value otherwise. + +### GetRoleDescriptionOk + +`func (o *EmploymentDetail) GetRoleDescriptionOk() (*string, bool)` + +GetRoleDescriptionOk returns a tuple with the RoleDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleDescription + +`func (o *EmploymentDetail) SetRoleDescription(v string)` + +SetRoleDescription sets RoleDescription field to given value. + +### HasRoleDescription + +`func (o *EmploymentDetail) HasRoleDescription() bool` + +HasRoleDescription returns a boolean if a field has been set. + +### SetRoleDescriptionNil + +`func (o *EmploymentDetail) SetRoleDescriptionNil(b bool)` + + SetRoleDescriptionNil sets the value for RoleDescription to be an explicit nil + +### UnsetRoleDescription +`func (o *EmploymentDetail) UnsetRoleDescription()` + +UnsetRoleDescription ensures that no value is present for RoleDescription, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/EndCustomerStatus.md b/docs/customer/EndCustomerStatus.md new file mode 100644 index 00000000..7bd18956 --- /dev/null +++ b/docs/customer/EndCustomerStatus.md @@ -0,0 +1,19 @@ +# EndCustomerStatus + +## Enum + + +* `ACTIVE` (value: `"ACTIVE"`) + +* `INACTIVE` (value: `"INACTIVE"`) + +* `PENDING` (value: `"PENDING"`) + +* `BLOCKED` (value: `"BLOCKED"`) + +* `DELETED` (value: `"DELETED"`) + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/Error.md b/docs/customer/Error.md new file mode 100644 index 00000000..66feff66 --- /dev/null +++ b/docs/customer/Error.md @@ -0,0 +1,98 @@ +# Error + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | **string** | | | +| **Message** | **string** | | | +| **Errors** | Pointer to **map[string]interface{}[]** | | [optional] | + +## Methods + +### NewError + +`func NewError(errorCode string, message string, ) *Error` + +NewError instantiates a new Error 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 + +### NewErrorWithDefaults + +`func NewErrorWithDefaults() *Error` + +NewErrorWithDefaults instantiates a new Error 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 + +### GetErrorCode + +`func (o *Error) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *Error) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *Error) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + + +### GetMessage + +`func (o *Error) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Error) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Error) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetErrors + +`func (o *Error) GetErrors() []map[string]interface{}` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *Error) GetErrorsOk() (*[]map[string]interface{}, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *Error) SetErrors(v []map[string]interface{})` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *Error) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/GetCustomerByReferenceID200Response.md b/docs/customer/GetCustomerByReferenceID200Response.md new file mode 100644 index 00000000..05368ae4 --- /dev/null +++ b/docs/customer/GetCustomerByReferenceID200Response.md @@ -0,0 +1,82 @@ +# GetCustomerByReferenceID200Response + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **HasMore** | Pointer to **bool** | | [optional] | +| **Data** | Pointer to [**Customer[]**](Customer.md) | | [optional] | + +## Methods + +### NewGetCustomerByReferenceID200Response + +`func NewGetCustomerByReferenceID200Response() *GetCustomerByReferenceID200Response` + +NewGetCustomerByReferenceID200Response instantiates a new GetCustomerByReferenceID200Response 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 + +### NewGetCustomerByReferenceID200ResponseWithDefaults + +`func NewGetCustomerByReferenceID200ResponseWithDefaults() *GetCustomerByReferenceID200Response` + +NewGetCustomerByReferenceID200ResponseWithDefaults instantiates a new GetCustomerByReferenceID200Response 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 + +### GetHasMore + +`func (o *GetCustomerByReferenceID200Response) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *GetCustomerByReferenceID200Response) GetHasMoreOk() (*bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasMore + +`func (o *GetCustomerByReferenceID200Response) SetHasMore(v bool)` + +SetHasMore sets HasMore field to given value. + +### HasHasMore + +`func (o *GetCustomerByReferenceID200Response) HasHasMore() bool` + +HasHasMore returns a boolean if a field has been set. + +### GetData + +`func (o *GetCustomerByReferenceID200Response) GetData() []Customer` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetCustomerByReferenceID200Response) GetDataOk() (*[]Customer, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetCustomerByReferenceID200Response) SetData(v []Customer)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetCustomerByReferenceID200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/GetCustomerByReferenceID400Response.md b/docs/customer/GetCustomerByReferenceID400Response.md new file mode 100644 index 00000000..00a57332 --- /dev/null +++ b/docs/customer/GetCustomerByReferenceID400Response.md @@ -0,0 +1,108 @@ +# GetCustomerByReferenceID400Response + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | **string** | | | +| **Message** | **interface{}** | | | +| **Errors** | Pointer to **map[string]interface{}[]** | | [optional] | + +## Methods + +### NewGetCustomerByReferenceID400Response + +`func NewGetCustomerByReferenceID400Response(errorCode string, message interface{}, ) *GetCustomerByReferenceID400Response` + +NewGetCustomerByReferenceID400Response instantiates a new GetCustomerByReferenceID400Response 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 + +### NewGetCustomerByReferenceID400ResponseWithDefaults + +`func NewGetCustomerByReferenceID400ResponseWithDefaults() *GetCustomerByReferenceID400Response` + +NewGetCustomerByReferenceID400ResponseWithDefaults instantiates a new GetCustomerByReferenceID400Response 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 + +### GetErrorCode + +`func (o *GetCustomerByReferenceID400Response) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *GetCustomerByReferenceID400Response) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *GetCustomerByReferenceID400Response) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + + +### GetMessage + +`func (o *GetCustomerByReferenceID400Response) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *GetCustomerByReferenceID400Response) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *GetCustomerByReferenceID400Response) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + + +### SetMessageNil + +`func (o *GetCustomerByReferenceID400Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *GetCustomerByReferenceID400Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil +### GetErrors + +`func (o *GetCustomerByReferenceID400Response) GetErrors() []map[string]interface{}` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *GetCustomerByReferenceID400Response) GetErrorsOk() (*[]map[string]interface{}, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *GetCustomerByReferenceID400Response) SetErrors(v []map[string]interface{})` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *GetCustomerByReferenceID400Response) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/GetCustomerByReferenceID400ResponseAllOf.md b/docs/customer/GetCustomerByReferenceID400ResponseAllOf.md new file mode 100644 index 00000000..4db30655 --- /dev/null +++ b/docs/customer/GetCustomerByReferenceID400ResponseAllOf.md @@ -0,0 +1,92 @@ +# GetCustomerByReferenceID400ResponseAllOf + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | Pointer to **string** | | [optional] | +| **Message** | Pointer to **interface{}** | | [optional] | + +## Methods + +### NewGetCustomerByReferenceID400ResponseAllOf + +`func NewGetCustomerByReferenceID400ResponseAllOf() *GetCustomerByReferenceID400ResponseAllOf` + +NewGetCustomerByReferenceID400ResponseAllOf instantiates a new GetCustomerByReferenceID400ResponseAllOf 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 + +### NewGetCustomerByReferenceID400ResponseAllOfWithDefaults + +`func NewGetCustomerByReferenceID400ResponseAllOfWithDefaults() *GetCustomerByReferenceID400ResponseAllOf` + +NewGetCustomerByReferenceID400ResponseAllOfWithDefaults instantiates a new GetCustomerByReferenceID400ResponseAllOf 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 + +### GetErrorCode + +`func (o *GetCustomerByReferenceID400ResponseAllOf) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *GetCustomerByReferenceID400ResponseAllOf) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *GetCustomerByReferenceID400ResponseAllOf) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + +### HasErrorCode + +`func (o *GetCustomerByReferenceID400ResponseAllOf) HasErrorCode() bool` + +HasErrorCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *GetCustomerByReferenceID400ResponseAllOf) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *GetCustomerByReferenceID400ResponseAllOf) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *GetCustomerByReferenceID400ResponseAllOf) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *GetCustomerByReferenceID400ResponseAllOf) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *GetCustomerByReferenceID400ResponseAllOf) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *GetCustomerByReferenceID400ResponseAllOf) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/IdentityAccountRequest.md b/docs/customer/IdentityAccountRequest.md new file mode 100644 index 00000000..14aa3a00 --- /dev/null +++ b/docs/customer/IdentityAccountRequest.md @@ -0,0 +1,170 @@ +# IdentityAccountRequest + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Type** | Pointer to [**IdentityAccountType**](IdentityAccountType.md) | | [optional] | +| **Company** | Pointer to **string** | The issuing institution associated with the account (e.g., OCBC, GOPAY, 7-11). If adding financial accounts that Xendit supports, we recommend you use the channel_name found at https://xendit.github.io/apireference/#payment-channels for this field | [optional] | +| **Description** | Pointer to **string** | Free text description of this account | [optional] | +| **Country** | Pointer to **NullableString** | ISO3166-2 country code | [optional] | +| **Properties** | Pointer to [**IdentityAccountRequestProperties**](IdentityAccountRequestProperties.md) | | [optional] | + +## Methods + +### NewIdentityAccountRequest + +`func NewIdentityAccountRequest() *IdentityAccountRequest` + +NewIdentityAccountRequest instantiates a new IdentityAccountRequest 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 + +### NewIdentityAccountRequestWithDefaults + +`func NewIdentityAccountRequestWithDefaults() *IdentityAccountRequest` + +NewIdentityAccountRequestWithDefaults instantiates a new IdentityAccountRequest 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 *IdentityAccountRequest) GetType() IdentityAccountType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IdentityAccountRequest) GetTypeOk() (*IdentityAccountType, 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 *IdentityAccountRequest) SetType(v IdentityAccountType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IdentityAccountRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCompany + +`func (o *IdentityAccountRequest) GetCompany() string` + +GetCompany returns the Company field if non-nil, zero value otherwise. + +### GetCompanyOk + +`func (o *IdentityAccountRequest) GetCompanyOk() (*string, bool)` + +GetCompanyOk returns a tuple with the Company field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCompany + +`func (o *IdentityAccountRequest) SetCompany(v string)` + +SetCompany sets Company field to given value. + +### HasCompany + +`func (o *IdentityAccountRequest) HasCompany() bool` + +HasCompany returns a boolean if a field has been set. + +### GetDescription + +`func (o *IdentityAccountRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IdentityAccountRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IdentityAccountRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *IdentityAccountRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetCountry + +`func (o *IdentityAccountRequest) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *IdentityAccountRequest) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *IdentityAccountRequest) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *IdentityAccountRequest) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### SetCountryNil + +`func (o *IdentityAccountRequest) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *IdentityAccountRequest) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil +### GetProperties + +`func (o *IdentityAccountRequest) GetProperties() IdentityAccountRequestProperties` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *IdentityAccountRequest) GetPropertiesOk() (*IdentityAccountRequestProperties, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *IdentityAccountRequest) SetProperties(v IdentityAccountRequestProperties)` + +SetProperties sets Properties field to given value. + +### HasProperties + +`func (o *IdentityAccountRequest) HasProperties() bool` + +HasProperties returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/IdentityAccountRequestProperties.md b/docs/customer/IdentityAccountRequestProperties.md new file mode 100644 index 00000000..a0fbe8c6 --- /dev/null +++ b/docs/customer/IdentityAccountRequestProperties.md @@ -0,0 +1,366 @@ +# IdentityAccountRequestProperties + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **AccountNumber** | Pointer to **string** | Unique account identifier as per the bank records. | [optional] | +| **AccountHolderName** | Pointer to **NullableString** | Name of account holder as per the cardless credit account. | [optional] | +| **SwiftCode** | Pointer to **NullableString** | The SWIFT code for international payments | [optional] | +| **AccountType** | Pointer to **NullableString** | Free text account type, e.g., Savings, Transaction, Virtual Account. | [optional] | +| **AccountDetails** | Pointer to **NullableString** | Potentially masked account detail, for display purposes only. | [optional] | +| **Currency** | Pointer to **string** | | [optional] | +| **TokenId** | Pointer to **string** | The token id returned in tokenisation | [optional] | +| **AccountId** | Pointer to **string** | Alphanumeric string identifying this account. Usually an email address or phone number. | [optional] | +| **PaymentCode** | Pointer to **string** | Complete fixed payment code (including prefix) | [optional] | +| **ExpiresAt** | Pointer to **NullableString** | YYYY-MM-DD string with expiry date for the payment code | [optional] | +| **QrString** | Pointer to **string** | String representation of the QR Code image | [optional] | + +## Methods + +### NewIdentityAccountRequestProperties + +`func NewIdentityAccountRequestProperties() *IdentityAccountRequestProperties` + +NewIdentityAccountRequestProperties instantiates a new IdentityAccountRequestProperties 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 + +### NewIdentityAccountRequestPropertiesWithDefaults + +`func NewIdentityAccountRequestPropertiesWithDefaults() *IdentityAccountRequestProperties` + +NewIdentityAccountRequestPropertiesWithDefaults instantiates a new IdentityAccountRequestProperties 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 + +### GetAccountNumber + +`func (o *IdentityAccountRequestProperties) GetAccountNumber() string` + +GetAccountNumber returns the AccountNumber field if non-nil, zero value otherwise. + +### GetAccountNumberOk + +`func (o *IdentityAccountRequestProperties) GetAccountNumberOk() (*string, bool)` + +GetAccountNumberOk returns a tuple with the AccountNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountNumber + +`func (o *IdentityAccountRequestProperties) SetAccountNumber(v string)` + +SetAccountNumber sets AccountNumber field to given value. + +### HasAccountNumber + +`func (o *IdentityAccountRequestProperties) HasAccountNumber() bool` + +HasAccountNumber returns a boolean if a field has been set. + +### GetAccountHolderName + +`func (o *IdentityAccountRequestProperties) GetAccountHolderName() string` + +GetAccountHolderName returns the AccountHolderName field if non-nil, zero value otherwise. + +### GetAccountHolderNameOk + +`func (o *IdentityAccountRequestProperties) GetAccountHolderNameOk() (*string, bool)` + +GetAccountHolderNameOk returns a tuple with the AccountHolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountHolderName + +`func (o *IdentityAccountRequestProperties) SetAccountHolderName(v string)` + +SetAccountHolderName sets AccountHolderName field to given value. + +### HasAccountHolderName + +`func (o *IdentityAccountRequestProperties) HasAccountHolderName() bool` + +HasAccountHolderName returns a boolean if a field has been set. + +### SetAccountHolderNameNil + +`func (o *IdentityAccountRequestProperties) SetAccountHolderNameNil(b bool)` + + SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil + +### UnsetAccountHolderName +`func (o *IdentityAccountRequestProperties) UnsetAccountHolderName()` + +UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +### GetSwiftCode + +`func (o *IdentityAccountRequestProperties) GetSwiftCode() string` + +GetSwiftCode returns the SwiftCode field if non-nil, zero value otherwise. + +### GetSwiftCodeOk + +`func (o *IdentityAccountRequestProperties) GetSwiftCodeOk() (*string, bool)` + +GetSwiftCodeOk returns a tuple with the SwiftCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSwiftCode + +`func (o *IdentityAccountRequestProperties) SetSwiftCode(v string)` + +SetSwiftCode sets SwiftCode field to given value. + +### HasSwiftCode + +`func (o *IdentityAccountRequestProperties) HasSwiftCode() bool` + +HasSwiftCode returns a boolean if a field has been set. + +### SetSwiftCodeNil + +`func (o *IdentityAccountRequestProperties) SetSwiftCodeNil(b bool)` + + SetSwiftCodeNil sets the value for SwiftCode to be an explicit nil + +### UnsetSwiftCode +`func (o *IdentityAccountRequestProperties) UnsetSwiftCode()` + +UnsetSwiftCode ensures that no value is present for SwiftCode, not even an explicit nil +### GetAccountType + +`func (o *IdentityAccountRequestProperties) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *IdentityAccountRequestProperties) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *IdentityAccountRequestProperties) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *IdentityAccountRequestProperties) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### SetAccountTypeNil + +`func (o *IdentityAccountRequestProperties) SetAccountTypeNil(b bool)` + + SetAccountTypeNil sets the value for AccountType to be an explicit nil + +### UnsetAccountType +`func (o *IdentityAccountRequestProperties) UnsetAccountType()` + +UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +### GetAccountDetails + +`func (o *IdentityAccountRequestProperties) GetAccountDetails() string` + +GetAccountDetails returns the AccountDetails field if non-nil, zero value otherwise. + +### GetAccountDetailsOk + +`func (o *IdentityAccountRequestProperties) GetAccountDetailsOk() (*string, bool)` + +GetAccountDetailsOk returns a tuple with the AccountDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountDetails + +`func (o *IdentityAccountRequestProperties) SetAccountDetails(v string)` + +SetAccountDetails sets AccountDetails field to given value. + +### HasAccountDetails + +`func (o *IdentityAccountRequestProperties) HasAccountDetails() bool` + +HasAccountDetails returns a boolean if a field has been set. + +### SetAccountDetailsNil + +`func (o *IdentityAccountRequestProperties) SetAccountDetailsNil(b bool)` + + SetAccountDetailsNil sets the value for AccountDetails to be an explicit nil + +### UnsetAccountDetails +`func (o *IdentityAccountRequestProperties) UnsetAccountDetails()` + +UnsetAccountDetails ensures that no value is present for AccountDetails, not even an explicit nil +### GetCurrency + +`func (o *IdentityAccountRequestProperties) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *IdentityAccountRequestProperties) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *IdentityAccountRequestProperties) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *IdentityAccountRequestProperties) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + +### GetTokenId + +`func (o *IdentityAccountRequestProperties) GetTokenId() string` + +GetTokenId returns the TokenId field if non-nil, zero value otherwise. + +### GetTokenIdOk + +`func (o *IdentityAccountRequestProperties) 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 *IdentityAccountRequestProperties) SetTokenId(v string)` + +SetTokenId sets TokenId field to given value. + +### HasTokenId + +`func (o *IdentityAccountRequestProperties) HasTokenId() bool` + +HasTokenId returns a boolean if a field has been set. + +### GetAccountId + +`func (o *IdentityAccountRequestProperties) GetAccountId() string` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *IdentityAccountRequestProperties) GetAccountIdOk() (*string, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *IdentityAccountRequestProperties) SetAccountId(v string)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *IdentityAccountRequestProperties) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### GetPaymentCode + +`func (o *IdentityAccountRequestProperties) GetPaymentCode() string` + +GetPaymentCode returns the PaymentCode field if non-nil, zero value otherwise. + +### GetPaymentCodeOk + +`func (o *IdentityAccountRequestProperties) GetPaymentCodeOk() (*string, bool)` + +GetPaymentCodeOk returns a tuple with the PaymentCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentCode + +`func (o *IdentityAccountRequestProperties) SetPaymentCode(v string)` + +SetPaymentCode sets PaymentCode field to given value. + +### HasPaymentCode + +`func (o *IdentityAccountRequestProperties) HasPaymentCode() bool` + +HasPaymentCode returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *IdentityAccountRequestProperties) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *IdentityAccountRequestProperties) GetExpiresAtOk() (*string, 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 *IdentityAccountRequestProperties) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *IdentityAccountRequestProperties) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### SetExpiresAtNil + +`func (o *IdentityAccountRequestProperties) SetExpiresAtNil(b bool)` + + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil + +### UnsetExpiresAt +`func (o *IdentityAccountRequestProperties) UnsetExpiresAt()` + +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetQrString + +`func (o *IdentityAccountRequestProperties) GetQrString() string` + +GetQrString returns the QrString field if non-nil, zero value otherwise. + +### GetQrStringOk + +`func (o *IdentityAccountRequestProperties) GetQrStringOk() (*string, bool)` + +GetQrStringOk returns a tuple with the QrString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQrString + +`func (o *IdentityAccountRequestProperties) SetQrString(v string)` + +SetQrString sets QrString field to given value. + +### HasQrString + +`func (o *IdentityAccountRequestProperties) HasQrString() bool` + +HasQrString returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/IdentityAccountResponse.md b/docs/customer/IdentityAccountResponse.md new file mode 100644 index 00000000..75f77dcd --- /dev/null +++ b/docs/customer/IdentityAccountResponse.md @@ -0,0 +1,299 @@ +# IdentityAccountResponse + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Id** | Pointer to **string** | | [optional] | +| **Code** | Pointer to **NullableString** | | [optional] | +| **Company** | **NullableString** | | | +| **Description** | **NullableString** | | | +| **Country** | **NullableString** | ISO3166-2 country code | | +| **HolderName** | Pointer to **NullableString** | | [optional] | +| **Type** | **NullableString** | | | +| **Properties** | [**IdentityAccountResponseProperties**](IdentityAccountResponseProperties.md) | | | +| **Created** | Pointer to **time.Time** | | [optional] | + +## Methods + +### NewIdentityAccountResponse + +`func NewIdentityAccountResponse(company NullableString, description NullableString, country NullableString, type_ NullableString, properties IdentityAccountResponseProperties, ) *IdentityAccountResponse` + +NewIdentityAccountResponse instantiates a new IdentityAccountResponse 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 + +### NewIdentityAccountResponseWithDefaults + +`func NewIdentityAccountResponseWithDefaults() *IdentityAccountResponse` + +NewIdentityAccountResponseWithDefaults instantiates a new IdentityAccountResponse 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 + +### GetId + +`func (o *IdentityAccountResponse) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IdentityAccountResponse) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IdentityAccountResponse) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *IdentityAccountResponse) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCode + +`func (o *IdentityAccountResponse) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *IdentityAccountResponse) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *IdentityAccountResponse) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *IdentityAccountResponse) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### SetCodeNil + +`func (o *IdentityAccountResponse) SetCodeNil(b bool)` + + SetCodeNil sets the value for Code to be an explicit nil + +### UnsetCode +`func (o *IdentityAccountResponse) UnsetCode()` + +UnsetCode ensures that no value is present for Code, not even an explicit nil +### GetCompany + +`func (o *IdentityAccountResponse) GetCompany() string` + +GetCompany returns the Company field if non-nil, zero value otherwise. + +### GetCompanyOk + +`func (o *IdentityAccountResponse) GetCompanyOk() (*string, bool)` + +GetCompanyOk returns a tuple with the Company field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCompany + +`func (o *IdentityAccountResponse) SetCompany(v string)` + +SetCompany sets Company field to given value. + + +### SetCompanyNil + +`func (o *IdentityAccountResponse) SetCompanyNil(b bool)` + + SetCompanyNil sets the value for Company to be an explicit nil + +### UnsetCompany +`func (o *IdentityAccountResponse) UnsetCompany()` + +UnsetCompany ensures that no value is present for Company, not even an explicit nil +### GetDescription + +`func (o *IdentityAccountResponse) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *IdentityAccountResponse) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *IdentityAccountResponse) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### SetDescriptionNil + +`func (o *IdentityAccountResponse) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *IdentityAccountResponse) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetCountry + +`func (o *IdentityAccountResponse) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *IdentityAccountResponse) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *IdentityAccountResponse) SetCountry(v string)` + +SetCountry sets Country field to given value. + + +### SetCountryNil + +`func (o *IdentityAccountResponse) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *IdentityAccountResponse) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil +### GetHolderName + +`func (o *IdentityAccountResponse) GetHolderName() string` + +GetHolderName returns the HolderName field if non-nil, zero value otherwise. + +### GetHolderNameOk + +`func (o *IdentityAccountResponse) GetHolderNameOk() (*string, bool)` + +GetHolderNameOk returns a tuple with the HolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHolderName + +`func (o *IdentityAccountResponse) SetHolderName(v string)` + +SetHolderName sets HolderName field to given value. + +### HasHolderName + +`func (o *IdentityAccountResponse) HasHolderName() bool` + +HasHolderName returns a boolean if a field has been set. + +### SetHolderNameNil + +`func (o *IdentityAccountResponse) SetHolderNameNil(b bool)` + + SetHolderNameNil sets the value for HolderName to be an explicit nil + +### UnsetHolderName +`func (o *IdentityAccountResponse) UnsetHolderName()` + +UnsetHolderName ensures that no value is present for HolderName, not even an explicit nil +### GetType + +`func (o *IdentityAccountResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IdentityAccountResponse) 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 *IdentityAccountResponse) SetType(v string)` + +SetType sets Type field to given value. + + +### SetTypeNil + +`func (o *IdentityAccountResponse) SetTypeNil(b bool)` + + SetTypeNil sets the value for Type to be an explicit nil + +### UnsetType +`func (o *IdentityAccountResponse) UnsetType()` + +UnsetType ensures that no value is present for Type, not even an explicit nil +### GetProperties + +`func (o *IdentityAccountResponse) GetProperties() IdentityAccountResponseProperties` + +GetProperties returns the Properties field if non-nil, zero value otherwise. + +### GetPropertiesOk + +`func (o *IdentityAccountResponse) GetPropertiesOk() (*IdentityAccountResponseProperties, bool)` + +GetPropertiesOk returns a tuple with the Properties field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProperties + +`func (o *IdentityAccountResponse) SetProperties(v IdentityAccountResponseProperties)` + +SetProperties sets Properties field to given value. + + +### GetCreated + +`func (o *IdentityAccountResponse) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *IdentityAccountResponse) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *IdentityAccountResponse) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + +### HasCreated + +`func (o *IdentityAccountResponse) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/IdentityAccountResponseProperties.md b/docs/customer/IdentityAccountResponseProperties.md new file mode 100644 index 00000000..28d04572 --- /dev/null +++ b/docs/customer/IdentityAccountResponseProperties.md @@ -0,0 +1,366 @@ +# IdentityAccountResponseProperties + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **AccountNumber** | Pointer to **string** | Unique account identifier as per the bank records. | [optional] | +| **AccountHolderName** | Pointer to **NullableString** | Name of account holder as per the cardless credit account. | [optional] | +| **SwiftCode** | Pointer to **NullableString** | The SWIFT code for international payments | [optional] | +| **AccountType** | Pointer to **NullableString** | Free text account type, e.g., Savings, Transaction, Virtual Account. | [optional] | +| **AccountDetails** | Pointer to **NullableString** | Potentially masked account detail, for display purposes only. | [optional] | +| **Currency** | Pointer to **string** | | [optional] | +| **TokenId** | Pointer to **string** | The token id returned in tokenisation | [optional] | +| **PaymentCode** | Pointer to **string** | Complete fixed payment code (including prefix) | [optional] | +| **ExpiresAt** | Pointer to **NullableString** | YYYY-MM-DD string with expiry date for the payment code | [optional] | +| **QrString** | Pointer to **string** | String representation of the QR Code image | [optional] | +| **AccountId** | Pointer to **string** | Alphanumeric string identifying this account. Usually an email address or phone number. | [optional] | + +## Methods + +### NewIdentityAccountResponseProperties + +`func NewIdentityAccountResponseProperties() *IdentityAccountResponseProperties` + +NewIdentityAccountResponseProperties instantiates a new IdentityAccountResponseProperties 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 + +### NewIdentityAccountResponsePropertiesWithDefaults + +`func NewIdentityAccountResponsePropertiesWithDefaults() *IdentityAccountResponseProperties` + +NewIdentityAccountResponsePropertiesWithDefaults instantiates a new IdentityAccountResponseProperties 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 + +### GetAccountNumber + +`func (o *IdentityAccountResponseProperties) GetAccountNumber() string` + +GetAccountNumber returns the AccountNumber field if non-nil, zero value otherwise. + +### GetAccountNumberOk + +`func (o *IdentityAccountResponseProperties) GetAccountNumberOk() (*string, bool)` + +GetAccountNumberOk returns a tuple with the AccountNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountNumber + +`func (o *IdentityAccountResponseProperties) SetAccountNumber(v string)` + +SetAccountNumber sets AccountNumber field to given value. + +### HasAccountNumber + +`func (o *IdentityAccountResponseProperties) HasAccountNumber() bool` + +HasAccountNumber returns a boolean if a field has been set. + +### GetAccountHolderName + +`func (o *IdentityAccountResponseProperties) GetAccountHolderName() string` + +GetAccountHolderName returns the AccountHolderName field if non-nil, zero value otherwise. + +### GetAccountHolderNameOk + +`func (o *IdentityAccountResponseProperties) GetAccountHolderNameOk() (*string, bool)` + +GetAccountHolderNameOk returns a tuple with the AccountHolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountHolderName + +`func (o *IdentityAccountResponseProperties) SetAccountHolderName(v string)` + +SetAccountHolderName sets AccountHolderName field to given value. + +### HasAccountHolderName + +`func (o *IdentityAccountResponseProperties) HasAccountHolderName() bool` + +HasAccountHolderName returns a boolean if a field has been set. + +### SetAccountHolderNameNil + +`func (o *IdentityAccountResponseProperties) SetAccountHolderNameNil(b bool)` + + SetAccountHolderNameNil sets the value for AccountHolderName to be an explicit nil + +### UnsetAccountHolderName +`func (o *IdentityAccountResponseProperties) UnsetAccountHolderName()` + +UnsetAccountHolderName ensures that no value is present for AccountHolderName, not even an explicit nil +### GetSwiftCode + +`func (o *IdentityAccountResponseProperties) GetSwiftCode() string` + +GetSwiftCode returns the SwiftCode field if non-nil, zero value otherwise. + +### GetSwiftCodeOk + +`func (o *IdentityAccountResponseProperties) GetSwiftCodeOk() (*string, bool)` + +GetSwiftCodeOk returns a tuple with the SwiftCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSwiftCode + +`func (o *IdentityAccountResponseProperties) SetSwiftCode(v string)` + +SetSwiftCode sets SwiftCode field to given value. + +### HasSwiftCode + +`func (o *IdentityAccountResponseProperties) HasSwiftCode() bool` + +HasSwiftCode returns a boolean if a field has been set. + +### SetSwiftCodeNil + +`func (o *IdentityAccountResponseProperties) SetSwiftCodeNil(b bool)` + + SetSwiftCodeNil sets the value for SwiftCode to be an explicit nil + +### UnsetSwiftCode +`func (o *IdentityAccountResponseProperties) UnsetSwiftCode()` + +UnsetSwiftCode ensures that no value is present for SwiftCode, not even an explicit nil +### GetAccountType + +`func (o *IdentityAccountResponseProperties) GetAccountType() string` + +GetAccountType returns the AccountType field if non-nil, zero value otherwise. + +### GetAccountTypeOk + +`func (o *IdentityAccountResponseProperties) GetAccountTypeOk() (*string, bool)` + +GetAccountTypeOk returns a tuple with the AccountType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountType + +`func (o *IdentityAccountResponseProperties) SetAccountType(v string)` + +SetAccountType sets AccountType field to given value. + +### HasAccountType + +`func (o *IdentityAccountResponseProperties) HasAccountType() bool` + +HasAccountType returns a boolean if a field has been set. + +### SetAccountTypeNil + +`func (o *IdentityAccountResponseProperties) SetAccountTypeNil(b bool)` + + SetAccountTypeNil sets the value for AccountType to be an explicit nil + +### UnsetAccountType +`func (o *IdentityAccountResponseProperties) UnsetAccountType()` + +UnsetAccountType ensures that no value is present for AccountType, not even an explicit nil +### GetAccountDetails + +`func (o *IdentityAccountResponseProperties) GetAccountDetails() string` + +GetAccountDetails returns the AccountDetails field if non-nil, zero value otherwise. + +### GetAccountDetailsOk + +`func (o *IdentityAccountResponseProperties) GetAccountDetailsOk() (*string, bool)` + +GetAccountDetailsOk returns a tuple with the AccountDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountDetails + +`func (o *IdentityAccountResponseProperties) SetAccountDetails(v string)` + +SetAccountDetails sets AccountDetails field to given value. + +### HasAccountDetails + +`func (o *IdentityAccountResponseProperties) HasAccountDetails() bool` + +HasAccountDetails returns a boolean if a field has been set. + +### SetAccountDetailsNil + +`func (o *IdentityAccountResponseProperties) SetAccountDetailsNil(b bool)` + + SetAccountDetailsNil sets the value for AccountDetails to be an explicit nil + +### UnsetAccountDetails +`func (o *IdentityAccountResponseProperties) UnsetAccountDetails()` + +UnsetAccountDetails ensures that no value is present for AccountDetails, not even an explicit nil +### GetCurrency + +`func (o *IdentityAccountResponseProperties) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *IdentityAccountResponseProperties) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *IdentityAccountResponseProperties) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *IdentityAccountResponseProperties) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + +### GetTokenId + +`func (o *IdentityAccountResponseProperties) GetTokenId() string` + +GetTokenId returns the TokenId field if non-nil, zero value otherwise. + +### GetTokenIdOk + +`func (o *IdentityAccountResponseProperties) 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 *IdentityAccountResponseProperties) SetTokenId(v string)` + +SetTokenId sets TokenId field to given value. + +### HasTokenId + +`func (o *IdentityAccountResponseProperties) HasTokenId() bool` + +HasTokenId returns a boolean if a field has been set. + +### GetPaymentCode + +`func (o *IdentityAccountResponseProperties) GetPaymentCode() string` + +GetPaymentCode returns the PaymentCode field if non-nil, zero value otherwise. + +### GetPaymentCodeOk + +`func (o *IdentityAccountResponseProperties) GetPaymentCodeOk() (*string, bool)` + +GetPaymentCodeOk returns a tuple with the PaymentCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentCode + +`func (o *IdentityAccountResponseProperties) SetPaymentCode(v string)` + +SetPaymentCode sets PaymentCode field to given value. + +### HasPaymentCode + +`func (o *IdentityAccountResponseProperties) HasPaymentCode() bool` + +HasPaymentCode returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *IdentityAccountResponseProperties) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *IdentityAccountResponseProperties) GetExpiresAtOk() (*string, 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 *IdentityAccountResponseProperties) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *IdentityAccountResponseProperties) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### SetExpiresAtNil + +`func (o *IdentityAccountResponseProperties) SetExpiresAtNil(b bool)` + + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil + +### UnsetExpiresAt +`func (o *IdentityAccountResponseProperties) UnsetExpiresAt()` + +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetQrString + +`func (o *IdentityAccountResponseProperties) GetQrString() string` + +GetQrString returns the QrString field if non-nil, zero value otherwise. + +### GetQrStringOk + +`func (o *IdentityAccountResponseProperties) GetQrStringOk() (*string, bool)` + +GetQrStringOk returns a tuple with the QrString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQrString + +`func (o *IdentityAccountResponseProperties) SetQrString(v string)` + +SetQrString sets QrString field to given value. + +### HasQrString + +`func (o *IdentityAccountResponseProperties) HasQrString() bool` + +HasQrString returns a boolean if a field has been set. + +### GetAccountId + +`func (o *IdentityAccountResponseProperties) GetAccountId() string` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *IdentityAccountResponseProperties) GetAccountIdOk() (*string, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *IdentityAccountResponseProperties) SetAccountId(v string)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *IdentityAccountResponseProperties) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/IdentityAccountType.md b/docs/customer/IdentityAccountType.md new file mode 100644 index 00000000..48e83eed --- /dev/null +++ b/docs/customer/IdentityAccountType.md @@ -0,0 +1,21 @@ +# IdentityAccountType + +## Enum + + +* `BANK_ACCOUNT` (value: `"BANK_ACCOUNT"`) + +* `EWALLET` (value: `"EWALLET"`) + +* `CREDIT_CARD` (value: `"CREDIT_CARD"`) + +* `PAY_LATER` (value: `"PAY_LATER"`) + +* `OTC` (value: `"OTC"`) + +* `QR_CODE` (value: `"QR_CODE"`) + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/IndividualDetail.md b/docs/customer/IndividualDetail.md new file mode 100644 index 00000000..23dbe3a4 --- /dev/null +++ b/docs/customer/IndividualDetail.md @@ -0,0 +1,416 @@ +# IndividualDetail + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **GivenNames** | Pointer to **string** | | [optional] | +| **GivenNamesNonRoman** | Pointer to **NullableString** | | [optional] | +| **MiddleName** | Pointer to **NullableString** | | [optional] | +| **Surname** | Pointer to **NullableString** | | [optional] | +| **SurnameNonRoman** | Pointer to **NullableString** | | [optional] | +| **MotherMaidenName** | Pointer to **NullableString** | | [optional] | +| **Gender** | Pointer to **NullableString** | | [optional] | +| **DateOfBirth** | Pointer to **NullableString** | | [optional] | +| **Nationality** | Pointer to **NullableString** | ISO3166-2 country code | [optional] | +| **PlaceOfBirth** | Pointer to **NullableString** | | [optional] | +| **Employment** | Pointer to [**NullableEmploymentDetail**](EmploymentDetail.md) | | [optional] | + +## Methods + +### NewIndividualDetail + +`func NewIndividualDetail() *IndividualDetail` + +NewIndividualDetail instantiates a new IndividualDetail 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 + +### NewIndividualDetailWithDefaults + +`func NewIndividualDetailWithDefaults() *IndividualDetail` + +NewIndividualDetailWithDefaults instantiates a new IndividualDetail 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 + +### GetGivenNames + +`func (o *IndividualDetail) GetGivenNames() string` + +GetGivenNames returns the GivenNames field if non-nil, zero value otherwise. + +### GetGivenNamesOk + +`func (o *IndividualDetail) GetGivenNamesOk() (*string, bool)` + +GetGivenNamesOk returns a tuple with the GivenNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGivenNames + +`func (o *IndividualDetail) SetGivenNames(v string)` + +SetGivenNames sets GivenNames field to given value. + +### HasGivenNames + +`func (o *IndividualDetail) HasGivenNames() bool` + +HasGivenNames returns a boolean if a field has been set. + +### GetGivenNamesNonRoman + +`func (o *IndividualDetail) GetGivenNamesNonRoman() string` + +GetGivenNamesNonRoman returns the GivenNamesNonRoman field if non-nil, zero value otherwise. + +### GetGivenNamesNonRomanOk + +`func (o *IndividualDetail) GetGivenNamesNonRomanOk() (*string, bool)` + +GetGivenNamesNonRomanOk returns a tuple with the GivenNamesNonRoman field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGivenNamesNonRoman + +`func (o *IndividualDetail) SetGivenNamesNonRoman(v string)` + +SetGivenNamesNonRoman sets GivenNamesNonRoman field to given value. + +### HasGivenNamesNonRoman + +`func (o *IndividualDetail) HasGivenNamesNonRoman() bool` + +HasGivenNamesNonRoman returns a boolean if a field has been set. + +### SetGivenNamesNonRomanNil + +`func (o *IndividualDetail) SetGivenNamesNonRomanNil(b bool)` + + SetGivenNamesNonRomanNil sets the value for GivenNamesNonRoman to be an explicit nil + +### UnsetGivenNamesNonRoman +`func (o *IndividualDetail) UnsetGivenNamesNonRoman()` + +UnsetGivenNamesNonRoman ensures that no value is present for GivenNamesNonRoman, not even an explicit nil +### GetMiddleName + +`func (o *IndividualDetail) GetMiddleName() string` + +GetMiddleName returns the MiddleName field if non-nil, zero value otherwise. + +### GetMiddleNameOk + +`func (o *IndividualDetail) GetMiddleNameOk() (*string, bool)` + +GetMiddleNameOk returns a tuple with the MiddleName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMiddleName + +`func (o *IndividualDetail) SetMiddleName(v string)` + +SetMiddleName sets MiddleName field to given value. + +### HasMiddleName + +`func (o *IndividualDetail) HasMiddleName() bool` + +HasMiddleName returns a boolean if a field has been set. + +### SetMiddleNameNil + +`func (o *IndividualDetail) SetMiddleNameNil(b bool)` + + SetMiddleNameNil sets the value for MiddleName to be an explicit nil + +### UnsetMiddleName +`func (o *IndividualDetail) UnsetMiddleName()` + +UnsetMiddleName ensures that no value is present for MiddleName, not even an explicit nil +### GetSurname + +`func (o *IndividualDetail) GetSurname() string` + +GetSurname returns the Surname field if non-nil, zero value otherwise. + +### GetSurnameOk + +`func (o *IndividualDetail) GetSurnameOk() (*string, bool)` + +GetSurnameOk returns a tuple with the Surname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSurname + +`func (o *IndividualDetail) SetSurname(v string)` + +SetSurname sets Surname field to given value. + +### HasSurname + +`func (o *IndividualDetail) HasSurname() bool` + +HasSurname returns a boolean if a field has been set. + +### SetSurnameNil + +`func (o *IndividualDetail) SetSurnameNil(b bool)` + + SetSurnameNil sets the value for Surname to be an explicit nil + +### UnsetSurname +`func (o *IndividualDetail) UnsetSurname()` + +UnsetSurname ensures that no value is present for Surname, not even an explicit nil +### GetSurnameNonRoman + +`func (o *IndividualDetail) GetSurnameNonRoman() string` + +GetSurnameNonRoman returns the SurnameNonRoman field if non-nil, zero value otherwise. + +### GetSurnameNonRomanOk + +`func (o *IndividualDetail) GetSurnameNonRomanOk() (*string, bool)` + +GetSurnameNonRomanOk returns a tuple with the SurnameNonRoman field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSurnameNonRoman + +`func (o *IndividualDetail) SetSurnameNonRoman(v string)` + +SetSurnameNonRoman sets SurnameNonRoman field to given value. + +### HasSurnameNonRoman + +`func (o *IndividualDetail) HasSurnameNonRoman() bool` + +HasSurnameNonRoman returns a boolean if a field has been set. + +### SetSurnameNonRomanNil + +`func (o *IndividualDetail) SetSurnameNonRomanNil(b bool)` + + SetSurnameNonRomanNil sets the value for SurnameNonRoman to be an explicit nil + +### UnsetSurnameNonRoman +`func (o *IndividualDetail) UnsetSurnameNonRoman()` + +UnsetSurnameNonRoman ensures that no value is present for SurnameNonRoman, not even an explicit nil +### GetMotherMaidenName + +`func (o *IndividualDetail) GetMotherMaidenName() string` + +GetMotherMaidenName returns the MotherMaidenName field if non-nil, zero value otherwise. + +### GetMotherMaidenNameOk + +`func (o *IndividualDetail) GetMotherMaidenNameOk() (*string, bool)` + +GetMotherMaidenNameOk returns a tuple with the MotherMaidenName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMotherMaidenName + +`func (o *IndividualDetail) SetMotherMaidenName(v string)` + +SetMotherMaidenName sets MotherMaidenName field to given value. + +### HasMotherMaidenName + +`func (o *IndividualDetail) HasMotherMaidenName() bool` + +HasMotherMaidenName returns a boolean if a field has been set. + +### SetMotherMaidenNameNil + +`func (o *IndividualDetail) SetMotherMaidenNameNil(b bool)` + + SetMotherMaidenNameNil sets the value for MotherMaidenName to be an explicit nil + +### UnsetMotherMaidenName +`func (o *IndividualDetail) UnsetMotherMaidenName()` + +UnsetMotherMaidenName ensures that no value is present for MotherMaidenName, not even an explicit nil +### GetGender + +`func (o *IndividualDetail) GetGender() string` + +GetGender returns the Gender field if non-nil, zero value otherwise. + +### GetGenderOk + +`func (o *IndividualDetail) GetGenderOk() (*string, bool)` + +GetGenderOk returns a tuple with the Gender field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGender + +`func (o *IndividualDetail) SetGender(v string)` + +SetGender sets Gender field to given value. + +### HasGender + +`func (o *IndividualDetail) HasGender() bool` + +HasGender returns a boolean if a field has been set. + +### SetGenderNil + +`func (o *IndividualDetail) SetGenderNil(b bool)` + + SetGenderNil sets the value for Gender to be an explicit nil + +### UnsetGender +`func (o *IndividualDetail) UnsetGender()` + +UnsetGender ensures that no value is present for Gender, not even an explicit nil +### GetDateOfBirth + +`func (o *IndividualDetail) GetDateOfBirth() string` + +GetDateOfBirth returns the DateOfBirth field if non-nil, zero value otherwise. + +### GetDateOfBirthOk + +`func (o *IndividualDetail) GetDateOfBirthOk() (*string, bool)` + +GetDateOfBirthOk returns a tuple with the DateOfBirth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDateOfBirth + +`func (o *IndividualDetail) SetDateOfBirth(v string)` + +SetDateOfBirth sets DateOfBirth field to given value. + +### HasDateOfBirth + +`func (o *IndividualDetail) HasDateOfBirth() bool` + +HasDateOfBirth returns a boolean if a field has been set. + +### SetDateOfBirthNil + +`func (o *IndividualDetail) SetDateOfBirthNil(b bool)` + + SetDateOfBirthNil sets the value for DateOfBirth to be an explicit nil + +### UnsetDateOfBirth +`func (o *IndividualDetail) UnsetDateOfBirth()` + +UnsetDateOfBirth ensures that no value is present for DateOfBirth, not even an explicit nil +### GetNationality + +`func (o *IndividualDetail) GetNationality() string` + +GetNationality returns the Nationality field if non-nil, zero value otherwise. + +### GetNationalityOk + +`func (o *IndividualDetail) GetNationalityOk() (*string, bool)` + +GetNationalityOk returns a tuple with the Nationality field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNationality + +`func (o *IndividualDetail) SetNationality(v string)` + +SetNationality sets Nationality field to given value. + +### HasNationality + +`func (o *IndividualDetail) HasNationality() bool` + +HasNationality returns a boolean if a field has been set. + +### SetNationalityNil + +`func (o *IndividualDetail) SetNationalityNil(b bool)` + + SetNationalityNil sets the value for Nationality to be an explicit nil + +### UnsetNationality +`func (o *IndividualDetail) UnsetNationality()` + +UnsetNationality ensures that no value is present for Nationality, not even an explicit nil +### GetPlaceOfBirth + +`func (o *IndividualDetail) GetPlaceOfBirth() string` + +GetPlaceOfBirth returns the PlaceOfBirth field if non-nil, zero value otherwise. + +### GetPlaceOfBirthOk + +`func (o *IndividualDetail) GetPlaceOfBirthOk() (*string, bool)` + +GetPlaceOfBirthOk returns a tuple with the PlaceOfBirth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlaceOfBirth + +`func (o *IndividualDetail) SetPlaceOfBirth(v string)` + +SetPlaceOfBirth sets PlaceOfBirth field to given value. + +### HasPlaceOfBirth + +`func (o *IndividualDetail) HasPlaceOfBirth() bool` + +HasPlaceOfBirth returns a boolean if a field has been set. + +### SetPlaceOfBirthNil + +`func (o *IndividualDetail) SetPlaceOfBirthNil(b bool)` + + SetPlaceOfBirthNil sets the value for PlaceOfBirth to be an explicit nil + +### UnsetPlaceOfBirth +`func (o *IndividualDetail) UnsetPlaceOfBirth()` + +UnsetPlaceOfBirth ensures that no value is present for PlaceOfBirth, not even an explicit nil +### GetEmployment + +`func (o *IndividualDetail) GetEmployment() EmploymentDetail` + +GetEmployment returns the Employment field if non-nil, zero value otherwise. + +### GetEmploymentOk + +`func (o *IndividualDetail) GetEmploymentOk() (*EmploymentDetail, bool)` + +GetEmploymentOk returns a tuple with the Employment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmployment + +`func (o *IndividualDetail) SetEmployment(v EmploymentDetail)` + +SetEmployment sets Employment field to given value. + +### HasEmployment + +`func (o *IndividualDetail) HasEmployment() bool` + +HasEmployment returns a boolean if a field has been set. + +### SetEmploymentNil + +`func (o *IndividualDetail) SetEmploymentNil(b bool)` + + SetEmploymentNil sets the value for Employment to be an explicit nil + +### UnsetEmployment +`func (o *IndividualDetail) UnsetEmployment()` + +UnsetEmployment ensures that no value is present for Employment, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/KYCDocumentRequest.md b/docs/customer/KYCDocumentRequest.md new file mode 100644 index 00000000..d55c3ef3 --- /dev/null +++ b/docs/customer/KYCDocumentRequest.md @@ -0,0 +1,258 @@ +# KYCDocumentRequest + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Country** | Pointer to **NullableString** | ISO3166-2 country code | [optional] | +| **Type** | Pointer to [**KYCDocumentType**](KYCDocumentType.md) | | [optional] | +| **SubType** | Pointer to [**NullableKYCDocumentSubType**](KYCDocumentSubType.md) | | [optional] | +| **DocumentName** | Pointer to **string** | | [optional] | +| **DocumentNumber** | Pointer to **string** | | [optional] | +| **ExpiresAt** | Pointer to **string** | | [optional] | +| **HolderName** | Pointer to **string** | | [optional] | +| **DocumentImages** | Pointer to **string[]** | | [optional] | + +## Methods + +### NewKYCDocumentRequest + +`func NewKYCDocumentRequest() *KYCDocumentRequest` + +NewKYCDocumentRequest instantiates a new KYCDocumentRequest 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 + +### NewKYCDocumentRequestWithDefaults + +`func NewKYCDocumentRequestWithDefaults() *KYCDocumentRequest` + +NewKYCDocumentRequestWithDefaults instantiates a new KYCDocumentRequest 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 + +### GetCountry + +`func (o *KYCDocumentRequest) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *KYCDocumentRequest) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *KYCDocumentRequest) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *KYCDocumentRequest) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### SetCountryNil + +`func (o *KYCDocumentRequest) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *KYCDocumentRequest) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil +### GetType + +`func (o *KYCDocumentRequest) GetType() KYCDocumentType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *KYCDocumentRequest) GetTypeOk() (*KYCDocumentType, 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 *KYCDocumentRequest) SetType(v KYCDocumentType)` + +SetType sets Type field to given value. + +### HasType + +`func (o *KYCDocumentRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSubType + +`func (o *KYCDocumentRequest) GetSubType() KYCDocumentSubType` + +GetSubType returns the SubType field if non-nil, zero value otherwise. + +### GetSubTypeOk + +`func (o *KYCDocumentRequest) GetSubTypeOk() (*KYCDocumentSubType, bool)` + +GetSubTypeOk returns a tuple with the SubType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubType + +`func (o *KYCDocumentRequest) SetSubType(v KYCDocumentSubType)` + +SetSubType sets SubType field to given value. + +### HasSubType + +`func (o *KYCDocumentRequest) HasSubType() bool` + +HasSubType returns a boolean if a field has been set. + +### SetSubTypeNil + +`func (o *KYCDocumentRequest) SetSubTypeNil(b bool)` + + SetSubTypeNil sets the value for SubType to be an explicit nil + +### UnsetSubType +`func (o *KYCDocumentRequest) UnsetSubType()` + +UnsetSubType ensures that no value is present for SubType, not even an explicit nil +### GetDocumentName + +`func (o *KYCDocumentRequest) GetDocumentName() string` + +GetDocumentName returns the DocumentName field if non-nil, zero value otherwise. + +### GetDocumentNameOk + +`func (o *KYCDocumentRequest) GetDocumentNameOk() (*string, bool)` + +GetDocumentNameOk returns a tuple with the DocumentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentName + +`func (o *KYCDocumentRequest) SetDocumentName(v string)` + +SetDocumentName sets DocumentName field to given value. + +### HasDocumentName + +`func (o *KYCDocumentRequest) HasDocumentName() bool` + +HasDocumentName returns a boolean if a field has been set. + +### GetDocumentNumber + +`func (o *KYCDocumentRequest) GetDocumentNumber() string` + +GetDocumentNumber returns the DocumentNumber field if non-nil, zero value otherwise. + +### GetDocumentNumberOk + +`func (o *KYCDocumentRequest) GetDocumentNumberOk() (*string, bool)` + +GetDocumentNumberOk returns a tuple with the DocumentNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentNumber + +`func (o *KYCDocumentRequest) SetDocumentNumber(v string)` + +SetDocumentNumber sets DocumentNumber field to given value. + +### HasDocumentNumber + +`func (o *KYCDocumentRequest) HasDocumentNumber() bool` + +HasDocumentNumber returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *KYCDocumentRequest) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *KYCDocumentRequest) GetExpiresAtOk() (*string, 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 *KYCDocumentRequest) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *KYCDocumentRequest) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetHolderName + +`func (o *KYCDocumentRequest) GetHolderName() string` + +GetHolderName returns the HolderName field if non-nil, zero value otherwise. + +### GetHolderNameOk + +`func (o *KYCDocumentRequest) GetHolderNameOk() (*string, bool)` + +GetHolderNameOk returns a tuple with the HolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHolderName + +`func (o *KYCDocumentRequest) SetHolderName(v string)` + +SetHolderName sets HolderName field to given value. + +### HasHolderName + +`func (o *KYCDocumentRequest) HasHolderName() bool` + +HasHolderName returns a boolean if a field has been set. + +### GetDocumentImages + +`func (o *KYCDocumentRequest) GetDocumentImages() []string` + +GetDocumentImages returns the DocumentImages field if non-nil, zero value otherwise. + +### GetDocumentImagesOk + +`func (o *KYCDocumentRequest) GetDocumentImagesOk() (*[]string, bool)` + +GetDocumentImagesOk returns a tuple with the DocumentImages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentImages + +`func (o *KYCDocumentRequest) SetDocumentImages(v []string)` + +SetDocumentImages sets DocumentImages field to given value. + +### HasDocumentImages + +`func (o *KYCDocumentRequest) HasDocumentImages() bool` + +HasDocumentImages returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/KYCDocumentResponse.md b/docs/customer/KYCDocumentResponse.md new file mode 100644 index 00000000..27f5357a --- /dev/null +++ b/docs/customer/KYCDocumentResponse.md @@ -0,0 +1,248 @@ +# KYCDocumentResponse + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **Country** | **string** | | | +| **Type** | [**KYCDocumentType**](KYCDocumentType.md) | | | +| **SubType** | [**KYCDocumentSubType**](KYCDocumentSubType.md) | | | +| **DocumentName** | **NullableString** | | | +| **DocumentNumber** | **NullableString** | | | +| **ExpiresAt** | **NullableString** | | | +| **HolderName** | **NullableString** | | | +| **DocumentImages** | **string[]** | | | + +## Methods + +### NewKYCDocumentResponse + +`func NewKYCDocumentResponse(country string, type_ KYCDocumentType, subType KYCDocumentSubType, documentName NullableString, documentNumber NullableString, expiresAt NullableString, holderName NullableString, documentImages []string, ) *KYCDocumentResponse` + +NewKYCDocumentResponse instantiates a new KYCDocumentResponse 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 + +### NewKYCDocumentResponseWithDefaults + +`func NewKYCDocumentResponseWithDefaults() *KYCDocumentResponse` + +NewKYCDocumentResponseWithDefaults instantiates a new KYCDocumentResponse 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 + +### GetCountry + +`func (o *KYCDocumentResponse) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *KYCDocumentResponse) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *KYCDocumentResponse) SetCountry(v string)` + +SetCountry sets Country field to given value. + + +### GetType + +`func (o *KYCDocumentResponse) GetType() KYCDocumentType` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *KYCDocumentResponse) GetTypeOk() (*KYCDocumentType, 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 *KYCDocumentResponse) SetType(v KYCDocumentType)` + +SetType sets Type field to given value. + + +### GetSubType + +`func (o *KYCDocumentResponse) GetSubType() KYCDocumentSubType` + +GetSubType returns the SubType field if non-nil, zero value otherwise. + +### GetSubTypeOk + +`func (o *KYCDocumentResponse) GetSubTypeOk() (*KYCDocumentSubType, bool)` + +GetSubTypeOk returns a tuple with the SubType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubType + +`func (o *KYCDocumentResponse) SetSubType(v KYCDocumentSubType)` + +SetSubType sets SubType field to given value. + + +### GetDocumentName + +`func (o *KYCDocumentResponse) GetDocumentName() string` + +GetDocumentName returns the DocumentName field if non-nil, zero value otherwise. + +### GetDocumentNameOk + +`func (o *KYCDocumentResponse) GetDocumentNameOk() (*string, bool)` + +GetDocumentNameOk returns a tuple with the DocumentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentName + +`func (o *KYCDocumentResponse) SetDocumentName(v string)` + +SetDocumentName sets DocumentName field to given value. + + +### SetDocumentNameNil + +`func (o *KYCDocumentResponse) SetDocumentNameNil(b bool)` + + SetDocumentNameNil sets the value for DocumentName to be an explicit nil + +### UnsetDocumentName +`func (o *KYCDocumentResponse) UnsetDocumentName()` + +UnsetDocumentName ensures that no value is present for DocumentName, not even an explicit nil +### GetDocumentNumber + +`func (o *KYCDocumentResponse) GetDocumentNumber() string` + +GetDocumentNumber returns the DocumentNumber field if non-nil, zero value otherwise. + +### GetDocumentNumberOk + +`func (o *KYCDocumentResponse) GetDocumentNumberOk() (*string, bool)` + +GetDocumentNumberOk returns a tuple with the DocumentNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentNumber + +`func (o *KYCDocumentResponse) SetDocumentNumber(v string)` + +SetDocumentNumber sets DocumentNumber field to given value. + + +### SetDocumentNumberNil + +`func (o *KYCDocumentResponse) SetDocumentNumberNil(b bool)` + + SetDocumentNumberNil sets the value for DocumentNumber to be an explicit nil + +### UnsetDocumentNumber +`func (o *KYCDocumentResponse) UnsetDocumentNumber()` + +UnsetDocumentNumber ensures that no value is present for DocumentNumber, not even an explicit nil +### GetExpiresAt + +`func (o *KYCDocumentResponse) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *KYCDocumentResponse) GetExpiresAtOk() (*string, 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 *KYCDocumentResponse) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + + +### SetExpiresAtNil + +`func (o *KYCDocumentResponse) SetExpiresAtNil(b bool)` + + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil + +### UnsetExpiresAt +`func (o *KYCDocumentResponse) UnsetExpiresAt()` + +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetHolderName + +`func (o *KYCDocumentResponse) GetHolderName() string` + +GetHolderName returns the HolderName field if non-nil, zero value otherwise. + +### GetHolderNameOk + +`func (o *KYCDocumentResponse) GetHolderNameOk() (*string, bool)` + +GetHolderNameOk returns a tuple with the HolderName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHolderName + +`func (o *KYCDocumentResponse) SetHolderName(v string)` + +SetHolderName sets HolderName field to given value. + + +### SetHolderNameNil + +`func (o *KYCDocumentResponse) SetHolderNameNil(b bool)` + + SetHolderNameNil sets the value for HolderName to be an explicit nil + +### UnsetHolderName +`func (o *KYCDocumentResponse) UnsetHolderName()` + +UnsetHolderName ensures that no value is present for HolderName, not even an explicit nil +### GetDocumentImages + +`func (o *KYCDocumentResponse) GetDocumentImages() []string` + +GetDocumentImages returns the DocumentImages field if non-nil, zero value otherwise. + +### GetDocumentImagesOk + +`func (o *KYCDocumentResponse) GetDocumentImagesOk() (*[]string, bool)` + +GetDocumentImagesOk returns a tuple with the DocumentImages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentImages + +`func (o *KYCDocumentResponse) SetDocumentImages(v []string)` + +SetDocumentImages sets DocumentImages field to given value. + + +### SetDocumentImagesNil + +`func (o *KYCDocumentResponse) SetDocumentImagesNil(b bool)` + + SetDocumentImagesNil sets the value for DocumentImages to be an explicit nil + +### UnsetDocumentImages +`func (o *KYCDocumentResponse) UnsetDocumentImages()` + +UnsetDocumentImages ensures that no value is present for DocumentImages, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/KYCDocumentSubType.md b/docs/customer/KYCDocumentSubType.md new file mode 100644 index 00000000..2ae5b2df --- /dev/null +++ b/docs/customer/KYCDocumentSubType.md @@ -0,0 +1,29 @@ +# KYCDocumentSubType + +## Enum + + +* `NATIONAL_ID` (value: `"NATIONAL_ID"`) + +* `CONSULAR_ID` (value: `"CONSULAR_ID"`) + +* `VOTER_ID` (value: `"VOTER_ID"`) + +* `POSTAL_ID` (value: `"POSTAL_ID"`) + +* `RESIDENCE_PERMIT` (value: `"RESIDENCE_PERMIT"`) + +* `TAX_ID` (value: `"TAX_ID"`) + +* `STUDENT_ID` (value: `"STUDENT_ID"`) + +* `MILITARY_ID` (value: `"MILITARY_ID"`) + +* `MEDICAL_ID` (value: `"MEDICAL_ID"`) + +* `OTHERS` (value: `"OTHERS"`) + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/KYCDocumentType.md b/docs/customer/KYCDocumentType.md new file mode 100644 index 00000000..9722f993 --- /dev/null +++ b/docs/customer/KYCDocumentType.md @@ -0,0 +1,25 @@ +# KYCDocumentType + +## Enum + + +* `BIRTH_CERTIFICATE` (value: `"BIRTH_CERTIFICATE"`) + +* `BANK_STATEMENT` (value: `"BANK_STATEMENT"`) + +* `DRIVING_LICENSE` (value: `"DRIVING_LICENSE"`) + +* `IDENTITY_CARD` (value: `"IDENTITY_CARD"`) + +* `PASSPORT` (value: `"PASSPORT"`) + +* `VISA` (value: `"VISA"`) + +* `BUSINESS_REGISTRATION` (value: `"BUSINESS_REGISTRATION"`) + +* `BUSINESS_LICENSE` (value: `"BUSINESS_LICENSE"`) + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/PatchCustomer.md b/docs/customer/PatchCustomer.md new file mode 100644 index 00000000..cff91706 --- /dev/null +++ b/docs/customer/PatchCustomer.md @@ -0,0 +1,498 @@ +# PatchCustomer + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ClientName** | Pointer to **NullableString** | Entity's name for this client | [optional] | +| **ReferenceId** | Pointer to **NullableString** | Merchant's reference of this end customer, eg Merchant's user's id. Must be unique. | [optional] | +| **IndividualDetail** | Pointer to [**NullableIndividualDetail**](IndividualDetail.md) | | [optional] | +| **BusinessDetail** | Pointer to [**NullableBusinessDetail**](BusinessDetail.md) | | [optional] | +| **Description** | Pointer to **NullableString** | | [optional] | +| **Email** | Pointer to **NullableString** | | [optional] | +| **MobileNumber** | Pointer to **NullableString** | | [optional] | +| **PhoneNumber** | Pointer to **NullableString** | | [optional] | +| **Metadata** | Pointer to **map[string]interface{}** | | [optional] | +| **Addresses** | Pointer to [**AddressRequest[]**](AddressRequest.md) | | [optional] | +| **IdentityAccounts** | Pointer to [**IdentityAccountRequest[]**](IdentityAccountRequest.md) | | [optional] | +| **KycDocuments** | Pointer to [**KYCDocumentRequest[]**](KYCDocumentRequest.md) | | [optional] | +| **Status** | Pointer to [**NullableEndCustomerStatus**](EndCustomerStatus.md) | | [optional] | + +## Methods + +### NewPatchCustomer + +`func NewPatchCustomer() *PatchCustomer` + +NewPatchCustomer instantiates a new PatchCustomer 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 + +### NewPatchCustomerWithDefaults + +`func NewPatchCustomerWithDefaults() *PatchCustomer` + +NewPatchCustomerWithDefaults instantiates a new PatchCustomer 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 + +### GetClientName + +`func (o *PatchCustomer) GetClientName() string` + +GetClientName returns the ClientName field if non-nil, zero value otherwise. + +### GetClientNameOk + +`func (o *PatchCustomer) GetClientNameOk() (*string, bool)` + +GetClientNameOk returns a tuple with the ClientName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientName + +`func (o *PatchCustomer) SetClientName(v string)` + +SetClientName sets ClientName field to given value. + +### HasClientName + +`func (o *PatchCustomer) HasClientName() bool` + +HasClientName returns a boolean if a field has been set. + +### SetClientNameNil + +`func (o *PatchCustomer) SetClientNameNil(b bool)` + + SetClientNameNil sets the value for ClientName to be an explicit nil + +### UnsetClientName +`func (o *PatchCustomer) UnsetClientName()` + +UnsetClientName ensures that no value is present for ClientName, not even an explicit nil +### GetReferenceId + +`func (o *PatchCustomer) GetReferenceId() string` + +GetReferenceId returns the ReferenceId field if non-nil, zero value otherwise. + +### GetReferenceIdOk + +`func (o *PatchCustomer) GetReferenceIdOk() (*string, bool)` + +GetReferenceIdOk returns a tuple with the ReferenceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferenceId + +`func (o *PatchCustomer) SetReferenceId(v string)` + +SetReferenceId sets ReferenceId field to given value. + +### HasReferenceId + +`func (o *PatchCustomer) HasReferenceId() bool` + +HasReferenceId returns a boolean if a field has been set. + +### SetReferenceIdNil + +`func (o *PatchCustomer) SetReferenceIdNil(b bool)` + + SetReferenceIdNil sets the value for ReferenceId to be an explicit nil + +### UnsetReferenceId +`func (o *PatchCustomer) UnsetReferenceId()` + +UnsetReferenceId ensures that no value is present for ReferenceId, not even an explicit nil +### GetIndividualDetail + +`func (o *PatchCustomer) GetIndividualDetail() IndividualDetail` + +GetIndividualDetail returns the IndividualDetail field if non-nil, zero value otherwise. + +### GetIndividualDetailOk + +`func (o *PatchCustomer) GetIndividualDetailOk() (*IndividualDetail, bool)` + +GetIndividualDetailOk returns a tuple with the IndividualDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndividualDetail + +`func (o *PatchCustomer) SetIndividualDetail(v IndividualDetail)` + +SetIndividualDetail sets IndividualDetail field to given value. + +### HasIndividualDetail + +`func (o *PatchCustomer) HasIndividualDetail() bool` + +HasIndividualDetail returns a boolean if a field has been set. + +### SetIndividualDetailNil + +`func (o *PatchCustomer) SetIndividualDetailNil(b bool)` + + SetIndividualDetailNil sets the value for IndividualDetail to be an explicit nil + +### UnsetIndividualDetail +`func (o *PatchCustomer) UnsetIndividualDetail()` + +UnsetIndividualDetail ensures that no value is present for IndividualDetail, not even an explicit nil +### GetBusinessDetail + +`func (o *PatchCustomer) GetBusinessDetail() BusinessDetail` + +GetBusinessDetail returns the BusinessDetail field if non-nil, zero value otherwise. + +### GetBusinessDetailOk + +`func (o *PatchCustomer) GetBusinessDetailOk() (*BusinessDetail, bool)` + +GetBusinessDetailOk returns a tuple with the BusinessDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBusinessDetail + +`func (o *PatchCustomer) SetBusinessDetail(v BusinessDetail)` + +SetBusinessDetail sets BusinessDetail field to given value. + +### HasBusinessDetail + +`func (o *PatchCustomer) HasBusinessDetail() bool` + +HasBusinessDetail returns a boolean if a field has been set. + +### SetBusinessDetailNil + +`func (o *PatchCustomer) SetBusinessDetailNil(b bool)` + + SetBusinessDetailNil sets the value for BusinessDetail to be an explicit nil + +### UnsetBusinessDetail +`func (o *PatchCustomer) UnsetBusinessDetail()` + +UnsetBusinessDetail ensures that no value is present for BusinessDetail, not even an explicit nil +### GetDescription + +`func (o *PatchCustomer) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchCustomer) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchCustomer) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchCustomer) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *PatchCustomer) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *PatchCustomer) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetEmail + +`func (o *PatchCustomer) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *PatchCustomer) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *PatchCustomer) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *PatchCustomer) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmailNil + +`func (o *PatchCustomer) SetEmailNil(b bool)` + + SetEmailNil sets the value for Email to be an explicit nil + +### UnsetEmail +`func (o *PatchCustomer) UnsetEmail()` + +UnsetEmail ensures that no value is present for Email, not even an explicit nil +### GetMobileNumber + +`func (o *PatchCustomer) GetMobileNumber() string` + +GetMobileNumber returns the MobileNumber field if non-nil, zero value otherwise. + +### GetMobileNumberOk + +`func (o *PatchCustomer) GetMobileNumberOk() (*string, bool)` + +GetMobileNumberOk returns a tuple with the MobileNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMobileNumber + +`func (o *PatchCustomer) SetMobileNumber(v string)` + +SetMobileNumber sets MobileNumber field to given value. + +### HasMobileNumber + +`func (o *PatchCustomer) HasMobileNumber() bool` + +HasMobileNumber returns a boolean if a field has been set. + +### SetMobileNumberNil + +`func (o *PatchCustomer) SetMobileNumberNil(b bool)` + + SetMobileNumberNil sets the value for MobileNumber to be an explicit nil + +### UnsetMobileNumber +`func (o *PatchCustomer) UnsetMobileNumber()` + +UnsetMobileNumber ensures that no value is present for MobileNumber, not even an explicit nil +### GetPhoneNumber + +`func (o *PatchCustomer) GetPhoneNumber() string` + +GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. + +### GetPhoneNumberOk + +`func (o *PatchCustomer) GetPhoneNumberOk() (*string, bool)` + +GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhoneNumber + +`func (o *PatchCustomer) SetPhoneNumber(v string)` + +SetPhoneNumber sets PhoneNumber field to given value. + +### HasPhoneNumber + +`func (o *PatchCustomer) HasPhoneNumber() bool` + +HasPhoneNumber returns a boolean if a field has been set. + +### SetPhoneNumberNil + +`func (o *PatchCustomer) SetPhoneNumberNil(b bool)` + + SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil + +### UnsetPhoneNumber +`func (o *PatchCustomer) UnsetPhoneNumber()` + +UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil +### GetMetadata + +`func (o *PatchCustomer) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *PatchCustomer) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *PatchCustomer) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *PatchCustomer) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### SetMetadataNil + +`func (o *PatchCustomer) SetMetadataNil(b bool)` + + SetMetadataNil sets the value for Metadata to be an explicit nil + +### UnsetMetadata +`func (o *PatchCustomer) UnsetMetadata()` + +UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil +### GetAddresses + +`func (o *PatchCustomer) GetAddresses() []AddressRequest` + +GetAddresses returns the Addresses field if non-nil, zero value otherwise. + +### GetAddressesOk + +`func (o *PatchCustomer) GetAddressesOk() (*[]AddressRequest, bool)` + +GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddresses + +`func (o *PatchCustomer) SetAddresses(v []AddressRequest)` + +SetAddresses sets Addresses field to given value. + +### HasAddresses + +`func (o *PatchCustomer) HasAddresses() bool` + +HasAddresses returns a boolean if a field has been set. + +### SetAddressesNil + +`func (o *PatchCustomer) SetAddressesNil(b bool)` + + SetAddressesNil sets the value for Addresses to be an explicit nil + +### UnsetAddresses +`func (o *PatchCustomer) UnsetAddresses()` + +UnsetAddresses ensures that no value is present for Addresses, not even an explicit nil +### GetIdentityAccounts + +`func (o *PatchCustomer) GetIdentityAccounts() []IdentityAccountRequest` + +GetIdentityAccounts returns the IdentityAccounts field if non-nil, zero value otherwise. + +### GetIdentityAccountsOk + +`func (o *PatchCustomer) GetIdentityAccountsOk() (*[]IdentityAccountRequest, bool)` + +GetIdentityAccountsOk returns a tuple with the IdentityAccounts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentityAccounts + +`func (o *PatchCustomer) SetIdentityAccounts(v []IdentityAccountRequest)` + +SetIdentityAccounts sets IdentityAccounts field to given value. + +### HasIdentityAccounts + +`func (o *PatchCustomer) HasIdentityAccounts() bool` + +HasIdentityAccounts returns a boolean if a field has been set. + +### SetIdentityAccountsNil + +`func (o *PatchCustomer) SetIdentityAccountsNil(b bool)` + + SetIdentityAccountsNil sets the value for IdentityAccounts to be an explicit nil + +### UnsetIdentityAccounts +`func (o *PatchCustomer) UnsetIdentityAccounts()` + +UnsetIdentityAccounts ensures that no value is present for IdentityAccounts, not even an explicit nil +### GetKycDocuments + +`func (o *PatchCustomer) GetKycDocuments() []KYCDocumentRequest` + +GetKycDocuments returns the KycDocuments field if non-nil, zero value otherwise. + +### GetKycDocumentsOk + +`func (o *PatchCustomer) GetKycDocumentsOk() (*[]KYCDocumentRequest, bool)` + +GetKycDocumentsOk returns a tuple with the KycDocuments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKycDocuments + +`func (o *PatchCustomer) SetKycDocuments(v []KYCDocumentRequest)` + +SetKycDocuments sets KycDocuments field to given value. + +### HasKycDocuments + +`func (o *PatchCustomer) HasKycDocuments() bool` + +HasKycDocuments returns a boolean if a field has been set. + +### SetKycDocumentsNil + +`func (o *PatchCustomer) SetKycDocumentsNil(b bool)` + + SetKycDocumentsNil sets the value for KycDocuments to be an explicit nil + +### UnsetKycDocuments +`func (o *PatchCustomer) UnsetKycDocuments()` + +UnsetKycDocuments ensures that no value is present for KycDocuments, not even an explicit nil +### GetStatus + +`func (o *PatchCustomer) GetStatus() EndCustomerStatus` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PatchCustomer) GetStatusOk() (*EndCustomerStatus, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *PatchCustomer) SetStatus(v EndCustomerStatus)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PatchCustomer) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatusNil + +`func (o *PatchCustomer) SetStatusNil(b bool)` + + SetStatusNil sets the value for Status to be an explicit nil + +### UnsetStatus +`func (o *PatchCustomer) UnsetStatus()` + +UnsetStatus ensures that no value is present for Status, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/ResponseDataNotFound.md b/docs/customer/ResponseDataNotFound.md new file mode 100644 index 00000000..3a9064d4 --- /dev/null +++ b/docs/customer/ResponseDataNotFound.md @@ -0,0 +1,92 @@ +# ResponseDataNotFound + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | Pointer to **string** | | [optional] | +| **Message** | Pointer to **interface{}** | | [optional] | + +## Methods + +### NewResponseDataNotFound + +`func NewResponseDataNotFound() *ResponseDataNotFound` + +NewResponseDataNotFound instantiates a new ResponseDataNotFound 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 + +### NewResponseDataNotFoundWithDefaults + +`func NewResponseDataNotFoundWithDefaults() *ResponseDataNotFound` + +NewResponseDataNotFoundWithDefaults instantiates a new ResponseDataNotFound 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 + +### GetErrorCode + +`func (o *ResponseDataNotFound) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *ResponseDataNotFound) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *ResponseDataNotFound) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + +### HasErrorCode + +`func (o *ResponseDataNotFound) HasErrorCode() bool` + +HasErrorCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *ResponseDataNotFound) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ResponseDataNotFound) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ResponseDataNotFound) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ResponseDataNotFound) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *ResponseDataNotFound) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *ResponseDataNotFound) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/UpdateCustomer400Response.md b/docs/customer/UpdateCustomer400Response.md new file mode 100644 index 00000000..34511f38 --- /dev/null +++ b/docs/customer/UpdateCustomer400Response.md @@ -0,0 +1,108 @@ +# UpdateCustomer400Response + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | **string** | | | +| **Message** | **interface{}** | | | +| **Errors** | Pointer to **map[string]interface{}[]** | | [optional] | + +## Methods + +### NewUpdateCustomer400Response + +`func NewUpdateCustomer400Response(errorCode string, message interface{}, ) *UpdateCustomer400Response` + +NewUpdateCustomer400Response instantiates a new UpdateCustomer400Response 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 + +### NewUpdateCustomer400ResponseWithDefaults + +`func NewUpdateCustomer400ResponseWithDefaults() *UpdateCustomer400Response` + +NewUpdateCustomer400ResponseWithDefaults instantiates a new UpdateCustomer400Response 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 + +### GetErrorCode + +`func (o *UpdateCustomer400Response) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *UpdateCustomer400Response) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *UpdateCustomer400Response) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + + +### GetMessage + +`func (o *UpdateCustomer400Response) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UpdateCustomer400Response) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UpdateCustomer400Response) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + + +### SetMessageNil + +`func (o *UpdateCustomer400Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *UpdateCustomer400Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil +### GetErrors + +`func (o *UpdateCustomer400Response) GetErrors() []map[string]interface{}` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *UpdateCustomer400Response) GetErrorsOk() (*[]map[string]interface{}, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *UpdateCustomer400Response) SetErrors(v []map[string]interface{})` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *UpdateCustomer400Response) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[Back to README]](../../README.md) + + diff --git a/docs/customer/UpdateCustomer400ResponseAllOf.md b/docs/customer/UpdateCustomer400ResponseAllOf.md new file mode 100644 index 00000000..d48ba8c1 --- /dev/null +++ b/docs/customer/UpdateCustomer400ResponseAllOf.md @@ -0,0 +1,92 @@ +# UpdateCustomer400ResponseAllOf + +## Properties + +| Name | Type | Description | Notes | +| ------------ | ------------- | ------------- | ------------- | +| **ErrorCode** | Pointer to **string** | | [optional] | +| **Message** | Pointer to **interface{}** | | [optional] | + +## Methods + +### NewUpdateCustomer400ResponseAllOf + +`func NewUpdateCustomer400ResponseAllOf() *UpdateCustomer400ResponseAllOf` + +NewUpdateCustomer400ResponseAllOf instantiates a new UpdateCustomer400ResponseAllOf 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 + +### NewUpdateCustomer400ResponseAllOfWithDefaults + +`func NewUpdateCustomer400ResponseAllOfWithDefaults() *UpdateCustomer400ResponseAllOf` + +NewUpdateCustomer400ResponseAllOfWithDefaults instantiates a new UpdateCustomer400ResponseAllOf 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 + +### GetErrorCode + +`func (o *UpdateCustomer400ResponseAllOf) GetErrorCode() string` + +GetErrorCode returns the ErrorCode field if non-nil, zero value otherwise. + +### GetErrorCodeOk + +`func (o *UpdateCustomer400ResponseAllOf) GetErrorCodeOk() (*string, bool)` + +GetErrorCodeOk returns a tuple with the ErrorCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorCode + +`func (o *UpdateCustomer400ResponseAllOf) SetErrorCode(v string)` + +SetErrorCode sets ErrorCode field to given value. + +### HasErrorCode + +`func (o *UpdateCustomer400ResponseAllOf) HasErrorCode() bool` + +HasErrorCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *UpdateCustomer400ResponseAllOf) GetMessage() interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UpdateCustomer400ResponseAllOf) GetMessageOk() (*interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UpdateCustomer400ResponseAllOf) SetMessage(v interface{})` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *UpdateCustomer400ResponseAllOf) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *UpdateCustomer400ResponseAllOf) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *UpdateCustomer400ResponseAllOf) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to README]](../../README.md) + + diff --git a/docs/payment_method.yaml b/docs/payment_method.yaml index 2e0c6be8..9488fd9a 100644 --- a/docs/payment_method.yaml +++ b/docs/payment_method.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: description: This API is used for Payment Method Service v2 title: Payment Method Service v2 - version: 2.87.2 + version: 2.89.1 servers: - description: Xendit API Server url: https://api.xendit.co @@ -581,58 +581,6 @@ paths: summary: Returns payments with matching PaymentMethodID. tags: - payment_method - /v2/payment_methods/channels: - get: - description: Get all payment channels - operationId: getAllPaymentChannels - parameters: - - explode: true - in: query - name: is_activated - required: false - schema: - default: true - enum: - - true - - false - type: boolean - style: form - - explode: true - in: query - name: type - required: false - schema: - example: DIRECT_DEBIT - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentChannelList' - description: Request successful - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/getAllPaymentMethods_400_response' - description: Bad request - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/getAllPaymentMethods_403_response' - description: Forbidden due to permissions - default: - content: - application/json: - schema: - $ref: '#/components/schemas/getAllPaymentMethods_default_response' - description: Internal server error - summary: Get all payment channels - tags: - - payment_method /v2/payment_methods/{paymentMethodId}/payments/simulate: post: description: Makes payment with matching PaymentMethodID. @@ -2137,40 +2085,6 @@ components: required: - auth_code type: object - ChannelProperty: - allOf: - - $ref: '#/components/schemas/ChannelProperty_allOf' - ChannelAmountLimits: - allOf: - - $ref: '#/components/schemas/ChannelAmountLimits_allOf' - PaymentChannel: - allOf: - - $ref: '#/components/schemas/PaymentChannel_allOf' - PaymentChannelList: - example: - data: - - null - - null - links: - - null - - null - has_more: true - properties: - data: - description: Array of resources that match the provided filters - items: - $ref: '#/components/schemas/PaymentChannel' - type: array - links: - description: Array of objects that can be used to assist on navigating through - the data - items: - $ref: '#/components/schemas/PaymentChannelList_links_inner' - type: array - has_more: - description: Indicates whether there are more items in the list - type: boolean - type: object getAllPaymentMethods_400_response: properties: error_code: @@ -2305,91 +2219,3 @@ components: - expiry_month - expiry_year type: object - ChannelProperty_allOf: - description: Objects that enumerate the parameters needed as `channel_properties` - when creating a Payment Method - properties: - name: - description: The corresponding parameter name - type: string - type: - description: Data type of the parameter - type: string - is_required: - description: Indicates whether or not the parameter is required - type: boolean - type: object - example: null - ChannelAmountLimits_allOf: - description: Contains objects of the support currencies and its respective limits - per transaction - properties: - currency: - description: Currency supported by the payment channel - type: string - min_limit: - description: The minimum allowed transaction amount for the payment channel - type: number - max_limit: - description: The minimum allowed transaction amount for the payment channel - type: number - type: object - example: null - PaymentChannel_allOf: - properties: - channel_code: - description: The specific Xendit code used to identify the partner channel - example: BPI - type: string - type: - description: The payment method type - example: DIRECT_DEBIT - type: string - country: - description: The country where the channel operates in ISO 3166-2 country - code - example: PH - type: string - channel_name: - description: Official parter name of the payment channel - example: Bank of the Philippine Islands - type: string - channel_properties: - items: - $ref: '#/components/schemas/ChannelProperty' - type: array - logo_url: - description: "If available, this contains a URL to the logo of the partner\ - \ channel" - type: string - amount_limits: - items: - $ref: '#/components/schemas/ChannelAmountLimits' - type: array - type: object - example: null - PaymentChannelList_links_inner_allOf: - properties: - href: - description: Target URI that should contain a target to Internationalized - Resource Identifiers (IRI) - example: /v2/payment_methods/channels?is_activated=true - type: string - rel: - description: The link relation type described how the current context (source) - is related to target resource - enum: - - first - - last - - next - - prev - example: next - type: string - method: - description: The HTTP method to be used to call `href` - example: GET - type: string - type: object - PaymentChannelList_links_inner: - allOf: - - $ref: '#/components/schemas/PaymentChannelList_links_inner_allOf' diff --git a/docs/payment_method/ChannelAmountLimits.md b/docs/payment_method/ChannelAmountLimits.md deleted file mode 100644 index d0a96649..00000000 --- a/docs/payment_method/ChannelAmountLimits.md +++ /dev/null @@ -1,108 +0,0 @@ -# ChannelAmountLimits - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Currency** | Pointer to **string** | Currency supported by the payment channel | [optional] | -| **MinLimit** | Pointer to **float32** | The minimum allowed transaction amount for the payment channel | [optional] | -| **MaxLimit** | Pointer to **float32** | The minimum allowed transaction amount for the payment channel | [optional] | - -## Methods - -### NewChannelAmountLimits - -`func NewChannelAmountLimits() *ChannelAmountLimits` - -NewChannelAmountLimits instantiates a new ChannelAmountLimits 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 - -### NewChannelAmountLimitsWithDefaults - -`func NewChannelAmountLimitsWithDefaults() *ChannelAmountLimits` - -NewChannelAmountLimitsWithDefaults instantiates a new ChannelAmountLimits 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 - -### GetCurrency - -`func (o *ChannelAmountLimits) GetCurrency() string` - -GetCurrency returns the Currency field if non-nil, zero value otherwise. - -### GetCurrencyOk - -`func (o *ChannelAmountLimits) GetCurrencyOk() (*string, bool)` - -GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCurrency - -`func (o *ChannelAmountLimits) SetCurrency(v string)` - -SetCurrency sets Currency field to given value. - -### HasCurrency - -`func (o *ChannelAmountLimits) HasCurrency() bool` - -HasCurrency returns a boolean if a field has been set. - -### GetMinLimit - -`func (o *ChannelAmountLimits) GetMinLimit() float32` - -GetMinLimit returns the MinLimit field if non-nil, zero value otherwise. - -### GetMinLimitOk - -`func (o *ChannelAmountLimits) GetMinLimitOk() (*float32, bool)` - -GetMinLimitOk returns a tuple with the MinLimit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMinLimit - -`func (o *ChannelAmountLimits) SetMinLimit(v float32)` - -SetMinLimit sets MinLimit field to given value. - -### HasMinLimit - -`func (o *ChannelAmountLimits) HasMinLimit() bool` - -HasMinLimit returns a boolean if a field has been set. - -### GetMaxLimit - -`func (o *ChannelAmountLimits) GetMaxLimit() float32` - -GetMaxLimit returns the MaxLimit field if non-nil, zero value otherwise. - -### GetMaxLimitOk - -`func (o *ChannelAmountLimits) GetMaxLimitOk() (*float32, bool)` - -GetMaxLimitOk returns a tuple with the MaxLimit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxLimit - -`func (o *ChannelAmountLimits) SetMaxLimit(v float32)` - -SetMaxLimit sets MaxLimit field to given value. - -### HasMaxLimit - -`func (o *ChannelAmountLimits) HasMaxLimit() bool` - -HasMaxLimit returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/ChannelAmountLimitsAllOf.md b/docs/payment_method/ChannelAmountLimitsAllOf.md deleted file mode 100644 index 4544e427..00000000 --- a/docs/payment_method/ChannelAmountLimitsAllOf.md +++ /dev/null @@ -1,108 +0,0 @@ -# ChannelAmountLimitsAllOf - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Currency** | Pointer to **string** | Currency supported by the payment channel | [optional] | -| **MinLimit** | Pointer to **float32** | The minimum allowed transaction amount for the payment channel | [optional] | -| **MaxLimit** | Pointer to **float32** | The minimum allowed transaction amount for the payment channel | [optional] | - -## Methods - -### NewChannelAmountLimitsAllOf - -`func NewChannelAmountLimitsAllOf() *ChannelAmountLimitsAllOf` - -NewChannelAmountLimitsAllOf instantiates a new ChannelAmountLimitsAllOf 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 - -### NewChannelAmountLimitsAllOfWithDefaults - -`func NewChannelAmountLimitsAllOfWithDefaults() *ChannelAmountLimitsAllOf` - -NewChannelAmountLimitsAllOfWithDefaults instantiates a new ChannelAmountLimitsAllOf 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 - -### GetCurrency - -`func (o *ChannelAmountLimitsAllOf) GetCurrency() string` - -GetCurrency returns the Currency field if non-nil, zero value otherwise. - -### GetCurrencyOk - -`func (o *ChannelAmountLimitsAllOf) GetCurrencyOk() (*string, bool)` - -GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCurrency - -`func (o *ChannelAmountLimitsAllOf) SetCurrency(v string)` - -SetCurrency sets Currency field to given value. - -### HasCurrency - -`func (o *ChannelAmountLimitsAllOf) HasCurrency() bool` - -HasCurrency returns a boolean if a field has been set. - -### GetMinLimit - -`func (o *ChannelAmountLimitsAllOf) GetMinLimit() float32` - -GetMinLimit returns the MinLimit field if non-nil, zero value otherwise. - -### GetMinLimitOk - -`func (o *ChannelAmountLimitsAllOf) GetMinLimitOk() (*float32, bool)` - -GetMinLimitOk returns a tuple with the MinLimit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMinLimit - -`func (o *ChannelAmountLimitsAllOf) SetMinLimit(v float32)` - -SetMinLimit sets MinLimit field to given value. - -### HasMinLimit - -`func (o *ChannelAmountLimitsAllOf) HasMinLimit() bool` - -HasMinLimit returns a boolean if a field has been set. - -### GetMaxLimit - -`func (o *ChannelAmountLimitsAllOf) GetMaxLimit() float32` - -GetMaxLimit returns the MaxLimit field if non-nil, zero value otherwise. - -### GetMaxLimitOk - -`func (o *ChannelAmountLimitsAllOf) GetMaxLimitOk() (*float32, bool)` - -GetMaxLimitOk returns a tuple with the MaxLimit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxLimit - -`func (o *ChannelAmountLimitsAllOf) SetMaxLimit(v float32)` - -SetMaxLimit sets MaxLimit field to given value. - -### HasMaxLimit - -`func (o *ChannelAmountLimitsAllOf) HasMaxLimit() bool` - -HasMaxLimit returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/ChannelProperty.md b/docs/payment_method/ChannelProperty.md deleted file mode 100644 index 8023ab12..00000000 --- a/docs/payment_method/ChannelProperty.md +++ /dev/null @@ -1,108 +0,0 @@ -# ChannelProperty - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Name** | Pointer to **string** | The corresponding parameter name | [optional] | -| **Type** | Pointer to **string** | Data type of the parameter | [optional] | -| **IsRequired** | Pointer to **bool** | Indicates whether or not the parameter is required | [optional] | - -## Methods - -### NewChannelProperty - -`func NewChannelProperty() *ChannelProperty` - -NewChannelProperty instantiates a new ChannelProperty 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 - -### NewChannelPropertyWithDefaults - -`func NewChannelPropertyWithDefaults() *ChannelProperty` - -NewChannelPropertyWithDefaults instantiates a new ChannelProperty 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 - -### GetName - -`func (o *ChannelProperty) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ChannelProperty) 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 *ChannelProperty) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ChannelProperty) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetType - -`func (o *ChannelProperty) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *ChannelProperty) 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 *ChannelProperty) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *ChannelProperty) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetIsRequired - -`func (o *ChannelProperty) GetIsRequired() bool` - -GetIsRequired returns the IsRequired field if non-nil, zero value otherwise. - -### GetIsRequiredOk - -`func (o *ChannelProperty) GetIsRequiredOk() (*bool, bool)` - -GetIsRequiredOk returns a tuple with the IsRequired field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsRequired - -`func (o *ChannelProperty) SetIsRequired(v bool)` - -SetIsRequired sets IsRequired field to given value. - -### HasIsRequired - -`func (o *ChannelProperty) HasIsRequired() bool` - -HasIsRequired returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/ChannelPropertyAllOf.md b/docs/payment_method/ChannelPropertyAllOf.md deleted file mode 100644 index 0624c4b4..00000000 --- a/docs/payment_method/ChannelPropertyAllOf.md +++ /dev/null @@ -1,108 +0,0 @@ -# ChannelPropertyAllOf - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Name** | Pointer to **string** | The corresponding parameter name | [optional] | -| **Type** | Pointer to **string** | Data type of the parameter | [optional] | -| **IsRequired** | Pointer to **bool** | Indicates whether or not the parameter is required | [optional] | - -## Methods - -### NewChannelPropertyAllOf - -`func NewChannelPropertyAllOf() *ChannelPropertyAllOf` - -NewChannelPropertyAllOf instantiates a new ChannelPropertyAllOf 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 - -### NewChannelPropertyAllOfWithDefaults - -`func NewChannelPropertyAllOfWithDefaults() *ChannelPropertyAllOf` - -NewChannelPropertyAllOfWithDefaults instantiates a new ChannelPropertyAllOf 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 - -### GetName - -`func (o *ChannelPropertyAllOf) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ChannelPropertyAllOf) 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 *ChannelPropertyAllOf) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ChannelPropertyAllOf) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetType - -`func (o *ChannelPropertyAllOf) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *ChannelPropertyAllOf) 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 *ChannelPropertyAllOf) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *ChannelPropertyAllOf) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetIsRequired - -`func (o *ChannelPropertyAllOf) GetIsRequired() bool` - -GetIsRequired returns the IsRequired field if non-nil, zero value otherwise. - -### GetIsRequiredOk - -`func (o *ChannelPropertyAllOf) GetIsRequiredOk() (*bool, bool)` - -GetIsRequiredOk returns a tuple with the IsRequired field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsRequired - -`func (o *ChannelPropertyAllOf) SetIsRequired(v bool)` - -SetIsRequired sets IsRequired field to given value. - -### HasIsRequired - -`func (o *ChannelPropertyAllOf) HasIsRequired() bool` - -HasIsRequired returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/PaymentChannel.md b/docs/payment_method/PaymentChannel.md deleted file mode 100644 index 74530869..00000000 --- a/docs/payment_method/PaymentChannel.md +++ /dev/null @@ -1,212 +0,0 @@ -# PaymentChannel - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **ChannelCode** | Pointer to **string** | The specific Xendit code used to identify the partner channel | [optional] | -| **Type** | Pointer to **string** | The payment method type | [optional] | -| **Country** | Pointer to **string** | The country where the channel operates in ISO 3166-2 country code | [optional] | -| **ChannelName** | Pointer to **string** | Official parter name of the payment channel | [optional] | -| **ChannelProperties** | Pointer to [**ChannelProperty[]**](ChannelProperty.md) | | [optional] | -| **LogoUrl** | Pointer to **string** | If available, this contains a URL to the logo of the partner channel | [optional] | -| **AmountLimits** | Pointer to [**ChannelAmountLimits[]**](ChannelAmountLimits.md) | | [optional] | - -## Methods - -### NewPaymentChannel - -`func NewPaymentChannel() *PaymentChannel` - -NewPaymentChannel instantiates a new PaymentChannel 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 - -### NewPaymentChannelWithDefaults - -`func NewPaymentChannelWithDefaults() *PaymentChannel` - -NewPaymentChannelWithDefaults instantiates a new PaymentChannel 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 - -### GetChannelCode - -`func (o *PaymentChannel) GetChannelCode() string` - -GetChannelCode returns the ChannelCode field if non-nil, zero value otherwise. - -### GetChannelCodeOk - -`func (o *PaymentChannel) GetChannelCodeOk() (*string, bool)` - -GetChannelCodeOk returns a tuple with the ChannelCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelCode - -`func (o *PaymentChannel) SetChannelCode(v string)` - -SetChannelCode sets ChannelCode field to given value. - -### HasChannelCode - -`func (o *PaymentChannel) HasChannelCode() bool` - -HasChannelCode returns a boolean if a field has been set. - -### GetType - -`func (o *PaymentChannel) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *PaymentChannel) 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 *PaymentChannel) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *PaymentChannel) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetCountry - -`func (o *PaymentChannel) GetCountry() string` - -GetCountry returns the Country field if non-nil, zero value otherwise. - -### GetCountryOk - -`func (o *PaymentChannel) GetCountryOk() (*string, bool)` - -GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCountry - -`func (o *PaymentChannel) SetCountry(v string)` - -SetCountry sets Country field to given value. - -### HasCountry - -`func (o *PaymentChannel) HasCountry() bool` - -HasCountry returns a boolean if a field has been set. - -### GetChannelName - -`func (o *PaymentChannel) GetChannelName() string` - -GetChannelName returns the ChannelName field if non-nil, zero value otherwise. - -### GetChannelNameOk - -`func (o *PaymentChannel) GetChannelNameOk() (*string, bool)` - -GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelName - -`func (o *PaymentChannel) SetChannelName(v string)` - -SetChannelName sets ChannelName field to given value. - -### HasChannelName - -`func (o *PaymentChannel) HasChannelName() bool` - -HasChannelName returns a boolean if a field has been set. - -### GetChannelProperties - -`func (o *PaymentChannel) GetChannelProperties() []ChannelProperty` - -GetChannelProperties returns the ChannelProperties field if non-nil, zero value otherwise. - -### GetChannelPropertiesOk - -`func (o *PaymentChannel) GetChannelPropertiesOk() (*[]ChannelProperty, bool)` - -GetChannelPropertiesOk returns a tuple with the ChannelProperties field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelProperties - -`func (o *PaymentChannel) SetChannelProperties(v []ChannelProperty)` - -SetChannelProperties sets ChannelProperties field to given value. - -### HasChannelProperties - -`func (o *PaymentChannel) HasChannelProperties() bool` - -HasChannelProperties returns a boolean if a field has been set. - -### GetLogoUrl - -`func (o *PaymentChannel) GetLogoUrl() string` - -GetLogoUrl returns the LogoUrl field if non-nil, zero value otherwise. - -### GetLogoUrlOk - -`func (o *PaymentChannel) GetLogoUrlOk() (*string, bool)` - -GetLogoUrlOk returns a tuple with the LogoUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoUrl - -`func (o *PaymentChannel) SetLogoUrl(v string)` - -SetLogoUrl sets LogoUrl field to given value. - -### HasLogoUrl - -`func (o *PaymentChannel) HasLogoUrl() bool` - -HasLogoUrl returns a boolean if a field has been set. - -### GetAmountLimits - -`func (o *PaymentChannel) GetAmountLimits() []ChannelAmountLimits` - -GetAmountLimits returns the AmountLimits field if non-nil, zero value otherwise. - -### GetAmountLimitsOk - -`func (o *PaymentChannel) GetAmountLimitsOk() (*[]ChannelAmountLimits, bool)` - -GetAmountLimitsOk returns a tuple with the AmountLimits field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountLimits - -`func (o *PaymentChannel) SetAmountLimits(v []ChannelAmountLimits)` - -SetAmountLimits sets AmountLimits field to given value. - -### HasAmountLimits - -`func (o *PaymentChannel) HasAmountLimits() bool` - -HasAmountLimits returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/PaymentChannelAllOf.md b/docs/payment_method/PaymentChannelAllOf.md deleted file mode 100644 index 692ad34a..00000000 --- a/docs/payment_method/PaymentChannelAllOf.md +++ /dev/null @@ -1,212 +0,0 @@ -# PaymentChannelAllOf - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **ChannelCode** | Pointer to **string** | The specific Xendit code used to identify the partner channel | [optional] | -| **Type** | Pointer to **string** | The payment method type | [optional] | -| **Country** | Pointer to **string** | The country where the channel operates in ISO 3166-2 country code | [optional] | -| **ChannelName** | Pointer to **string** | Official parter name of the payment channel | [optional] | -| **ChannelProperties** | Pointer to [**ChannelProperty[]**](ChannelProperty.md) | | [optional] | -| **LogoUrl** | Pointer to **string** | If available, this contains a URL to the logo of the partner channel | [optional] | -| **AmountLimits** | Pointer to [**ChannelAmountLimits[]**](ChannelAmountLimits.md) | | [optional] | - -## Methods - -### NewPaymentChannelAllOf - -`func NewPaymentChannelAllOf() *PaymentChannelAllOf` - -NewPaymentChannelAllOf instantiates a new PaymentChannelAllOf 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 - -### NewPaymentChannelAllOfWithDefaults - -`func NewPaymentChannelAllOfWithDefaults() *PaymentChannelAllOf` - -NewPaymentChannelAllOfWithDefaults instantiates a new PaymentChannelAllOf 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 - -### GetChannelCode - -`func (o *PaymentChannelAllOf) GetChannelCode() string` - -GetChannelCode returns the ChannelCode field if non-nil, zero value otherwise. - -### GetChannelCodeOk - -`func (o *PaymentChannelAllOf) GetChannelCodeOk() (*string, bool)` - -GetChannelCodeOk returns a tuple with the ChannelCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelCode - -`func (o *PaymentChannelAllOf) SetChannelCode(v string)` - -SetChannelCode sets ChannelCode field to given value. - -### HasChannelCode - -`func (o *PaymentChannelAllOf) HasChannelCode() bool` - -HasChannelCode returns a boolean if a field has been set. - -### GetType - -`func (o *PaymentChannelAllOf) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *PaymentChannelAllOf) 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 *PaymentChannelAllOf) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *PaymentChannelAllOf) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetCountry - -`func (o *PaymentChannelAllOf) GetCountry() string` - -GetCountry returns the Country field if non-nil, zero value otherwise. - -### GetCountryOk - -`func (o *PaymentChannelAllOf) GetCountryOk() (*string, bool)` - -GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCountry - -`func (o *PaymentChannelAllOf) SetCountry(v string)` - -SetCountry sets Country field to given value. - -### HasCountry - -`func (o *PaymentChannelAllOf) HasCountry() bool` - -HasCountry returns a boolean if a field has been set. - -### GetChannelName - -`func (o *PaymentChannelAllOf) GetChannelName() string` - -GetChannelName returns the ChannelName field if non-nil, zero value otherwise. - -### GetChannelNameOk - -`func (o *PaymentChannelAllOf) GetChannelNameOk() (*string, bool)` - -GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelName - -`func (o *PaymentChannelAllOf) SetChannelName(v string)` - -SetChannelName sets ChannelName field to given value. - -### HasChannelName - -`func (o *PaymentChannelAllOf) HasChannelName() bool` - -HasChannelName returns a boolean if a field has been set. - -### GetChannelProperties - -`func (o *PaymentChannelAllOf) GetChannelProperties() []ChannelProperty` - -GetChannelProperties returns the ChannelProperties field if non-nil, zero value otherwise. - -### GetChannelPropertiesOk - -`func (o *PaymentChannelAllOf) GetChannelPropertiesOk() (*[]ChannelProperty, bool)` - -GetChannelPropertiesOk returns a tuple with the ChannelProperties field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelProperties - -`func (o *PaymentChannelAllOf) SetChannelProperties(v []ChannelProperty)` - -SetChannelProperties sets ChannelProperties field to given value. - -### HasChannelProperties - -`func (o *PaymentChannelAllOf) HasChannelProperties() bool` - -HasChannelProperties returns a boolean if a field has been set. - -### GetLogoUrl - -`func (o *PaymentChannelAllOf) GetLogoUrl() string` - -GetLogoUrl returns the LogoUrl field if non-nil, zero value otherwise. - -### GetLogoUrlOk - -`func (o *PaymentChannelAllOf) GetLogoUrlOk() (*string, bool)` - -GetLogoUrlOk returns a tuple with the LogoUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoUrl - -`func (o *PaymentChannelAllOf) SetLogoUrl(v string)` - -SetLogoUrl sets LogoUrl field to given value. - -### HasLogoUrl - -`func (o *PaymentChannelAllOf) HasLogoUrl() bool` - -HasLogoUrl returns a boolean if a field has been set. - -### GetAmountLimits - -`func (o *PaymentChannelAllOf) GetAmountLimits() []ChannelAmountLimits` - -GetAmountLimits returns the AmountLimits field if non-nil, zero value otherwise. - -### GetAmountLimitsOk - -`func (o *PaymentChannelAllOf) GetAmountLimitsOk() (*[]ChannelAmountLimits, bool)` - -GetAmountLimitsOk returns a tuple with the AmountLimits field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountLimits - -`func (o *PaymentChannelAllOf) SetAmountLimits(v []ChannelAmountLimits)` - -SetAmountLimits sets AmountLimits field to given value. - -### HasAmountLimits - -`func (o *PaymentChannelAllOf) HasAmountLimits() bool` - -HasAmountLimits returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/PaymentChannelList.md b/docs/payment_method/PaymentChannelList.md deleted file mode 100644 index 8640f817..00000000 --- a/docs/payment_method/PaymentChannelList.md +++ /dev/null @@ -1,108 +0,0 @@ -# PaymentChannelList - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Data** | Pointer to [**PaymentChannel[]**](PaymentChannel.md) | Array of resources that match the provided filters | [optional] | -| **Links** | Pointer to [**PaymentChannelListLinksInner[]**](PaymentChannelListLinksInner.md) | Array of objects that can be used to assist on navigating through the data | [optional] | -| **HasMore** | Pointer to **bool** | Indicates whether there are more items in the list | [optional] | - -## Methods - -### NewPaymentChannelList - -`func NewPaymentChannelList() *PaymentChannelList` - -NewPaymentChannelList instantiates a new PaymentChannelList 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 - -### NewPaymentChannelListWithDefaults - -`func NewPaymentChannelListWithDefaults() *PaymentChannelList` - -NewPaymentChannelListWithDefaults instantiates a new PaymentChannelList 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 - -### GetData - -`func (o *PaymentChannelList) GetData() []PaymentChannel` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *PaymentChannelList) GetDataOk() (*[]PaymentChannel, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *PaymentChannelList) SetData(v []PaymentChannel)` - -SetData sets Data field to given value. - -### HasData - -`func (o *PaymentChannelList) HasData() bool` - -HasData returns a boolean if a field has been set. - -### GetLinks - -`func (o *PaymentChannelList) GetLinks() []PaymentChannelListLinksInner` - -GetLinks returns the Links field if non-nil, zero value otherwise. - -### GetLinksOk - -`func (o *PaymentChannelList) GetLinksOk() (*[]PaymentChannelListLinksInner, bool)` - -GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLinks - -`func (o *PaymentChannelList) SetLinks(v []PaymentChannelListLinksInner)` - -SetLinks sets Links field to given value. - -### HasLinks - -`func (o *PaymentChannelList) HasLinks() bool` - -HasLinks returns a boolean if a field has been set. - -### GetHasMore - -`func (o *PaymentChannelList) GetHasMore() bool` - -GetHasMore returns the HasMore field if non-nil, zero value otherwise. - -### GetHasMoreOk - -`func (o *PaymentChannelList) GetHasMoreOk() (*bool, bool)` - -GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHasMore - -`func (o *PaymentChannelList) SetHasMore(v bool)` - -SetHasMore sets HasMore field to given value. - -### HasHasMore - -`func (o *PaymentChannelList) HasHasMore() bool` - -HasHasMore returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/PaymentChannelListLinksInner.md b/docs/payment_method/PaymentChannelListLinksInner.md deleted file mode 100644 index a5e7095a..00000000 --- a/docs/payment_method/PaymentChannelListLinksInner.md +++ /dev/null @@ -1,108 +0,0 @@ -# PaymentChannelListLinksInner - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Href** | Pointer to **string** | Target URI that should contain a target to Internationalized Resource Identifiers (IRI) | [optional] | -| **Rel** | Pointer to **string** | The link relation type described how the current context (source) is related to target resource | [optional] | -| **Method** | Pointer to **string** | The HTTP method to be used to call `href` | [optional] | - -## Methods - -### NewPaymentChannelListLinksInner - -`func NewPaymentChannelListLinksInner() *PaymentChannelListLinksInner` - -NewPaymentChannelListLinksInner instantiates a new PaymentChannelListLinksInner 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 - -### NewPaymentChannelListLinksInnerWithDefaults - -`func NewPaymentChannelListLinksInnerWithDefaults() *PaymentChannelListLinksInner` - -NewPaymentChannelListLinksInnerWithDefaults instantiates a new PaymentChannelListLinksInner 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 - -### GetHref - -`func (o *PaymentChannelListLinksInner) GetHref() string` - -GetHref returns the Href field if non-nil, zero value otherwise. - -### GetHrefOk - -`func (o *PaymentChannelListLinksInner) GetHrefOk() (*string, bool)` - -GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHref - -`func (o *PaymentChannelListLinksInner) SetHref(v string)` - -SetHref sets Href field to given value. - -### HasHref - -`func (o *PaymentChannelListLinksInner) HasHref() bool` - -HasHref returns a boolean if a field has been set. - -### GetRel - -`func (o *PaymentChannelListLinksInner) GetRel() string` - -GetRel returns the Rel field if non-nil, zero value otherwise. - -### GetRelOk - -`func (o *PaymentChannelListLinksInner) GetRelOk() (*string, bool)` - -GetRelOk returns a tuple with the Rel field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRel - -`func (o *PaymentChannelListLinksInner) SetRel(v string)` - -SetRel sets Rel field to given value. - -### HasRel - -`func (o *PaymentChannelListLinksInner) HasRel() bool` - -HasRel returns a boolean if a field has been set. - -### GetMethod - -`func (o *PaymentChannelListLinksInner) GetMethod() string` - -GetMethod returns the Method field if non-nil, zero value otherwise. - -### GetMethodOk - -`func (o *PaymentChannelListLinksInner) GetMethodOk() (*string, bool)` - -GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMethod - -`func (o *PaymentChannelListLinksInner) SetMethod(v string)` - -SetMethod sets Method field to given value. - -### HasMethod - -`func (o *PaymentChannelListLinksInner) HasMethod() bool` - -HasMethod returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_method/PaymentChannelListLinksInnerAllOf.md b/docs/payment_method/PaymentChannelListLinksInnerAllOf.md deleted file mode 100644 index 3ee84f30..00000000 --- a/docs/payment_method/PaymentChannelListLinksInnerAllOf.md +++ /dev/null @@ -1,108 +0,0 @@ -# PaymentChannelListLinksInnerAllOf - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------- | ------------- | ------------- | -| **Href** | Pointer to **string** | Target URI that should contain a target to Internationalized Resource Identifiers (IRI) | [optional] | -| **Rel** | Pointer to **string** | The link relation type described how the current context (source) is related to target resource | [optional] | -| **Method** | Pointer to **string** | The HTTP method to be used to call `href` | [optional] | - -## Methods - -### NewPaymentChannelListLinksInnerAllOf - -`func NewPaymentChannelListLinksInnerAllOf() *PaymentChannelListLinksInnerAllOf` - -NewPaymentChannelListLinksInnerAllOf instantiates a new PaymentChannelListLinksInnerAllOf 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 - -### NewPaymentChannelListLinksInnerAllOfWithDefaults - -`func NewPaymentChannelListLinksInnerAllOfWithDefaults() *PaymentChannelListLinksInnerAllOf` - -NewPaymentChannelListLinksInnerAllOfWithDefaults instantiates a new PaymentChannelListLinksInnerAllOf 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 - -### GetHref - -`func (o *PaymentChannelListLinksInnerAllOf) GetHref() string` - -GetHref returns the Href field if non-nil, zero value otherwise. - -### GetHrefOk - -`func (o *PaymentChannelListLinksInnerAllOf) GetHrefOk() (*string, bool)` - -GetHrefOk returns a tuple with the Href field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHref - -`func (o *PaymentChannelListLinksInnerAllOf) SetHref(v string)` - -SetHref sets Href field to given value. - -### HasHref - -`func (o *PaymentChannelListLinksInnerAllOf) HasHref() bool` - -HasHref returns a boolean if a field has been set. - -### GetRel - -`func (o *PaymentChannelListLinksInnerAllOf) GetRel() string` - -GetRel returns the Rel field if non-nil, zero value otherwise. - -### GetRelOk - -`func (o *PaymentChannelListLinksInnerAllOf) GetRelOk() (*string, bool)` - -GetRelOk returns a tuple with the Rel field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRel - -`func (o *PaymentChannelListLinksInnerAllOf) SetRel(v string)` - -SetRel sets Rel field to given value. - -### HasRel - -`func (o *PaymentChannelListLinksInnerAllOf) HasRel() bool` - -HasRel returns a boolean if a field has been set. - -### GetMethod - -`func (o *PaymentChannelListLinksInnerAllOf) GetMethod() string` - -GetMethod returns the Method field if non-nil, zero value otherwise. - -### GetMethodOk - -`func (o *PaymentChannelListLinksInnerAllOf) GetMethodOk() (*string, bool)` - -GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMethod - -`func (o *PaymentChannelListLinksInnerAllOf) SetMethod(v string)` - -SetMethod sets Method field to given value. - -### HasMethod - -`func (o *PaymentChannelListLinksInnerAllOf) HasMethod() bool` - -HasMethod returns a boolean if a field has been set. - - -[[Back to README]](../../README.md) - - diff --git a/docs/payment_request.yaml b/docs/payment_request.yaml index fdd7c67c..e117701e 100644 --- a/docs/payment_request.yaml +++ b/docs/payment_request.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: description: This API is used for Payment Requests title: Payment Requests - version: 1.44.0 + version: 1.44.1 servers: - description: Xendit API Server url: https://api.xendit.co @@ -984,7 +984,7 @@ components: \ tokenized payment use only." example: REDEEM_NONE type: string - mobile:number: + mobile_number: type: string cashtag: type: string diff --git a/docs/payment_request/EWalletChannelProperties.md b/docs/payment_request/EWalletChannelProperties.md index 5d78ef8a..9f1b3ef7 100644 --- a/docs/payment_request/EWalletChannelProperties.md +++ b/docs/payment_request/EWalletChannelProperties.md @@ -8,7 +8,7 @@ | **FailureReturnUrl** | Pointer to **string** | URL where the end-customer is redirected if the authorization failed | [optional] | | **CancelReturnUrl** | Pointer to **string** | URL where the end-customer is redirected if the authorization cancelled | [optional] | | **RedeemPoints** | Pointer to **string** | REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. | [optional] | -| **Mobilenumber** | Pointer to **string** | | [optional] | +| **MobileNumber** | Pointer to **string** | | [optional] | | **Cashtag** | Pointer to **string** | | [optional] | ## Methods @@ -130,30 +130,30 @@ SetRedeemPoints sets RedeemPoints field to given value. HasRedeemPoints returns a boolean if a field has been set. -### GetMobilenumber +### GetMobileNumber -`func (o *EWalletChannelProperties) GetMobilenumber() string` +`func (o *EWalletChannelProperties) GetMobileNumber() string` -GetMobilenumber returns the Mobilenumber field if non-nil, zero value otherwise. +GetMobileNumber returns the MobileNumber field if non-nil, zero value otherwise. -### GetMobilenumberOk +### GetMobileNumberOk -`func (o *EWalletChannelProperties) GetMobilenumberOk() (*string, bool)` +`func (o *EWalletChannelProperties) GetMobileNumberOk() (*string, bool)` -GetMobilenumberOk returns a tuple with the Mobilenumber field if it's non-nil, zero value otherwise +GetMobileNumberOk returns a tuple with the MobileNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetMobilenumber +### SetMobileNumber -`func (o *EWalletChannelProperties) SetMobilenumber(v string)` +`func (o *EWalletChannelProperties) SetMobileNumber(v string)` -SetMobilenumber sets Mobilenumber field to given value. +SetMobileNumber sets MobileNumber field to given value. -### HasMobilenumber +### HasMobileNumber -`func (o *EWalletChannelProperties) HasMobilenumber() bool` +`func (o *EWalletChannelProperties) HasMobileNumber() bool` -HasMobilenumber returns a boolean if a field has been set. +HasMobileNumber returns a boolean if a field has been set. ### GetCashtag diff --git a/invoice/model_address_object.go b/invoice/model_address_object.go index 233ac0df..12da1400 100644 --- a/invoice/model_address_object.go +++ b/invoice/model_address_object.go @@ -359,25 +359,25 @@ func (o AddressObject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Country.IsSet() { toSerialize["country"] = o.Country.Get() - } + } if o.StreetLine1.IsSet() { toSerialize["street_line1"] = o.StreetLine1.Get() - } + } if o.StreetLine2.IsSet() { toSerialize["street_line2"] = o.StreetLine2.Get() - } + } if o.City.IsSet() { toSerialize["city"] = o.City.Get() - } + } if o.Province.IsSet() { toSerialize["province"] = o.Province.Get() - } + } if o.State.IsSet() { toSerialize["state"] = o.State.Get() - } + } if o.PostalCode.IsSet() { toSerialize["postal_code"] = o.PostalCode.Get() - } + } return toSerialize, nil } diff --git a/invoice/model_bad_request_error.go b/invoice/model_bad_request_error.go index 2cefb2e0..20b85fec 100644 --- a/invoice/model_bad_request_error.go +++ b/invoice/model_bad_request_error.go @@ -104,6 +104,10 @@ func (o BadRequestError) MarshalJSON() ([]byte, error) { func (o BadRequestError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "MAXIMUM_TRANSFER_AMOUNT_ERROR" && o.ErrorCode != "NO_COLLECTION_METHODS_ERROR" && o.ErrorCode != "EMAIL_FORMAT_ERROR" && o.ErrorCode != "UNAVAILABLE_PAYMENT_METHOD_ERROR" && o.ErrorCode != "UNSUPPORTED_CURRENCY" && o.ErrorCode != "MISMATCH_CURRENCY_ERROR" && o.ErrorCode != "INVALID_REMINDER_TIME" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of MAXIMUM_TRANSFER_AMOUNT_ERROR, NO_COLLECTION_METHODS_ERROR, EMAIL_FORMAT_ERROR, UNAVAILABLE_PAYMENT_METHOD_ERROR, UNSUPPORTED_CURRENCY, MISMATCH_CURRENCY_ERROR, INVALID_REMINDER_TIME") + } toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/invoice/model_customer_object.go b/invoice/model_customer_object.go index 988f4860..3dfb90eb 100644 --- a/invoice/model_customer_object.go +++ b/invoice/model_customer_object.go @@ -394,28 +394,28 @@ func (o CustomerObject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() - } + } if o.PhoneNumber.IsSet() { toSerialize["phone_number"] = o.PhoneNumber.Get() - } + } if o.GivenNames.IsSet() { toSerialize["given_names"] = o.GivenNames.Get() - } + } if o.Surname.IsSet() { toSerialize["surname"] = o.Surname.Get() - } + } if o.Email.IsSet() { toSerialize["email"] = o.Email.Get() - } + } if o.MobileNumber.IsSet() { toSerialize["mobile_number"] = o.MobileNumber.Get() - } + } if o.CustomerId.IsSet() { toSerialize["customer_id"] = o.CustomerId.Get() - } + } if o.Addresses != nil { toSerialize["addresses"] = o.Addresses - } + } return toSerialize, nil } diff --git a/invoice/model_forbidden_error.go b/invoice/model_forbidden_error.go index 914967cf..f27aba8d 100644 --- a/invoice/model_forbidden_error.go +++ b/invoice/model_forbidden_error.go @@ -104,6 +104,10 @@ func (o ForbiddenError) MarshalJSON() ([]byte, error) { func (o ForbiddenError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "ACCESS_SUSPENDED" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of ACCESS_SUSPENDED") + } toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/invoice/model_invoice_error404_response_definition.go b/invoice/model_invoice_error404_response_definition.go index 68927187..b194091c 100644 --- a/invoice/model_invoice_error404_response_definition.go +++ b/invoice/model_invoice_error404_response_definition.go @@ -104,6 +104,10 @@ func (o InvoiceError404ResponseDefinition) MarshalJSON() ([]byte, error) { func (o InvoiceError404ResponseDefinition) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "INVOICE_NOT_FOUND_ERROR" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of INVOICE_NOT_FOUND_ERROR") + } toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/invoice/model_invoice_not_found_error.go b/invoice/model_invoice_not_found_error.go index 07e8233c..6fc8f443 100644 --- a/invoice/model_invoice_not_found_error.go +++ b/invoice/model_invoice_not_found_error.go @@ -104,6 +104,10 @@ func (o InvoiceNotFoundError) MarshalJSON() ([]byte, error) { func (o InvoiceNotFoundError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "CALLBACK_VIRTUAL_ACCOUNT_NOT_FOUND_ERROR" && o.ErrorCode != "UNIQUE_ACCOUNT_NUMBER_UNAVAILABLE_ERROR" && o.ErrorCode != "PAYMENT_CODE_NOT_AVAILABLE_ERROR" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of CALLBACK_VIRTUAL_ACCOUNT_NOT_FOUND_ERROR, UNIQUE_ACCOUNT_NUMBER_UNAVAILABLE_ERROR, PAYMENT_CODE_NOT_AVAILABLE_ERROR") + } toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/invoice/model_server_error.go b/invoice/model_server_error.go index d230e925..d133ab4b 100644 --- a/invoice/model_server_error.go +++ b/invoice/model_server_error.go @@ -102,6 +102,10 @@ func (o ServerError) MarshalJSON() ([]byte, error) { func (o ServerError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "SERVER_ERROR" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of SERVER_ERROR") + } toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/invoice/model_unauthorized_error.go b/invoice/model_unauthorized_error.go index 86e6ad3c..e5a10665 100644 --- a/invoice/model_unauthorized_error.go +++ b/invoice/model_unauthorized_error.go @@ -104,6 +104,10 @@ func (o UnauthorizedError) MarshalJSON() ([]byte, error) { func (o UnauthorizedError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["error_code"] = o.ErrorCode + if o.ErrorCode != "INVALID_API_KEY" { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of INVALID_API_KEY") + } toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/payment_method/api_payment_method.go b/payment_method/api_payment_method.go index 1ff61282..5bdd7c47 100644 --- a/payment_method/api_payment_method.go +++ b/payment_method/api_payment_method.go @@ -62,20 +62,6 @@ type PaymentMethodApi interface { // @return PaymentMethod ExpirePaymentMethodExecute(r ApiExpirePaymentMethodRequest) (*PaymentMethod, *http.Response, *common.XenditSdkError) - /* - GetAllPaymentChannels Get all payment channels - - Get all payment channels - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetAllPaymentChannelsRequest - */ - GetAllPaymentChannels(ctx context.Context) ApiGetAllPaymentChannelsRequest - - // GetAllPaymentChannelsExecute executes the request - // @return PaymentChannelList - GetAllPaymentChannelsExecute(r ApiGetAllPaymentChannelsRequest) (*PaymentChannelList, *http.Response, *common.XenditSdkError) - /* GetAllPaymentMethods Get all payment methods by filters @@ -447,108 +433,6 @@ func (a *PaymentMethodApiService) ExpirePaymentMethodExecute(r ApiExpirePaymentM return localVarReturnValue, localVarHTTPResponse, nil } -type ApiGetAllPaymentChannelsRequest struct { - ctx context.Context - ApiService PaymentMethodApi - isActivated *bool - type_ *string -} - -func (r ApiGetAllPaymentChannelsRequest) IsActivated(isActivated bool) ApiGetAllPaymentChannelsRequest { - r.isActivated = &isActivated - return r -} - -func (r ApiGetAllPaymentChannelsRequest) Type_(type_ string) ApiGetAllPaymentChannelsRequest { - r.type_ = &type_ - return r -} - -func (r ApiGetAllPaymentChannelsRequest) Execute() (*PaymentChannelList, *http.Response, *common.XenditSdkError) { - return r.ApiService.GetAllPaymentChannelsExecute(r) -} - -/* -GetAllPaymentChannels Get all payment channels - -Get all payment channels - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetAllPaymentChannelsRequest -*/ -func (a *PaymentMethodApiService) GetAllPaymentChannels(ctx context.Context) ApiGetAllPaymentChannelsRequest { - return ApiGetAllPaymentChannelsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return PaymentChannelList -func (a *PaymentMethodApiService) GetAllPaymentChannelsExecute(r ApiGetAllPaymentChannelsRequest) (*PaymentChannelList, *http.Response, *common.XenditSdkError) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []common.FormFile - localVarReturnValue *PaymentChannelList - ) - - localBasePath, err := a.client.GetConfig().ServerURLWithContext(r.ctx, "PaymentMethodApiService.GetAllPaymentChannels") - if err != nil { - return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: PaymentMethodApiService.GetAllPaymentChannelsExecute") - } - - localVarPath := localBasePath + "/v2/payment_methods/channels" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.isActivated != nil { - utils.ParameterAddToHeaderOrQuery(localVarQueryParams, "is_activated", r.isActivated, "") - } - if r.type_ != nil { - utils.ParameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := utils.SelectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := utils.SelectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.PrepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, common.NewXenditSdkError(nil, "", "Error creating HTTP request: PaymentMethodApiService.GetAllPaymentChannelsExecute") - } - - localVarHTTPResponse, err := a.client.CallAPI(req) - - localVarBody, _ := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - - err = a.client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - - if err != nil || localVarHTTPResponse.StatusCode < 200 || localVarHTTPResponse.StatusCode >= 300 { - xenditSdkError := common.NewXenditSdkError(&localVarBody, strconv.Itoa(localVarHTTPResponse.StatusCode), localVarHTTPResponse.Status) - - return localVarReturnValue, localVarHTTPResponse, xenditSdkError - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiGetAllPaymentMethodsRequest struct { ctx context.Context ApiService PaymentMethodApi diff --git a/payment_method/model_billing_information.go b/payment_method/model_billing_information.go index 0fe4e3d0..3116d09a 100644 --- a/payment_method/model_billing_information.go +++ b/payment_method/model_billing_information.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -293,19 +293,19 @@ func (o BillingInformation) ToMap() (map[string]interface{}, error) { toSerialize["country"] = o.Country if o.StreetLine1.IsSet() { toSerialize["street_line1"] = o.StreetLine1.Get() - } + } if o.StreetLine2.IsSet() { toSerialize["street_line2"] = o.StreetLine2.Get() - } + } if o.City.IsSet() { toSerialize["city"] = o.City.Get() - } + } if o.ProvinceState.IsSet() { toSerialize["province_state"] = o.ProvinceState.Get() - } + } if o.PostalCode.IsSet() { toSerialize["postal_code"] = o.PostalCode.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_card.go b/payment_method/model_card.go index 8aa1f878..48a87113 100644 --- a/payment_method/model_card.go +++ b/payment_method/model_card.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -182,13 +182,15 @@ func (o Card) MarshalJSON() ([]byte, error) { func (o Card) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["currency"] = o.Currency.Get() + toSerialize["channel_properties"] = o.ChannelProperties.Get() + if !utils.IsNil(o.CardInformation) { toSerialize["card_information"] = o.CardInformation } if o.CardVerificationResults.IsSet() { toSerialize["card_verification_results"] = o.CardVerificationResults.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_card_channel_properties.go b/payment_method/model_card_channel_properties.go index 952ef132..7b300069 100644 --- a/payment_method/model_card_channel_properties.go +++ b/payment_method/model_card_channel_properties.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -227,16 +227,20 @@ func (o CardChannelProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.SkipThreeDSecure.IsSet() { toSerialize["skip_three_d_secure"] = o.SkipThreeDSecure.Get() - } + } if o.SuccessReturnUrl.IsSet() { toSerialize["success_return_url"] = o.SuccessReturnUrl.Get() - } + } if o.FailureReturnUrl.IsSet() { toSerialize["failure_return_url"] = o.FailureReturnUrl.Get() - } + } if o.CardonfileType.IsSet() { toSerialize["cardonfile_type"] = o.CardonfileType.Get() - } + if o.CardonfileType.Get() != nil && (*o.CardonfileType.Get() != "MERCHANT_UNSCHEDULED" && *o.CardonfileType.Get() != "CUSTOMER_UNSCHEDULED" && *o.CardonfileType.Get() != "RECURRING") { + toSerialize["cardonfile_type"] = nil + return toSerialize, utils.NewError("invalid value for CardonfileType when marshalling to JSON, must be one of MERCHANT_UNSCHEDULED, CUSTOMER_UNSCHEDULED, RECURRING") + } + } return toSerialize, nil } diff --git a/payment_method/model_card_parameters.go b/payment_method/model_card_parameters.go index de932faf..de749440 100644 --- a/payment_method/model_card_parameters.go +++ b/payment_method/model_card_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -154,7 +154,7 @@ func (o CardParameters) ToMap() (map[string]interface{}, error) { toSerialize["currency"] = o.Currency if o.ChannelProperties.IsSet() { toSerialize["channel_properties"] = o.ChannelProperties.Get() - } + } if !utils.IsNil(o.CardInformation) { toSerialize["card_information"] = o.CardInformation } diff --git a/payment_method/model_card_parameters_card_information.go b/payment_method/model_card_parameters_card_information.go index 9a78f94c..fd53669e 100644 --- a/payment_method/model_card_parameters_card_information.go +++ b/payment_method/model_card_parameters_card_information.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -221,10 +221,10 @@ func (o CardParametersCardInformation) ToMap() (map[string]interface{}, error) { toSerialize["expiry_year"] = o.ExpiryYear if o.CardholderName.IsSet() { toSerialize["cardholder_name"] = o.CardholderName.Get() - } + } if o.Cvv.IsSet() { toSerialize["cvv"] = o.Cvv.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_card_verification_results.go b/payment_method/model_card_verification_results.go index b0b503ad..74385e26 100644 --- a/payment_method/model_card_verification_results.go +++ b/payment_method/model_card_verification_results.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -164,12 +164,13 @@ func (o CardVerificationResults) MarshalJSON() ([]byte, error) { func (o CardVerificationResults) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["three_d_secure"] = o.ThreeDSecure.Get() + if o.CvvResult.IsSet() { toSerialize["cvv_result"] = o.CvvResult.Get() - } + } if o.AddressVerificationResult.IsSet() { toSerialize["address_verification_result"] = o.AddressVerificationResult.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_card_verification_results_three_d_secure.go b/payment_method/model_card_verification_results_three_d_secure.go index 7bde2a2b..1c4a11bf 100644 --- a/payment_method/model_card_verification_results_three_d_secure.go +++ b/payment_method/model_card_verification_results_three_d_secure.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -266,19 +266,23 @@ func (o CardVerificationResultsThreeDSecure) ToMap() (map[string]interface{}, er toSerialize := map[string]interface{}{} if o.ThreeDSecureFlow.IsSet() { toSerialize["three_d_secure_flow"] = o.ThreeDSecureFlow.Get() - } + if o.ThreeDSecureFlow.Get() != nil && (*o.ThreeDSecureFlow.Get() != "CHALLENGE" && *o.ThreeDSecureFlow.Get() != "FRICTIONLESS") { + toSerialize["three_d_secure_flow"] = nil + return toSerialize, utils.NewError("invalid value for ThreeDSecureFlow when marshalling to JSON, must be one of CHALLENGE, FRICTIONLESS") + } + } if o.EciCode.IsSet() { toSerialize["eci_code"] = o.EciCode.Get() - } + } if o.ThreeDSecureResult.IsSet() { toSerialize["three_d_secure_result"] = o.ThreeDSecureResult.Get() - } + } if o.ThreeDSecureResultReason.IsSet() { toSerialize["three_d_secure_result_reason"] = o.ThreeDSecureResultReason.Get() - } + } if o.ThreeDSecureVersion.IsSet() { toSerialize["three_d_secure_version"] = o.ThreeDSecureVersion.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_channel_amount_limits.go b/payment_method/model_channel_amount_limits.go deleted file mode 100644 index 18c89c6a..00000000 --- a/payment_method/model_channel_amount_limits.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the ChannelAmountLimits type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &ChannelAmountLimits{} - -// ChannelAmountLimits struct for ChannelAmountLimits -type ChannelAmountLimits struct { - // Currency supported by the payment channel - Currency *string `json:"currency,omitempty"` - // The minimum allowed transaction amount for the payment channel - MinLimit *float32 `json:"min_limit,omitempty"` - // The minimum allowed transaction amount for the payment channel - MaxLimit *float32 `json:"max_limit,omitempty"` -} - -// NewChannelAmountLimits instantiates a new ChannelAmountLimits 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 NewChannelAmountLimits() *ChannelAmountLimits { - this := ChannelAmountLimits{} - return &this -} - -// NewChannelAmountLimitsWithDefaults instantiates a new ChannelAmountLimits 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 NewChannelAmountLimitsWithDefaults() *ChannelAmountLimits { - this := ChannelAmountLimits{} - return &this -} - -// GetCurrency returns the Currency field value if set, zero value otherwise. -func (o *ChannelAmountLimits) GetCurrency() string { - if o == nil || utils.IsNil(o.Currency) { - var ret string - return ret - } - return *o.Currency -} - -// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelAmountLimits) GetCurrencyOk() (*string, bool) { - if o == nil || utils.IsNil(o.Currency) { - return nil, false - } - return o.Currency, true -} - -// HasCurrency returns a boolean if a field has been set. -func (o *ChannelAmountLimits) HasCurrency() bool { - if o != nil && !utils.IsNil(o.Currency) { - return true - } - - return false -} - -// SetCurrency gets a reference to the given string and assigns it to the Currency field. -func (o *ChannelAmountLimits) SetCurrency(v string) { - o.Currency = &v -} - -// GetMinLimit returns the MinLimit field value if set, zero value otherwise. -func (o *ChannelAmountLimits) GetMinLimit() float32 { - if o == nil || utils.IsNil(o.MinLimit) { - var ret float32 - return ret - } - return *o.MinLimit -} - -// GetMinLimitOk returns a tuple with the MinLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelAmountLimits) GetMinLimitOk() (*float32, bool) { - if o == nil || utils.IsNil(o.MinLimit) { - return nil, false - } - return o.MinLimit, true -} - -// HasMinLimit returns a boolean if a field has been set. -func (o *ChannelAmountLimits) HasMinLimit() bool { - if o != nil && !utils.IsNil(o.MinLimit) { - return true - } - - return false -} - -// SetMinLimit gets a reference to the given float32 and assigns it to the MinLimit field. -func (o *ChannelAmountLimits) SetMinLimit(v float32) { - o.MinLimit = &v -} - -// GetMaxLimit returns the MaxLimit field value if set, zero value otherwise. -func (o *ChannelAmountLimits) GetMaxLimit() float32 { - if o == nil || utils.IsNil(o.MaxLimit) { - var ret float32 - return ret - } - return *o.MaxLimit -} - -// GetMaxLimitOk returns a tuple with the MaxLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelAmountLimits) GetMaxLimitOk() (*float32, bool) { - if o == nil || utils.IsNil(o.MaxLimit) { - return nil, false - } - return o.MaxLimit, true -} - -// HasMaxLimit returns a boolean if a field has been set. -func (o *ChannelAmountLimits) HasMaxLimit() bool { - if o != nil && !utils.IsNil(o.MaxLimit) { - return true - } - - return false -} - -// SetMaxLimit gets a reference to the given float32 and assigns it to the MaxLimit field. -func (o *ChannelAmountLimits) SetMaxLimit(v float32) { - o.MaxLimit = &v -} - -func (o ChannelAmountLimits) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ChannelAmountLimits) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Currency) { - toSerialize["currency"] = o.Currency - } - if !utils.IsNil(o.MinLimit) { - toSerialize["min_limit"] = o.MinLimit - } - if !utils.IsNil(o.MaxLimit) { - toSerialize["max_limit"] = o.MaxLimit - } - return toSerialize, nil -} - -type NullableChannelAmountLimits struct { - value *ChannelAmountLimits - isSet bool -} - -func (v NullableChannelAmountLimits) Get() *ChannelAmountLimits { - return v.value -} - -func (v *NullableChannelAmountLimits) Set(val *ChannelAmountLimits) { - v.value = val - v.isSet = true -} - -func (v NullableChannelAmountLimits) IsSet() bool { - return v.isSet -} - -func (v *NullableChannelAmountLimits) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChannelAmountLimits(val *ChannelAmountLimits) *NullableChannelAmountLimits { - return &NullableChannelAmountLimits{value: val, isSet: true} -} - -func (v NullableChannelAmountLimits) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChannelAmountLimits) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_channel_amount_limits_all_of.go b/payment_method/model_channel_amount_limits_all_of.go deleted file mode 100644 index bf99da5e..00000000 --- a/payment_method/model_channel_amount_limits_all_of.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the ChannelAmountLimitsAllOf type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &ChannelAmountLimitsAllOf{} - -// ChannelAmountLimitsAllOf Contains objects of the support currencies and its respective limits per transaction -type ChannelAmountLimitsAllOf struct { - // Currency supported by the payment channel - Currency *string `json:"currency,omitempty"` - // The minimum allowed transaction amount for the payment channel - MinLimit *float32 `json:"min_limit,omitempty"` - // The minimum allowed transaction amount for the payment channel - MaxLimit *float32 `json:"max_limit,omitempty"` -} - -// NewChannelAmountLimitsAllOf instantiates a new ChannelAmountLimitsAllOf 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 NewChannelAmountLimitsAllOf() *ChannelAmountLimitsAllOf { - this := ChannelAmountLimitsAllOf{} - return &this -} - -// NewChannelAmountLimitsAllOfWithDefaults instantiates a new ChannelAmountLimitsAllOf 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 NewChannelAmountLimitsAllOfWithDefaults() *ChannelAmountLimitsAllOf { - this := ChannelAmountLimitsAllOf{} - return &this -} - -// GetCurrency returns the Currency field value if set, zero value otherwise. -func (o *ChannelAmountLimitsAllOf) GetCurrency() string { - if o == nil || utils.IsNil(o.Currency) { - var ret string - return ret - } - return *o.Currency -} - -// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelAmountLimitsAllOf) GetCurrencyOk() (*string, bool) { - if o == nil || utils.IsNil(o.Currency) { - return nil, false - } - return o.Currency, true -} - -// HasCurrency returns a boolean if a field has been set. -func (o *ChannelAmountLimitsAllOf) HasCurrency() bool { - if o != nil && !utils.IsNil(o.Currency) { - return true - } - - return false -} - -// SetCurrency gets a reference to the given string and assigns it to the Currency field. -func (o *ChannelAmountLimitsAllOf) SetCurrency(v string) { - o.Currency = &v -} - -// GetMinLimit returns the MinLimit field value if set, zero value otherwise. -func (o *ChannelAmountLimitsAllOf) GetMinLimit() float32 { - if o == nil || utils.IsNil(o.MinLimit) { - var ret float32 - return ret - } - return *o.MinLimit -} - -// GetMinLimitOk returns a tuple with the MinLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelAmountLimitsAllOf) GetMinLimitOk() (*float32, bool) { - if o == nil || utils.IsNil(o.MinLimit) { - return nil, false - } - return o.MinLimit, true -} - -// HasMinLimit returns a boolean if a field has been set. -func (o *ChannelAmountLimitsAllOf) HasMinLimit() bool { - if o != nil && !utils.IsNil(o.MinLimit) { - return true - } - - return false -} - -// SetMinLimit gets a reference to the given float32 and assigns it to the MinLimit field. -func (o *ChannelAmountLimitsAllOf) SetMinLimit(v float32) { - o.MinLimit = &v -} - -// GetMaxLimit returns the MaxLimit field value if set, zero value otherwise. -func (o *ChannelAmountLimitsAllOf) GetMaxLimit() float32 { - if o == nil || utils.IsNil(o.MaxLimit) { - var ret float32 - return ret - } - return *o.MaxLimit -} - -// GetMaxLimitOk returns a tuple with the MaxLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelAmountLimitsAllOf) GetMaxLimitOk() (*float32, bool) { - if o == nil || utils.IsNil(o.MaxLimit) { - return nil, false - } - return o.MaxLimit, true -} - -// HasMaxLimit returns a boolean if a field has been set. -func (o *ChannelAmountLimitsAllOf) HasMaxLimit() bool { - if o != nil && !utils.IsNil(o.MaxLimit) { - return true - } - - return false -} - -// SetMaxLimit gets a reference to the given float32 and assigns it to the MaxLimit field. -func (o *ChannelAmountLimitsAllOf) SetMaxLimit(v float32) { - o.MaxLimit = &v -} - -func (o ChannelAmountLimitsAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ChannelAmountLimitsAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Currency) { - toSerialize["currency"] = o.Currency - } - if !utils.IsNil(o.MinLimit) { - toSerialize["min_limit"] = o.MinLimit - } - if !utils.IsNil(o.MaxLimit) { - toSerialize["max_limit"] = o.MaxLimit - } - return toSerialize, nil -} - -type NullableChannelAmountLimitsAllOf struct { - value *ChannelAmountLimitsAllOf - isSet bool -} - -func (v NullableChannelAmountLimitsAllOf) Get() *ChannelAmountLimitsAllOf { - return v.value -} - -func (v *NullableChannelAmountLimitsAllOf) Set(val *ChannelAmountLimitsAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableChannelAmountLimitsAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableChannelAmountLimitsAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChannelAmountLimitsAllOf(val *ChannelAmountLimitsAllOf) *NullableChannelAmountLimitsAllOf { - return &NullableChannelAmountLimitsAllOf{value: val, isSet: true} -} - -func (v NullableChannelAmountLimitsAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChannelAmountLimitsAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_channel_property.go b/payment_method/model_channel_property.go deleted file mode 100644 index 37de4972..00000000 --- a/payment_method/model_channel_property.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the ChannelProperty type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &ChannelProperty{} - -// ChannelProperty struct for ChannelProperty -type ChannelProperty struct { - // The corresponding parameter name - Name *string `json:"name,omitempty"` - // Data type of the parameter - Type *string `json:"type,omitempty"` - // Indicates whether or not the parameter is required - IsRequired *bool `json:"is_required,omitempty"` -} - -// NewChannelProperty instantiates a new ChannelProperty 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 NewChannelProperty() *ChannelProperty { - this := ChannelProperty{} - return &this -} - -// NewChannelPropertyWithDefaults instantiates a new ChannelProperty 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 NewChannelPropertyWithDefaults() *ChannelProperty { - this := ChannelProperty{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ChannelProperty) GetName() string { - if o == nil || utils.IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelProperty) GetNameOk() (*string, bool) { - if o == nil || utils.IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ChannelProperty) HasName() bool { - if o != nil && !utils.IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ChannelProperty) SetName(v string) { - o.Name = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *ChannelProperty) GetType() string { - if o == nil || utils.IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelProperty) GetTypeOk() (*string, bool) { - if o == nil || utils.IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *ChannelProperty) HasType() bool { - if o != nil && !utils.IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *ChannelProperty) SetType(v string) { - o.Type = &v -} - -// GetIsRequired returns the IsRequired field value if set, zero value otherwise. -func (o *ChannelProperty) GetIsRequired() bool { - if o == nil || utils.IsNil(o.IsRequired) { - var ret bool - return ret - } - return *o.IsRequired -} - -// GetIsRequiredOk returns a tuple with the IsRequired field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelProperty) GetIsRequiredOk() (*bool, bool) { - if o == nil || utils.IsNil(o.IsRequired) { - return nil, false - } - return o.IsRequired, true -} - -// HasIsRequired returns a boolean if a field has been set. -func (o *ChannelProperty) HasIsRequired() bool { - if o != nil && !utils.IsNil(o.IsRequired) { - return true - } - - return false -} - -// SetIsRequired gets a reference to the given bool and assigns it to the IsRequired field. -func (o *ChannelProperty) SetIsRequired(v bool) { - o.IsRequired = &v -} - -func (o ChannelProperty) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ChannelProperty) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !utils.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !utils.IsNil(o.IsRequired) { - toSerialize["is_required"] = o.IsRequired - } - return toSerialize, nil -} - -type NullableChannelProperty struct { - value *ChannelProperty - isSet bool -} - -func (v NullableChannelProperty) Get() *ChannelProperty { - return v.value -} - -func (v *NullableChannelProperty) Set(val *ChannelProperty) { - v.value = val - v.isSet = true -} - -func (v NullableChannelProperty) IsSet() bool { - return v.isSet -} - -func (v *NullableChannelProperty) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChannelProperty(val *ChannelProperty) *NullableChannelProperty { - return &NullableChannelProperty{value: val, isSet: true} -} - -func (v NullableChannelProperty) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChannelProperty) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_channel_property_all_of.go b/payment_method/model_channel_property_all_of.go deleted file mode 100644 index 3a0ea23a..00000000 --- a/payment_method/model_channel_property_all_of.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the ChannelPropertyAllOf type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &ChannelPropertyAllOf{} - -// ChannelPropertyAllOf Objects that enumerate the parameters needed as `channel_properties` when creating a Payment Method -type ChannelPropertyAllOf struct { - // The corresponding parameter name - Name *string `json:"name,omitempty"` - // Data type of the parameter - Type *string `json:"type,omitempty"` - // Indicates whether or not the parameter is required - IsRequired *bool `json:"is_required,omitempty"` -} - -// NewChannelPropertyAllOf instantiates a new ChannelPropertyAllOf 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 NewChannelPropertyAllOf() *ChannelPropertyAllOf { - this := ChannelPropertyAllOf{} - return &this -} - -// NewChannelPropertyAllOfWithDefaults instantiates a new ChannelPropertyAllOf 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 NewChannelPropertyAllOfWithDefaults() *ChannelPropertyAllOf { - this := ChannelPropertyAllOf{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ChannelPropertyAllOf) GetName() string { - if o == nil || utils.IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelPropertyAllOf) GetNameOk() (*string, bool) { - if o == nil || utils.IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ChannelPropertyAllOf) HasName() bool { - if o != nil && !utils.IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ChannelPropertyAllOf) SetName(v string) { - o.Name = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *ChannelPropertyAllOf) GetType() string { - if o == nil || utils.IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelPropertyAllOf) GetTypeOk() (*string, bool) { - if o == nil || utils.IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *ChannelPropertyAllOf) HasType() bool { - if o != nil && !utils.IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *ChannelPropertyAllOf) SetType(v string) { - o.Type = &v -} - -// GetIsRequired returns the IsRequired field value if set, zero value otherwise. -func (o *ChannelPropertyAllOf) GetIsRequired() bool { - if o == nil || utils.IsNil(o.IsRequired) { - var ret bool - return ret - } - return *o.IsRequired -} - -// GetIsRequiredOk returns a tuple with the IsRequired field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChannelPropertyAllOf) GetIsRequiredOk() (*bool, bool) { - if o == nil || utils.IsNil(o.IsRequired) { - return nil, false - } - return o.IsRequired, true -} - -// HasIsRequired returns a boolean if a field has been set. -func (o *ChannelPropertyAllOf) HasIsRequired() bool { - if o != nil && !utils.IsNil(o.IsRequired) { - return true - } - - return false -} - -// SetIsRequired gets a reference to the given bool and assigns it to the IsRequired field. -func (o *ChannelPropertyAllOf) SetIsRequired(v bool) { - o.IsRequired = &v -} - -func (o ChannelPropertyAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ChannelPropertyAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !utils.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !utils.IsNil(o.IsRequired) { - toSerialize["is_required"] = o.IsRequired - } - return toSerialize, nil -} - -type NullableChannelPropertyAllOf struct { - value *ChannelPropertyAllOf - isSet bool -} - -func (v NullableChannelPropertyAllOf) Get() *ChannelPropertyAllOf { - return v.value -} - -func (v *NullableChannelPropertyAllOf) Set(val *ChannelPropertyAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableChannelPropertyAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableChannelPropertyAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChannelPropertyAllOf(val *ChannelPropertyAllOf) *NullableChannelPropertyAllOf { - return &NullableChannelPropertyAllOf{value: val, isSet: true} -} - -func (v NullableChannelPropertyAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChannelPropertyAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_create_payment_method_409_response.go b/payment_method/model_create_payment_method_409_response.go index 6fbf38fb..5f765154 100644 --- a/payment_method/model_create_payment_method_409_response.go +++ b/payment_method/model_create_payment_method_409_response.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_create_payment_method_503_response.go b/payment_method/model_create_payment_method_503_response.go index 0812b6b1..5ef387d9 100644 --- a/payment_method/model_create_payment_method_503_response.go +++ b/payment_method/model_create_payment_method_503_response.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_direct_debit.go b/payment_method/model_direct_debit.go index 0ff1836d..007ffc2a 100644 --- a/payment_method/model_direct_debit.go +++ b/payment_method/model_direct_debit.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -217,13 +217,14 @@ func (o DirectDebit) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["channel_code"] = o.ChannelCode toSerialize["channel_properties"] = o.ChannelProperties.Get() + toSerialize["type"] = o.Type if o.BankAccount.IsSet() { toSerialize["bank_account"] = o.BankAccount.Get() - } + } if o.DebitCard.IsSet() { toSerialize["debit_card"] = o.DebitCard.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_direct_debit_all_of.go b/payment_method/model_direct_debit_all_of.go index d905fda0..5b233ee1 100644 --- a/payment_method/model_direct_debit_all_of.go +++ b/payment_method/model_direct_debit_all_of.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -164,10 +164,10 @@ func (o DirectDebitAllOf) ToMap() (map[string]interface{}, error) { toSerialize["type"] = o.Type if o.BankAccount.IsSet() { toSerialize["bank_account"] = o.BankAccount.Get() - } + } if o.DebitCard.IsSet() { toSerialize["debit_card"] = o.DebitCard.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_direct_debit_bank_account.go b/payment_method/model_direct_debit_bank_account.go index a4bc5c40..46a9c8a0 100644 --- a/payment_method/model_direct_debit_bank_account.go +++ b/payment_method/model_direct_debit_bank_account.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -225,16 +225,16 @@ func (o DirectDebitBankAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.MaskedBankAccountNumber.IsSet() { toSerialize["masked_bank_account_number"] = o.MaskedBankAccountNumber.Get() - } + } if o.BankAccountHash.IsSet() { toSerialize["bank_account_hash"] = o.BankAccountHash.Get() - } + } if o.MobileNumber.IsSet() { toSerialize["mobile_number"] = o.MobileNumber.Get() - } + } if o.IdentityDocumentNumber.IsSet() { toSerialize["identity_document_number"] = o.IdentityDocumentNumber.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_direct_debit_channel_code.go b/payment_method/model_direct_debit_channel_code.go index f9ed5be2..a2acbb6e 100644 --- a/payment_method/model_direct_debit_channel_code.go +++ b/payment_method/model_direct_debit_channel_code.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_direct_debit_channel_properties.go b/payment_method/model_direct_debit_channel_properties.go index 921541c5..b1c745ee 100644 --- a/payment_method/model_direct_debit_channel_properties.go +++ b/payment_method/model_direct_debit_channel_properties.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -393,25 +393,25 @@ func (o DirectDebitChannelProperties) ToMap() (map[string]interface{}, error) { } if o.FailureReturnUrl.IsSet() { toSerialize["failure_return_url"] = o.FailureReturnUrl.Get() - } + } if o.MobileNumber.IsSet() { toSerialize["mobile_number"] = o.MobileNumber.Get() - } + } if o.CardLastFour.IsSet() { toSerialize["card_last_four"] = o.CardLastFour.Get() - } + } if o.CardExpiry.IsSet() { toSerialize["card_expiry"] = o.CardExpiry.Get() - } + } if o.Email.IsSet() { toSerialize["email"] = o.Email.Get() - } + } if o.IdentityDocumentNumber.IsSet() { toSerialize["identity_document_number"] = o.IdentityDocumentNumber.Get() - } + } if o.RequireAuth.IsSet() { toSerialize["require_auth"] = o.RequireAuth.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_direct_debit_debit_card.go b/payment_method/model_direct_debit_debit_card.go index b8550d44..f89e0784 100644 --- a/payment_method/model_direct_debit_debit_card.go +++ b/payment_method/model_direct_debit_debit_card.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -227,16 +227,16 @@ func (o DirectDebitDebitCard) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.MobileNumber.IsSet() { toSerialize["mobile_number"] = o.MobileNumber.Get() - } + } if o.CardLastFour.IsSet() { toSerialize["card_last_four"] = o.CardLastFour.Get() - } + } if o.CardExpiry.IsSet() { toSerialize["card_expiry"] = o.CardExpiry.Get() - } + } if o.Email.IsSet() { toSerialize["email"] = o.Email.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_direct_debit_parameters.go b/payment_method/model_direct_debit_parameters.go index d32d7850..4fd5ede4 100644 --- a/payment_method/model_direct_debit_parameters.go +++ b/payment_method/model_direct_debit_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -105,6 +105,7 @@ func (o DirectDebitParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["channel_code"] = o.ChannelCode toSerialize["channel_properties"] = o.ChannelProperties.Get() + return toSerialize, nil } diff --git a/payment_method/model_direct_debit_type.go b/payment_method/model_direct_debit_type.go index 9f3a96d8..dfa151cf 100644 --- a/payment_method/model_direct_debit_type.go +++ b/payment_method/model_direct_debit_type.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_e_wallet.go b/payment_method/model_e_wallet.go index 6031412e..2a1d0ce7 100644 --- a/payment_method/model_e_wallet.go +++ b/payment_method/model_e_wallet.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_e_wallet_account.go b/payment_method/model_e_wallet_account.go index 77b36179..477c4d28 100644 --- a/payment_method/model_e_wallet_account.go +++ b/payment_method/model_e_wallet_account.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -227,16 +227,16 @@ func (o EWalletAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Name.IsSet() { toSerialize["name"] = o.Name.Get() - } + } if o.AccountDetails.IsSet() { toSerialize["account_details"] = o.AccountDetails.Get() - } + } if o.Balance.IsSet() { toSerialize["balance"] = o.Balance.Get() - } + } if o.PointBalance.IsSet() { toSerialize["point_balance"] = o.PointBalance.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_e_wallet_channel_code.go b/payment_method/model_e_wallet_channel_code.go index f4d50443..44241bac 100644 --- a/payment_method/model_e_wallet_channel_code.go +++ b/payment_method/model_e_wallet_channel_code.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_e_wallet_channel_properties.go b/payment_method/model_e_wallet_channel_properties.go index 8212db86..19e08e1c 100644 --- a/payment_method/model_e_wallet_channel_properties.go +++ b/payment_method/model_e_wallet_channel_properties.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_e_wallet_parameters.go b/payment_method/model_e_wallet_parameters.go index 5542602b..09a9aae1 100644 --- a/payment_method/model_e_wallet_parameters.go +++ b/payment_method/model_e_wallet_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_get_all_payment_methods_400_response.go b/payment_method/model_get_all_payment_methods_400_response.go index ac2829af..05eb1bc2 100644 --- a/payment_method/model_get_all_payment_methods_400_response.go +++ b/payment_method/model_get_all_payment_methods_400_response.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_get_all_payment_methods_403_response.go b/payment_method/model_get_all_payment_methods_403_response.go index 7e581763..885ab402 100644 --- a/payment_method/model_get_all_payment_methods_403_response.go +++ b/payment_method/model_get_all_payment_methods_403_response.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_get_all_payment_methods_404_response.go b/payment_method/model_get_all_payment_methods_404_response.go index e238eee4..fb3461d2 100644 --- a/payment_method/model_get_all_payment_methods_404_response.go +++ b/payment_method/model_get_all_payment_methods_404_response.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_get_all_payment_methods_default_response.go b/payment_method/model_get_all_payment_methods_default_response.go index 3393deb7..6fc63e71 100644 --- a/payment_method/model_get_all_payment_methods_default_response.go +++ b/payment_method/model_get_all_payment_methods_default_response.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_over_the_counter.go b/payment_method/model_over_the_counter.go index 24be9cd2..d9262749 100644 --- a/payment_method/model_over_the_counter.go +++ b/payment_method/model_over_the_counter.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -179,7 +179,7 @@ func (o OverTheCounter) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_method/model_over_the_counter_channel_code.go b/payment_method/model_over_the_counter_channel_code.go index 54ed2eca..80198071 100644 --- a/payment_method/model_over_the_counter_channel_code.go +++ b/payment_method/model_over_the_counter_channel_code.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_over_the_counter_channel_properties.go b/payment_method/model_over_the_counter_channel_properties.go index 62c4d245..2e327cc6 100644 --- a/payment_method/model_over_the_counter_channel_properties.go +++ b/payment_method/model_over_the_counter_channel_properties.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_over_the_counter_channel_properties_update.go b/payment_method/model_over_the_counter_channel_properties_update.go index e8bee05c..20e77b2c 100644 --- a/payment_method/model_over_the_counter_channel_properties_update.go +++ b/payment_method/model_over_the_counter_channel_properties_update.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_over_the_counter_parameters.go b/payment_method/model_over_the_counter_parameters.go index e658848d..9f8047a7 100644 --- a/payment_method/model_over_the_counter_parameters.go +++ b/payment_method/model_over_the_counter_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -179,7 +179,7 @@ func (o OverTheCounterParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_method/model_over_the_counter_update_parameters.go b/payment_method/model_over_the_counter_update_parameters.go index 2100e75e..706020b3 100644 --- a/payment_method/model_over_the_counter_update_parameters.go +++ b/payment_method/model_over_the_counter_update_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -127,7 +127,7 @@ func (o OverTheCounterUpdateParameters) ToMap() (map[string]interface{}, error) toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.ChannelProperties) { toSerialize["channel_properties"] = o.ChannelProperties } diff --git a/payment_method/model_payment_channel.go b/payment_method/model_payment_channel.go deleted file mode 100644 index 655d1818..00000000 --- a/payment_method/model_payment_channel.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the PaymentChannel type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &PaymentChannel{} - -// PaymentChannel struct for PaymentChannel -type PaymentChannel struct { - // The specific Xendit code used to identify the partner channel - ChannelCode *string `json:"channel_code,omitempty"` - // The payment method type - Type *string `json:"type,omitempty"` - // The country where the channel operates in ISO 3166-2 country code - Country *string `json:"country,omitempty"` - // Official parter name of the payment channel - ChannelName *string `json:"channel_name,omitempty"` - ChannelProperties []ChannelProperty `json:"channel_properties,omitempty"` - // If available, this contains a URL to the logo of the partner channel - LogoUrl *string `json:"logo_url,omitempty"` - AmountLimits []ChannelAmountLimits `json:"amount_limits,omitempty"` -} - -// NewPaymentChannel instantiates a new PaymentChannel 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 NewPaymentChannel() *PaymentChannel { - this := PaymentChannel{} - return &this -} - -// NewPaymentChannelWithDefaults instantiates a new PaymentChannel 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 NewPaymentChannelWithDefaults() *PaymentChannel { - this := PaymentChannel{} - return &this -} - -// GetChannelCode returns the ChannelCode field value if set, zero value otherwise. -func (o *PaymentChannel) GetChannelCode() string { - if o == nil || utils.IsNil(o.ChannelCode) { - var ret string - return ret - } - return *o.ChannelCode -} - -// GetChannelCodeOk returns a tuple with the ChannelCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetChannelCodeOk() (*string, bool) { - if o == nil || utils.IsNil(o.ChannelCode) { - return nil, false - } - return o.ChannelCode, true -} - -// HasChannelCode returns a boolean if a field has been set. -func (o *PaymentChannel) HasChannelCode() bool { - if o != nil && !utils.IsNil(o.ChannelCode) { - return true - } - - return false -} - -// SetChannelCode gets a reference to the given string and assigns it to the ChannelCode field. -func (o *PaymentChannel) SetChannelCode(v string) { - o.ChannelCode = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *PaymentChannel) GetType() string { - if o == nil || utils.IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetTypeOk() (*string, bool) { - if o == nil || utils.IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *PaymentChannel) HasType() bool { - if o != nil && !utils.IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *PaymentChannel) SetType(v string) { - o.Type = &v -} - -// GetCountry returns the Country field value if set, zero value otherwise. -func (o *PaymentChannel) GetCountry() string { - if o == nil || utils.IsNil(o.Country) { - var ret string - return ret - } - return *o.Country -} - -// GetCountryOk returns a tuple with the Country field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetCountryOk() (*string, bool) { - if o == nil || utils.IsNil(o.Country) { - return nil, false - } - return o.Country, true -} - -// HasCountry returns a boolean if a field has been set. -func (o *PaymentChannel) HasCountry() bool { - if o != nil && !utils.IsNil(o.Country) { - return true - } - - return false -} - -// SetCountry gets a reference to the given string and assigns it to the Country field. -func (o *PaymentChannel) SetCountry(v string) { - o.Country = &v -} - -// GetChannelName returns the ChannelName field value if set, zero value otherwise. -func (o *PaymentChannel) GetChannelName() string { - if o == nil || utils.IsNil(o.ChannelName) { - var ret string - return ret - } - return *o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetChannelNameOk() (*string, bool) { - if o == nil || utils.IsNil(o.ChannelName) { - return nil, false - } - return o.ChannelName, true -} - -// HasChannelName returns a boolean if a field has been set. -func (o *PaymentChannel) HasChannelName() bool { - if o != nil && !utils.IsNil(o.ChannelName) { - return true - } - - return false -} - -// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. -func (o *PaymentChannel) SetChannelName(v string) { - o.ChannelName = &v -} - -// GetChannelProperties returns the ChannelProperties field value if set, zero value otherwise. -func (o *PaymentChannel) GetChannelProperties() []ChannelProperty { - if o == nil || utils.IsNil(o.ChannelProperties) { - var ret []ChannelProperty - return ret - } - return o.ChannelProperties -} - -// GetChannelPropertiesOk returns a tuple with the ChannelProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetChannelPropertiesOk() ([]ChannelProperty, bool) { - if o == nil || utils.IsNil(o.ChannelProperties) { - return nil, false - } - return o.ChannelProperties, true -} - -// HasChannelProperties returns a boolean if a field has been set. -func (o *PaymentChannel) HasChannelProperties() bool { - if o != nil && !utils.IsNil(o.ChannelProperties) { - return true - } - - return false -} - -// SetChannelProperties gets a reference to the given []ChannelProperty and assigns it to the ChannelProperties field. -func (o *PaymentChannel) SetChannelProperties(v []ChannelProperty) { - o.ChannelProperties = v -} - -// GetLogoUrl returns the LogoUrl field value if set, zero value otherwise. -func (o *PaymentChannel) GetLogoUrl() string { - if o == nil || utils.IsNil(o.LogoUrl) { - var ret string - return ret - } - return *o.LogoUrl -} - -// GetLogoUrlOk returns a tuple with the LogoUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetLogoUrlOk() (*string, bool) { - if o == nil || utils.IsNil(o.LogoUrl) { - return nil, false - } - return o.LogoUrl, true -} - -// HasLogoUrl returns a boolean if a field has been set. -func (o *PaymentChannel) HasLogoUrl() bool { - if o != nil && !utils.IsNil(o.LogoUrl) { - return true - } - - return false -} - -// SetLogoUrl gets a reference to the given string and assigns it to the LogoUrl field. -func (o *PaymentChannel) SetLogoUrl(v string) { - o.LogoUrl = &v -} - -// GetAmountLimits returns the AmountLimits field value if set, zero value otherwise. -func (o *PaymentChannel) GetAmountLimits() []ChannelAmountLimits { - if o == nil || utils.IsNil(o.AmountLimits) { - var ret []ChannelAmountLimits - return ret - } - return o.AmountLimits -} - -// GetAmountLimitsOk returns a tuple with the AmountLimits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannel) GetAmountLimitsOk() ([]ChannelAmountLimits, bool) { - if o == nil || utils.IsNil(o.AmountLimits) { - return nil, false - } - return o.AmountLimits, true -} - -// HasAmountLimits returns a boolean if a field has been set. -func (o *PaymentChannel) HasAmountLimits() bool { - if o != nil && !utils.IsNil(o.AmountLimits) { - return true - } - - return false -} - -// SetAmountLimits gets a reference to the given []ChannelAmountLimits and assigns it to the AmountLimits field. -func (o *PaymentChannel) SetAmountLimits(v []ChannelAmountLimits) { - o.AmountLimits = v -} - -func (o PaymentChannel) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentChannel) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.ChannelCode) { - toSerialize["channel_code"] = o.ChannelCode - } - if !utils.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !utils.IsNil(o.Country) { - toSerialize["country"] = o.Country - } - if !utils.IsNil(o.ChannelName) { - toSerialize["channel_name"] = o.ChannelName - } - if !utils.IsNil(o.ChannelProperties) { - toSerialize["channel_properties"] = o.ChannelProperties - } - if !utils.IsNil(o.LogoUrl) { - toSerialize["logo_url"] = o.LogoUrl - } - if !utils.IsNil(o.AmountLimits) { - toSerialize["amount_limits"] = o.AmountLimits - } - return toSerialize, nil -} - -type NullablePaymentChannel struct { - value *PaymentChannel - isSet bool -} - -func (v NullablePaymentChannel) Get() *PaymentChannel { - return v.value -} - -func (v *NullablePaymentChannel) Set(val *PaymentChannel) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentChannel) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentChannel) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentChannel(val *PaymentChannel) *NullablePaymentChannel { - return &NullablePaymentChannel{value: val, isSet: true} -} - -func (v NullablePaymentChannel) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentChannel) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_payment_channel_all_of.go b/payment_method/model_payment_channel_all_of.go deleted file mode 100644 index 1141bbab..00000000 --- a/payment_method/model_payment_channel_all_of.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the PaymentChannelAllOf type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &PaymentChannelAllOf{} - -// PaymentChannelAllOf struct for PaymentChannelAllOf -type PaymentChannelAllOf struct { - // The specific Xendit code used to identify the partner channel - ChannelCode *string `json:"channel_code,omitempty"` - // The payment method type - Type *string `json:"type,omitempty"` - // The country where the channel operates in ISO 3166-2 country code - Country *string `json:"country,omitempty"` - // Official parter name of the payment channel - ChannelName *string `json:"channel_name,omitempty"` - ChannelProperties []ChannelProperty `json:"channel_properties,omitempty"` - // If available, this contains a URL to the logo of the partner channel - LogoUrl *string `json:"logo_url,omitempty"` - AmountLimits []ChannelAmountLimits `json:"amount_limits,omitempty"` -} - -// NewPaymentChannelAllOf instantiates a new PaymentChannelAllOf 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 NewPaymentChannelAllOf() *PaymentChannelAllOf { - this := PaymentChannelAllOf{} - return &this -} - -// NewPaymentChannelAllOfWithDefaults instantiates a new PaymentChannelAllOf 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 NewPaymentChannelAllOfWithDefaults() *PaymentChannelAllOf { - this := PaymentChannelAllOf{} - return &this -} - -// GetChannelCode returns the ChannelCode field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetChannelCode() string { - if o == nil || utils.IsNil(o.ChannelCode) { - var ret string - return ret - } - return *o.ChannelCode -} - -// GetChannelCodeOk returns a tuple with the ChannelCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetChannelCodeOk() (*string, bool) { - if o == nil || utils.IsNil(o.ChannelCode) { - return nil, false - } - return o.ChannelCode, true -} - -// HasChannelCode returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasChannelCode() bool { - if o != nil && !utils.IsNil(o.ChannelCode) { - return true - } - - return false -} - -// SetChannelCode gets a reference to the given string and assigns it to the ChannelCode field. -func (o *PaymentChannelAllOf) SetChannelCode(v string) { - o.ChannelCode = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetType() string { - if o == nil || utils.IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetTypeOk() (*string, bool) { - if o == nil || utils.IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasType() bool { - if o != nil && !utils.IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *PaymentChannelAllOf) SetType(v string) { - o.Type = &v -} - -// GetCountry returns the Country field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetCountry() string { - if o == nil || utils.IsNil(o.Country) { - var ret string - return ret - } - return *o.Country -} - -// GetCountryOk returns a tuple with the Country field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetCountryOk() (*string, bool) { - if o == nil || utils.IsNil(o.Country) { - return nil, false - } - return o.Country, true -} - -// HasCountry returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasCountry() bool { - if o != nil && !utils.IsNil(o.Country) { - return true - } - - return false -} - -// SetCountry gets a reference to the given string and assigns it to the Country field. -func (o *PaymentChannelAllOf) SetCountry(v string) { - o.Country = &v -} - -// GetChannelName returns the ChannelName field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetChannelName() string { - if o == nil || utils.IsNil(o.ChannelName) { - var ret string - return ret - } - return *o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetChannelNameOk() (*string, bool) { - if o == nil || utils.IsNil(o.ChannelName) { - return nil, false - } - return o.ChannelName, true -} - -// HasChannelName returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasChannelName() bool { - if o != nil && !utils.IsNil(o.ChannelName) { - return true - } - - return false -} - -// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. -func (o *PaymentChannelAllOf) SetChannelName(v string) { - o.ChannelName = &v -} - -// GetChannelProperties returns the ChannelProperties field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetChannelProperties() []ChannelProperty { - if o == nil || utils.IsNil(o.ChannelProperties) { - var ret []ChannelProperty - return ret - } - return o.ChannelProperties -} - -// GetChannelPropertiesOk returns a tuple with the ChannelProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetChannelPropertiesOk() ([]ChannelProperty, bool) { - if o == nil || utils.IsNil(o.ChannelProperties) { - return nil, false - } - return o.ChannelProperties, true -} - -// HasChannelProperties returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasChannelProperties() bool { - if o != nil && !utils.IsNil(o.ChannelProperties) { - return true - } - - return false -} - -// SetChannelProperties gets a reference to the given []ChannelProperty and assigns it to the ChannelProperties field. -func (o *PaymentChannelAllOf) SetChannelProperties(v []ChannelProperty) { - o.ChannelProperties = v -} - -// GetLogoUrl returns the LogoUrl field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetLogoUrl() string { - if o == nil || utils.IsNil(o.LogoUrl) { - var ret string - return ret - } - return *o.LogoUrl -} - -// GetLogoUrlOk returns a tuple with the LogoUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetLogoUrlOk() (*string, bool) { - if o == nil || utils.IsNil(o.LogoUrl) { - return nil, false - } - return o.LogoUrl, true -} - -// HasLogoUrl returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasLogoUrl() bool { - if o != nil && !utils.IsNil(o.LogoUrl) { - return true - } - - return false -} - -// SetLogoUrl gets a reference to the given string and assigns it to the LogoUrl field. -func (o *PaymentChannelAllOf) SetLogoUrl(v string) { - o.LogoUrl = &v -} - -// GetAmountLimits returns the AmountLimits field value if set, zero value otherwise. -func (o *PaymentChannelAllOf) GetAmountLimits() []ChannelAmountLimits { - if o == nil || utils.IsNil(o.AmountLimits) { - var ret []ChannelAmountLimits - return ret - } - return o.AmountLimits -} - -// GetAmountLimitsOk returns a tuple with the AmountLimits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelAllOf) GetAmountLimitsOk() ([]ChannelAmountLimits, bool) { - if o == nil || utils.IsNil(o.AmountLimits) { - return nil, false - } - return o.AmountLimits, true -} - -// HasAmountLimits returns a boolean if a field has been set. -func (o *PaymentChannelAllOf) HasAmountLimits() bool { - if o != nil && !utils.IsNil(o.AmountLimits) { - return true - } - - return false -} - -// SetAmountLimits gets a reference to the given []ChannelAmountLimits and assigns it to the AmountLimits field. -func (o *PaymentChannelAllOf) SetAmountLimits(v []ChannelAmountLimits) { - o.AmountLimits = v -} - -func (o PaymentChannelAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentChannelAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.ChannelCode) { - toSerialize["channel_code"] = o.ChannelCode - } - if !utils.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !utils.IsNil(o.Country) { - toSerialize["country"] = o.Country - } - if !utils.IsNil(o.ChannelName) { - toSerialize["channel_name"] = o.ChannelName - } - if !utils.IsNil(o.ChannelProperties) { - toSerialize["channel_properties"] = o.ChannelProperties - } - if !utils.IsNil(o.LogoUrl) { - toSerialize["logo_url"] = o.LogoUrl - } - if !utils.IsNil(o.AmountLimits) { - toSerialize["amount_limits"] = o.AmountLimits - } - return toSerialize, nil -} - -type NullablePaymentChannelAllOf struct { - value *PaymentChannelAllOf - isSet bool -} - -func (v NullablePaymentChannelAllOf) Get() *PaymentChannelAllOf { - return v.value -} - -func (v *NullablePaymentChannelAllOf) Set(val *PaymentChannelAllOf) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentChannelAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentChannelAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentChannelAllOf(val *PaymentChannelAllOf) *NullablePaymentChannelAllOf { - return &NullablePaymentChannelAllOf{value: val, isSet: true} -} - -func (v NullablePaymentChannelAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentChannelAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_payment_channel_list.go b/payment_method/model_payment_channel_list.go deleted file mode 100644 index 2c79c30c..00000000 --- a/payment_method/model_payment_channel_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the PaymentChannelList type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &PaymentChannelList{} - -// PaymentChannelList struct for PaymentChannelList -type PaymentChannelList struct { - // Array of resources that match the provided filters - Data []PaymentChannel `json:"data,omitempty"` - // Array of objects that can be used to assist on navigating through the data - Links []PaymentChannelListLinksInner `json:"links,omitempty"` - // Indicates whether there are more items in the list - HasMore *bool `json:"has_more,omitempty"` -} - -// NewPaymentChannelList instantiates a new PaymentChannelList 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 NewPaymentChannelList() *PaymentChannelList { - this := PaymentChannelList{} - return &this -} - -// NewPaymentChannelListWithDefaults instantiates a new PaymentChannelList 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 NewPaymentChannelListWithDefaults() *PaymentChannelList { - this := PaymentChannelList{} - return &this -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *PaymentChannelList) GetData() []PaymentChannel { - if o == nil || utils.IsNil(o.Data) { - var ret []PaymentChannel - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelList) GetDataOk() ([]PaymentChannel, bool) { - if o == nil || utils.IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *PaymentChannelList) HasData() bool { - if o != nil && !utils.IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []PaymentChannel and assigns it to the Data field. -func (o *PaymentChannelList) SetData(v []PaymentChannel) { - o.Data = v -} - -// GetLinks returns the Links field value if set, zero value otherwise. -func (o *PaymentChannelList) GetLinks() []PaymentChannelListLinksInner { - if o == nil || utils.IsNil(o.Links) { - var ret []PaymentChannelListLinksInner - return ret - } - return o.Links -} - -// GetLinksOk returns a tuple with the Links field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelList) GetLinksOk() ([]PaymentChannelListLinksInner, bool) { - if o == nil || utils.IsNil(o.Links) { - return nil, false - } - return o.Links, true -} - -// HasLinks returns a boolean if a field has been set. -func (o *PaymentChannelList) HasLinks() bool { - if o != nil && !utils.IsNil(o.Links) { - return true - } - - return false -} - -// SetLinks gets a reference to the given []PaymentChannelListLinksInner and assigns it to the Links field. -func (o *PaymentChannelList) SetLinks(v []PaymentChannelListLinksInner) { - o.Links = v -} - -// GetHasMore returns the HasMore field value if set, zero value otherwise. -func (o *PaymentChannelList) GetHasMore() bool { - if o == nil || utils.IsNil(o.HasMore) { - var ret bool - return ret - } - return *o.HasMore -} - -// GetHasMoreOk returns a tuple with the HasMore field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelList) GetHasMoreOk() (*bool, bool) { - if o == nil || utils.IsNil(o.HasMore) { - return nil, false - } - return o.HasMore, true -} - -// HasHasMore returns a boolean if a field has been set. -func (o *PaymentChannelList) HasHasMore() bool { - if o != nil && !utils.IsNil(o.HasMore) { - return true - } - - return false -} - -// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. -func (o *PaymentChannelList) SetHasMore(v bool) { - o.HasMore = &v -} - -func (o PaymentChannelList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentChannelList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Data) { - toSerialize["data"] = o.Data - } - if !utils.IsNil(o.Links) { - toSerialize["links"] = o.Links - } - if !utils.IsNil(o.HasMore) { - toSerialize["has_more"] = o.HasMore - } - return toSerialize, nil -} - -type NullablePaymentChannelList struct { - value *PaymentChannelList - isSet bool -} - -func (v NullablePaymentChannelList) Get() *PaymentChannelList { - return v.value -} - -func (v *NullablePaymentChannelList) Set(val *PaymentChannelList) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentChannelList) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentChannelList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentChannelList(val *PaymentChannelList) *NullablePaymentChannelList { - return &NullablePaymentChannelList{value: val, isSet: true} -} - -func (v NullablePaymentChannelList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentChannelList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_payment_channel_list_links_inner.go b/payment_method/model_payment_channel_list_links_inner.go deleted file mode 100644 index 79f613ef..00000000 --- a/payment_method/model_payment_channel_list_links_inner.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the PaymentChannelListLinksInner type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &PaymentChannelListLinksInner{} - -// PaymentChannelListLinksInner struct for PaymentChannelListLinksInner -type PaymentChannelListLinksInner struct { - // Target URI that should contain a target to Internationalized Resource Identifiers (IRI) - Href *string `json:"href,omitempty"` - // The link relation type described how the current context (source) is related to target resource - Rel *string `json:"rel,omitempty"` - // The HTTP method to be used to call `href` - Method *string `json:"method,omitempty"` -} - -// NewPaymentChannelListLinksInner instantiates a new PaymentChannelListLinksInner 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 NewPaymentChannelListLinksInner() *PaymentChannelListLinksInner { - this := PaymentChannelListLinksInner{} - return &this -} - -// NewPaymentChannelListLinksInnerWithDefaults instantiates a new PaymentChannelListLinksInner 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 NewPaymentChannelListLinksInnerWithDefaults() *PaymentChannelListLinksInner { - this := PaymentChannelListLinksInner{} - return &this -} - -// GetHref returns the Href field value if set, zero value otherwise. -func (o *PaymentChannelListLinksInner) GetHref() string { - if o == nil || utils.IsNil(o.Href) { - var ret string - return ret - } - return *o.Href -} - -// GetHrefOk returns a tuple with the Href field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelListLinksInner) GetHrefOk() (*string, bool) { - if o == nil || utils.IsNil(o.Href) { - return nil, false - } - return o.Href, true -} - -// HasHref returns a boolean if a field has been set. -func (o *PaymentChannelListLinksInner) HasHref() bool { - if o != nil && !utils.IsNil(o.Href) { - return true - } - - return false -} - -// SetHref gets a reference to the given string and assigns it to the Href field. -func (o *PaymentChannelListLinksInner) SetHref(v string) { - o.Href = &v -} - -// GetRel returns the Rel field value if set, zero value otherwise. -func (o *PaymentChannelListLinksInner) GetRel() string { - if o == nil || utils.IsNil(o.Rel) { - var ret string - return ret - } - return *o.Rel -} - -// GetRelOk returns a tuple with the Rel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelListLinksInner) GetRelOk() (*string, bool) { - if o == nil || utils.IsNil(o.Rel) { - return nil, false - } - return o.Rel, true -} - -// HasRel returns a boolean if a field has been set. -func (o *PaymentChannelListLinksInner) HasRel() bool { - if o != nil && !utils.IsNil(o.Rel) { - return true - } - - return false -} - -// SetRel gets a reference to the given string and assigns it to the Rel field. -func (o *PaymentChannelListLinksInner) SetRel(v string) { - o.Rel = &v -} - -// GetMethod returns the Method field value if set, zero value otherwise. -func (o *PaymentChannelListLinksInner) GetMethod() string { - if o == nil || utils.IsNil(o.Method) { - var ret string - return ret - } - return *o.Method -} - -// GetMethodOk returns a tuple with the Method field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelListLinksInner) GetMethodOk() (*string, bool) { - if o == nil || utils.IsNil(o.Method) { - return nil, false - } - return o.Method, true -} - -// HasMethod returns a boolean if a field has been set. -func (o *PaymentChannelListLinksInner) HasMethod() bool { - if o != nil && !utils.IsNil(o.Method) { - return true - } - - return false -} - -// SetMethod gets a reference to the given string and assigns it to the Method field. -func (o *PaymentChannelListLinksInner) SetMethod(v string) { - o.Method = &v -} - -func (o PaymentChannelListLinksInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentChannelListLinksInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Href) { - toSerialize["href"] = o.Href - } - if !utils.IsNil(o.Rel) { - toSerialize["rel"] = o.Rel - } - if !utils.IsNil(o.Method) { - toSerialize["method"] = o.Method - } - return toSerialize, nil -} - -type NullablePaymentChannelListLinksInner struct { - value *PaymentChannelListLinksInner - isSet bool -} - -func (v NullablePaymentChannelListLinksInner) Get() *PaymentChannelListLinksInner { - return v.value -} - -func (v *NullablePaymentChannelListLinksInner) Set(val *PaymentChannelListLinksInner) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentChannelListLinksInner) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentChannelListLinksInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentChannelListLinksInner(val *PaymentChannelListLinksInner) *NullablePaymentChannelListLinksInner { - return &NullablePaymentChannelListLinksInner{value: val, isSet: true} -} - -func (v NullablePaymentChannelListLinksInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentChannelListLinksInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_payment_channel_list_links_inner_all_of.go b/payment_method/model_payment_channel_list_links_inner_all_of.go deleted file mode 100644 index ce646626..00000000 --- a/payment_method/model_payment_channel_list_links_inner_all_of.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -Payment Method Service v2 - -This API is used for Payment Method Service v2 - -API version: 2.87.2 -*/ - - -package payment_method - -import ( - "encoding/json" - - utils "github.com/xendit/xendit-go/v3/utils" -) - -// checks if the PaymentChannelListLinksInnerAllOf type satisfies the MappedNullable interface at compile time -var _ utils.MappedNullable = &PaymentChannelListLinksInnerAllOf{} - -// PaymentChannelListLinksInnerAllOf struct for PaymentChannelListLinksInnerAllOf -type PaymentChannelListLinksInnerAllOf struct { - // Target URI that should contain a target to Internationalized Resource Identifiers (IRI) - Href *string `json:"href,omitempty"` - // The link relation type described how the current context (source) is related to target resource - Rel *string `json:"rel,omitempty"` - // The HTTP method to be used to call `href` - Method *string `json:"method,omitempty"` -} - -// NewPaymentChannelListLinksInnerAllOf instantiates a new PaymentChannelListLinksInnerAllOf 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 NewPaymentChannelListLinksInnerAllOf() *PaymentChannelListLinksInnerAllOf { - this := PaymentChannelListLinksInnerAllOf{} - return &this -} - -// NewPaymentChannelListLinksInnerAllOfWithDefaults instantiates a new PaymentChannelListLinksInnerAllOf 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 NewPaymentChannelListLinksInnerAllOfWithDefaults() *PaymentChannelListLinksInnerAllOf { - this := PaymentChannelListLinksInnerAllOf{} - return &this -} - -// GetHref returns the Href field value if set, zero value otherwise. -func (o *PaymentChannelListLinksInnerAllOf) GetHref() string { - if o == nil || utils.IsNil(o.Href) { - var ret string - return ret - } - return *o.Href -} - -// GetHrefOk returns a tuple with the Href field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelListLinksInnerAllOf) GetHrefOk() (*string, bool) { - if o == nil || utils.IsNil(o.Href) { - return nil, false - } - return o.Href, true -} - -// HasHref returns a boolean if a field has been set. -func (o *PaymentChannelListLinksInnerAllOf) HasHref() bool { - if o != nil && !utils.IsNil(o.Href) { - return true - } - - return false -} - -// SetHref gets a reference to the given string and assigns it to the Href field. -func (o *PaymentChannelListLinksInnerAllOf) SetHref(v string) { - o.Href = &v -} - -// GetRel returns the Rel field value if set, zero value otherwise. -func (o *PaymentChannelListLinksInnerAllOf) GetRel() string { - if o == nil || utils.IsNil(o.Rel) { - var ret string - return ret - } - return *o.Rel -} - -// GetRelOk returns a tuple with the Rel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelListLinksInnerAllOf) GetRelOk() (*string, bool) { - if o == nil || utils.IsNil(o.Rel) { - return nil, false - } - return o.Rel, true -} - -// HasRel returns a boolean if a field has been set. -func (o *PaymentChannelListLinksInnerAllOf) HasRel() bool { - if o != nil && !utils.IsNil(o.Rel) { - return true - } - - return false -} - -// SetRel gets a reference to the given string and assigns it to the Rel field. -func (o *PaymentChannelListLinksInnerAllOf) SetRel(v string) { - o.Rel = &v -} - -// GetMethod returns the Method field value if set, zero value otherwise. -func (o *PaymentChannelListLinksInnerAllOf) GetMethod() string { - if o == nil || utils.IsNil(o.Method) { - var ret string - return ret - } - return *o.Method -} - -// GetMethodOk returns a tuple with the Method field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentChannelListLinksInnerAllOf) GetMethodOk() (*string, bool) { - if o == nil || utils.IsNil(o.Method) { - return nil, false - } - return o.Method, true -} - -// HasMethod returns a boolean if a field has been set. -func (o *PaymentChannelListLinksInnerAllOf) HasMethod() bool { - if o != nil && !utils.IsNil(o.Method) { - return true - } - - return false -} - -// SetMethod gets a reference to the given string and assigns it to the Method field. -func (o *PaymentChannelListLinksInnerAllOf) SetMethod(v string) { - o.Method = &v -} - -func (o PaymentChannelListLinksInnerAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentChannelListLinksInnerAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !utils.IsNil(o.Href) { - toSerialize["href"] = o.Href - } - if !utils.IsNil(o.Rel) { - toSerialize["rel"] = o.Rel - } - if !utils.IsNil(o.Method) { - toSerialize["method"] = o.Method - } - return toSerialize, nil -} - -type NullablePaymentChannelListLinksInnerAllOf struct { - value *PaymentChannelListLinksInnerAllOf - isSet bool -} - -func (v NullablePaymentChannelListLinksInnerAllOf) Get() *PaymentChannelListLinksInnerAllOf { - return v.value -} - -func (v *NullablePaymentChannelListLinksInnerAllOf) Set(val *PaymentChannelListLinksInnerAllOf) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentChannelListLinksInnerAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentChannelListLinksInnerAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentChannelListLinksInnerAllOf(val *PaymentChannelListLinksInnerAllOf) *NullablePaymentChannelListLinksInnerAllOf { - return &NullablePaymentChannelListLinksInnerAllOf{value: val, isSet: true} -} - -func (v NullablePaymentChannelListLinksInnerAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentChannelListLinksInnerAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/payment_method/model_payment_method.go b/payment_method/model_payment_method.go index b8df734a..1a43c834 100644 --- a/payment_method/model_payment_method.go +++ b/payment_method/model_payment_method.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -883,16 +883,16 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { } if o.CustomerId.IsSet() { toSerialize["customer_id"] = o.CustomerId.Get() - } + } if o.Customer != nil { toSerialize["customer"] = o.Customer - } + } if !utils.IsNil(o.ReferenceId) { toSerialize["reference_id"] = o.ReferenceId } if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() - } + } if !utils.IsNil(o.Status) { toSerialize["status"] = o.Status } @@ -904,13 +904,13 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } if o.BillingInformation.IsSet() { toSerialize["billing_information"] = o.BillingInformation.Get() - } + } if o.FailureCode.IsSet() { toSerialize["failure_code"] = o.FailureCode.Get() - } + } if !utils.IsNil(o.Created) { toSerialize["created"] = o.Created } @@ -919,22 +919,22 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { } if o.Ewallet.IsSet() { toSerialize["ewallet"] = o.Ewallet.Get() - } + } if o.DirectDebit.IsSet() { toSerialize["direct_debit"] = o.DirectDebit.Get() - } + } if o.OverTheCounter.IsSet() { toSerialize["over_the_counter"] = o.OverTheCounter.Get() - } + } if o.Card.IsSet() { toSerialize["card"] = o.Card.Get() - } + } if o.QrCode.IsSet() { toSerialize["qr_code"] = o.QrCode.Get() - } + } if o.VirtualAccount.IsSet() { toSerialize["virtual_account"] = o.VirtualAccount.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_payment_method_action.go b/payment_method/model_payment_method_action.go index eb899726..a6d78813 100644 --- a/payment_method/model_payment_method_action.go +++ b/payment_method/model_payment_method_action.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_auth_parameters.go b/payment_method/model_payment_method_auth_parameters.go index 3b2c83b7..6f0bdc98 100644 --- a/payment_method/model_payment_method_auth_parameters.go +++ b/payment_method/model_payment_method_auth_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_country.go b/payment_method/model_payment_method_country.go index 28bc0016..1915498f 100644 --- a/payment_method/model_payment_method_country.go +++ b/payment_method/model_payment_method_country.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_expire_parameters.go b/payment_method/model_payment_method_expire_parameters.go index 71efa488..68cd722f 100644 --- a/payment_method/model_payment_method_expire_parameters.go +++ b/payment_method/model_payment_method_expire_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -139,10 +139,10 @@ func (o PaymentMethodExpireParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.SuccessReturnUrl.IsSet() { toSerialize["success_return_url"] = o.SuccessReturnUrl.Get() - } + } if o.FailureReturnUrl.IsSet() { toSerialize["failure_return_url"] = o.FailureReturnUrl.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_payment_method_list.go b/payment_method/model_payment_method_list.go index dde8e410..fc2a889a 100644 --- a/payment_method/model_payment_method_list.go +++ b/payment_method/model_payment_method_list.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_parameters.go b/payment_method/model_payment_method_parameters.go index 34fb7005..fb8e8ef1 100644 --- a/payment_method/model_payment_method_parameters.go +++ b/payment_method/model_payment_method_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -541,17 +541,17 @@ func (o PaymentMethodParameters) ToMap() (map[string]interface{}, error) { toSerialize["type"] = o.Type if o.Country.IsSet() { toSerialize["country"] = o.Country.Get() - } + } toSerialize["reusability"] = o.Reusability if o.CustomerId.IsSet() { toSerialize["customer_id"] = o.CustomerId.Get() - } + } if !utils.IsNil(o.ReferenceId) { toSerialize["reference_id"] = o.ReferenceId } if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() - } + } if !utils.IsNil(o.Card) { toSerialize["card"] = o.Card } @@ -572,10 +572,10 @@ func (o PaymentMethodParameters) ToMap() (map[string]interface{}, error) { } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } if o.BillingInformation.IsSet() { toSerialize["billing_information"] = o.BillingInformation.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_payment_method_reusability.go b/payment_method/model_payment_method_reusability.go index a36997e3..e0cac850 100644 --- a/payment_method/model_payment_method_reusability.go +++ b/payment_method/model_payment_method_reusability.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_status.go b/payment_method/model_payment_method_status.go index 43562bb9..b59f0e51 100644 --- a/payment_method/model_payment_method_status.go +++ b/payment_method/model_payment_method_status.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_type.go b/payment_method/model_payment_method_type.go index d967cde9..4674286d 100644 --- a/payment_method/model_payment_method_type.go +++ b/payment_method/model_payment_method_type.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_payment_method_update_parameters.go b/payment_method/model_payment_method_update_parameters.go index b7242658..9fc3593f 100644 --- a/payment_method/model_payment_method_update_parameters.go +++ b/payment_method/model_payment_method_update_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_qr_code.go b/payment_method/model_qr_code.go index ca4ba3e7..bf035fac 100644 --- a/payment_method/model_qr_code.go +++ b/payment_method/model_qr_code.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -213,16 +213,16 @@ func (o QRCode) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } if o.ChannelCode.IsSet() { toSerialize["channel_code"] = o.ChannelCode.Get() - } + } if o.ChannelProperties.IsSet() { toSerialize["channel_properties"] = o.ChannelProperties.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_qr_code_channel_code.go b/payment_method/model_qr_code_channel_code.go index 1aaa4a0e..e23658b1 100644 --- a/payment_method/model_qr_code_channel_code.go +++ b/payment_method/model_qr_code_channel_code.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_qr_code_channel_properties.go b/payment_method/model_qr_code_channel_properties.go index d3c0a5cb..ecc3f23e 100644 --- a/payment_method/model_qr_code_channel_properties.go +++ b/payment_method/model_qr_code_channel_properties.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_qr_code_parameters.go b/payment_method/model_qr_code_parameters.go index da298232..8d196a0e 100644 --- a/payment_method/model_qr_code_parameters.go +++ b/payment_method/model_qr_code_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -213,16 +213,16 @@ func (o QRCodeParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } if o.ChannelCode.IsSet() { toSerialize["channel_code"] = o.ChannelCode.Get() - } + } if o.ChannelProperties.IsSet() { toSerialize["channel_properties"] = o.ChannelProperties.Get() - } + } return toSerialize, nil } diff --git a/payment_method/model_simulate_payment_request.go b/payment_method/model_simulate_payment_request.go index fd2a373c..5f44339a 100644 --- a/payment_method/model_simulate_payment_request.go +++ b/payment_method/model_simulate_payment_request.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_tokenized_card_information.go b/payment_method/model_tokenized_card_information.go index 148952c5..d5c63dda 100644 --- a/payment_method/model_tokenized_card_information.go +++ b/payment_method/model_tokenized_card_information.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -339,7 +339,7 @@ func (o TokenizedCardInformation) ToMap() (map[string]interface{}, error) { toSerialize["masked_card_number"] = o.MaskedCardNumber if o.CardholderName.IsSet() { toSerialize["cardholder_name"] = o.CardholderName.Get() - } + } toSerialize["expiry_month"] = o.ExpiryMonth toSerialize["expiry_year"] = o.ExpiryYear toSerialize["fingerprint"] = o.Fingerprint diff --git a/payment_method/model_virtual_account.go b/payment_method/model_virtual_account.go index e1cdcff0..54160335 100644 --- a/payment_method/model_virtual_account.go +++ b/payment_method/model_virtual_account.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -332,13 +332,13 @@ func (o VirtualAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if o.MinAmount.IsSet() { toSerialize["min_amount"] = o.MinAmount.Get() - } + } if o.MaxAmount.IsSet() { toSerialize["max_amount"] = o.MaxAmount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_method/model_virtual_account_all_of.go b/payment_method/model_virtual_account_all_of.go index 709dae87..d78f4ea1 100644 --- a/payment_method/model_virtual_account_all_of.go +++ b/payment_method/model_virtual_account_all_of.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_virtual_account_alternative_display.go b/payment_method/model_virtual_account_alternative_display.go index 14790a6d..cb71411f 100644 --- a/payment_method/model_virtual_account_alternative_display.go +++ b/payment_method/model_virtual_account_alternative_display.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_virtual_account_channel_code.go b/payment_method/model_virtual_account_channel_code.go index ec8765a8..bb3c383d 100644 --- a/payment_method/model_virtual_account_channel_code.go +++ b/payment_method/model_virtual_account_channel_code.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_virtual_account_channel_properties.go b/payment_method/model_virtual_account_channel_properties.go index da8ab8f4..23afc79a 100644 --- a/payment_method/model_virtual_account_channel_properties.go +++ b/payment_method/model_virtual_account_channel_properties.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_virtual_account_channel_properties_patch.go b/payment_method/model_virtual_account_channel_properties_patch.go index fbf2cf06..071197a3 100644 --- a/payment_method/model_virtual_account_channel_properties_patch.go +++ b/payment_method/model_virtual_account_channel_properties_patch.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ diff --git a/payment_method/model_virtual_account_parameters.go b/payment_method/model_virtual_account_parameters.go index d6c277de..d66206d7 100644 --- a/payment_method/model_virtual_account_parameters.go +++ b/payment_method/model_virtual_account_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -299,13 +299,13 @@ func (o VirtualAccountParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if o.MinAmount.IsSet() { toSerialize["min_amount"] = o.MinAmount.Get() - } + } if o.MaxAmount.IsSet() { toSerialize["max_amount"] = o.MaxAmount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_method/model_virtual_account_update_parameters.go b/payment_method/model_virtual_account_update_parameters.go index aaa7b834..5652360c 100644 --- a/payment_method/model_virtual_account_update_parameters.go +++ b/payment_method/model_virtual_account_update_parameters.go @@ -3,7 +3,7 @@ Payment Method Service v2 This API is used for Payment Method Service v2 -API version: 2.87.2 +API version: 2.89.1 */ @@ -247,13 +247,13 @@ func (o VirtualAccountUpdateParameters) ToMap() (map[string]interface{}, error) toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if o.MinAmount.IsSet() { toSerialize["min_amount"] = o.MinAmount.Get() - } + } if o.MaxAmount.IsSet() { toSerialize["max_amount"] = o.MaxAmount.Get() - } + } if !utils.IsNil(o.ChannelProperties) { toSerialize["channel_properties"] = o.ChannelProperties } diff --git a/payment_request/model_capture.go b/payment_request/model_capture.go index 224f1e45..c6dca18b 100644 --- a/payment_request/model_capture.go +++ b/payment_request/model_capture.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -455,15 +455,21 @@ func (o Capture) ToMap() (map[string]interface{}, error) { toSerialize["authorized_amount"] = o.AuthorizedAmount toSerialize["captured_amount"] = o.CapturedAmount toSerialize["status"] = o.Status + if o.Status != "SUCCEEDED" && o.Status != "FAILED" { + toSerialize["status"] = nil + return toSerialize, utils.NewError("invalid value for Status when marshalling to JSON, must be one of SUCCEEDED, FAILED") + } toSerialize["payment_method"] = o.PaymentMethod toSerialize["failure_code"] = o.FailureCode.Get() + toSerialize["customer_id"] = o.CustomerId.Get() + if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } if o.ChannelProperties != nil { toSerialize["channel_properties"] = o.ChannelProperties - } + } toSerialize["created"] = o.Created toSerialize["updated"] = o.Updated return toSerialize, nil diff --git a/payment_request/model_capture_list_response.go b/payment_request/model_capture_list_response.go index 3cc34015..c43e03ba 100644 --- a/payment_request/model_capture_list_response.go +++ b/payment_request/model_capture_list_response.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_capture_parameters.go b/payment_request/model_capture_parameters.go index 166fd307..7ac835ad 100644 --- a/payment_request/model_capture_parameters.go +++ b/payment_request/model_capture_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -120,7 +120,7 @@ func (o CaptureParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.ReferenceId.IsSet() { toSerialize["reference_id"] = o.ReferenceId.Get() - } + } toSerialize["capture_amount"] = o.CaptureAmount return toSerialize, nil } diff --git a/payment_request/model_card.go b/payment_request/model_card.go index ba07b45f..5f4e42ff 100644 --- a/payment_request/model_card.go +++ b/payment_request/model_card.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -175,7 +175,7 @@ func (o Card) ToMap() (map[string]interface{}, error) { toSerialize["card_information"] = o.CardInformation if o.CardVerificationResults.IsSet() { toSerialize["card_verification_results"] = o.CardVerificationResults.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_card_channel_properties.go b/payment_request/model_card_channel_properties.go index e2ce6a94..14f5fbb9 100644 --- a/payment_request/model_card_channel_properties.go +++ b/payment_request/model_card_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -261,16 +261,16 @@ func (o CardChannelProperties) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.SkipThreeDSecure.IsSet() { toSerialize["skip_three_d_secure"] = o.SkipThreeDSecure.Get() - } + } if o.SuccessReturnUrl.IsSet() { toSerialize["success_return_url"] = o.SuccessReturnUrl.Get() - } + } if o.FailureReturnUrl.IsSet() { toSerialize["failure_return_url"] = o.FailureReturnUrl.Get() - } + } if o.CardonfileType.IsSet() { toSerialize["cardonfile_type"] = o.CardonfileType.Get() - } + } if !utils.IsNil(o.MerchantIdTag) { toSerialize["merchant_id_tag"] = o.MerchantIdTag } diff --git a/payment_request/model_card_information.go b/payment_request/model_card_information.go index 97b9c96e..b8f2e212 100644 --- a/payment_request/model_card_information.go +++ b/payment_request/model_card_information.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -371,7 +371,7 @@ func (o CardInformation) ToMap() (map[string]interface{}, error) { toSerialize["expiry_year"] = o.ExpiryYear if o.CardholderName.IsSet() { toSerialize["cardholder_name"] = o.CardholderName.Get() - } + } if !utils.IsNil(o.Fingerprint) { toSerialize["fingerprint"] = o.Fingerprint } diff --git a/payment_request/model_card_verification_results.go b/payment_request/model_card_verification_results.go index 1196f890..57a958b4 100644 --- a/payment_request/model_card_verification_results.go +++ b/payment_request/model_card_verification_results.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -173,10 +173,10 @@ func (o CardVerificationResults) ToMap() (map[string]interface{}, error) { } if o.CvvResult.IsSet() { toSerialize["cvv_result"] = o.CvvResult.Get() - } + } if o.AddressVerificationResult.IsSet() { toSerialize["address_verification_result"] = o.AddressVerificationResult.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_card_verification_results_three_d_secure.go b/payment_request/model_card_verification_results_three_d_secure.go index adfe7888..c48d30b4 100644 --- a/payment_request/model_card_verification_results_three_d_secure.go +++ b/payment_request/model_card_verification_results_three_d_secure.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -266,19 +266,23 @@ func (o CardVerificationResultsThreeDSecure) ToMap() (map[string]interface{}, er toSerialize := map[string]interface{}{} if o.ThreeDSecureFlow.IsSet() { toSerialize["three_d_secure_flow"] = o.ThreeDSecureFlow.Get() - } + if o.ThreeDSecureFlow.Get() != nil && (*o.ThreeDSecureFlow.Get() != "CHALLENGE" && *o.ThreeDSecureFlow.Get() != "FRICTIONLESS") { + toSerialize["three_d_secure_flow"] = nil + return toSerialize, utils.NewError("invalid value for ThreeDSecureFlow when marshalling to JSON, must be one of CHALLENGE, FRICTIONLESS") + } + } if o.EciCode.IsSet() { toSerialize["eci_code"] = o.EciCode.Get() - } + } if o.ThreeDSecureResult.IsSet() { toSerialize["three_d_secure_result"] = o.ThreeDSecureResult.Get() - } + } if o.ThreeDSecureResultReason.IsSet() { toSerialize["three_d_secure_result_reason"] = o.ThreeDSecureResultReason.Get() - } + } if o.ThreeDSecureVersion.IsSet() { toSerialize["three_d_secure_version"] = o.ThreeDSecureVersion.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_direct_debit.go b/payment_request/model_direct_debit.go index 16e675ce..128d527d 100644 --- a/payment_request/model_direct_debit.go +++ b/payment_request/model_direct_debit.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -217,13 +217,14 @@ func (o DirectDebit) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["channel_code"] = o.ChannelCode toSerialize["channel_properties"] = o.ChannelProperties.Get() + toSerialize["type"] = o.Type if o.BankAccount.IsSet() { toSerialize["bank_account"] = o.BankAccount.Get() - } + } if o.DebitCard.IsSet() { toSerialize["debit_card"] = o.DebitCard.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_direct_debit_all_of.go b/payment_request/model_direct_debit_all_of.go index 4f6c8d42..2c08711e 100644 --- a/payment_request/model_direct_debit_all_of.go +++ b/payment_request/model_direct_debit_all_of.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -164,10 +164,10 @@ func (o DirectDebitAllOf) ToMap() (map[string]interface{}, error) { toSerialize["type"] = o.Type if o.BankAccount.IsSet() { toSerialize["bank_account"] = o.BankAccount.Get() - } + } if o.DebitCard.IsSet() { toSerialize["debit_card"] = o.DebitCard.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_direct_debit_bank_account.go b/payment_request/model_direct_debit_bank_account.go index 0a8c9625..76064e57 100644 --- a/payment_request/model_direct_debit_bank_account.go +++ b/payment_request/model_direct_debit_bank_account.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -137,10 +137,10 @@ func (o DirectDebitBankAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.MaskedBankAccountNumber.IsSet() { toSerialize["masked_bank_account_number"] = o.MaskedBankAccountNumber.Get() - } + } if o.BankAccountHash.IsSet() { toSerialize["bank_account_hash"] = o.BankAccountHash.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_direct_debit_channel_code.go b/payment_request/model_direct_debit_channel_code.go index 1e925d5d..71c6a0d4 100644 --- a/payment_request/model_direct_debit_channel_code.go +++ b/payment_request/model_direct_debit_channel_code.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_direct_debit_channel_properties.go b/payment_request/model_direct_debit_channel_properties.go index fcc65533..5657a5ef 100644 --- a/payment_request/model_direct_debit_channel_properties.go +++ b/payment_request/model_direct_debit_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_direct_debit_channel_properties_bank_account.go b/payment_request/model_direct_debit_channel_properties_bank_account.go index 2045af72..79477d6d 100644 --- a/payment_request/model_direct_debit_channel_properties_bank_account.go +++ b/payment_request/model_direct_debit_channel_properties_bank_account.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_direct_debit_channel_properties_bank_redirect.go b/payment_request/model_direct_debit_channel_properties_bank_redirect.go index 878283b0..ba3194f2 100644 --- a/payment_request/model_direct_debit_channel_properties_bank_redirect.go +++ b/payment_request/model_direct_debit_channel_properties_bank_redirect.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_direct_debit_channel_properties_debit_card.go b/payment_request/model_direct_debit_channel_properties_debit_card.go index 57254211..1efb5284 100644 --- a/payment_request/model_direct_debit_channel_properties_debit_card.go +++ b/payment_request/model_direct_debit_channel_properties_debit_card.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_direct_debit_debit_card.go b/payment_request/model_direct_debit_debit_card.go index 3d4446cf..041d3147 100644 --- a/payment_request/model_direct_debit_debit_card.go +++ b/payment_request/model_direct_debit_debit_card.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -260,19 +260,19 @@ func (o DirectDebitDebitCard) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.MobileNumber.IsSet() { toSerialize["mobile_number"] = o.MobileNumber.Get() - } + } if !utils.IsNil(o.AccountNumber) { toSerialize["account_number"] = o.AccountNumber } if o.CardLastFour.IsSet() { toSerialize["card_last_four"] = o.CardLastFour.Get() - } + } if o.CardExpiry.IsSet() { toSerialize["card_expiry"] = o.CardExpiry.Get() - } + } if o.Email.IsSet() { toSerialize["email"] = o.Email.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_direct_debit_parameters.go b/payment_request/model_direct_debit_parameters.go index b591b8d8..7e42465b 100644 --- a/payment_request/model_direct_debit_parameters.go +++ b/payment_request/model_direct_debit_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -138,6 +138,7 @@ func (o DirectDebitParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["channel_code"] = o.ChannelCode toSerialize["channel_properties"] = o.ChannelProperties.Get() + if !utils.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/payment_request/model_direct_debit_type.go b/payment_request/model_direct_debit_type.go index 3a997946..748c0b96 100644 --- a/payment_request/model_direct_debit_type.go +++ b/payment_request/model_direct_debit_type.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_e_wallet.go b/payment_request/model_e_wallet.go index 7d414ddf..ed713322 100644 --- a/payment_request/model_e_wallet.go +++ b/payment_request/model_e_wallet.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_e_wallet_account.go b/payment_request/model_e_wallet_account.go index 5538b678..4de4c438 100644 --- a/payment_request/model_e_wallet_account.go +++ b/payment_request/model_e_wallet_account.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -227,16 +227,16 @@ func (o EWalletAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Name.IsSet() { toSerialize["name"] = o.Name.Get() - } + } if o.AccountDetails.IsSet() { toSerialize["account_details"] = o.AccountDetails.Get() - } + } if o.Balance.IsSet() { toSerialize["balance"] = o.Balance.Get() - } + } if o.PointBalance.IsSet() { toSerialize["point_balance"] = o.PointBalance.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_e_wallet_all_of.go b/payment_request/model_e_wallet_all_of.go index 7975d737..c4b27ee2 100644 --- a/payment_request/model_e_wallet_all_of.go +++ b/payment_request/model_e_wallet_all_of.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_e_wallet_channel_code.go b/payment_request/model_e_wallet_channel_code.go index f1f49ff1..8512268f 100644 --- a/payment_request/model_e_wallet_channel_code.go +++ b/payment_request/model_e_wallet_channel_code.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_e_wallet_channel_properties.go b/payment_request/model_e_wallet_channel_properties.go index 1250b843..86519f12 100644 --- a/payment_request/model_e_wallet_channel_properties.go +++ b/payment_request/model_e_wallet_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -28,7 +28,7 @@ type EWalletChannelProperties struct { CancelReturnUrl *string `json:"cancel_return_url,omitempty"` // REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. RedeemPoints *string `json:"redeem_points,omitempty"` - Mobilenumber *string `json:"mobile:number,omitempty"` + MobileNumber *string `json:"mobile_number,omitempty"` Cashtag *string `json:"cashtag,omitempty"` } @@ -177,36 +177,36 @@ func (o *EWalletChannelProperties) SetRedeemPoints(v string) { o.RedeemPoints = &v } -// GetMobilenumber returns the Mobilenumber field value if set, zero value otherwise. -func (o *EWalletChannelProperties) GetMobilenumber() string { - if o == nil || utils.IsNil(o.Mobilenumber) { +// GetMobileNumber returns the MobileNumber field value if set, zero value otherwise. +func (o *EWalletChannelProperties) GetMobileNumber() string { + if o == nil || utils.IsNil(o.MobileNumber) { var ret string return ret } - return *o.Mobilenumber + return *o.MobileNumber } -// GetMobilenumberOk returns a tuple with the Mobilenumber field value if set, nil otherwise +// GetMobileNumberOk returns a tuple with the MobileNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *EWalletChannelProperties) GetMobilenumberOk() (*string, bool) { - if o == nil || utils.IsNil(o.Mobilenumber) { +func (o *EWalletChannelProperties) GetMobileNumberOk() (*string, bool) { + if o == nil || utils.IsNil(o.MobileNumber) { return nil, false } - return o.Mobilenumber, true + return o.MobileNumber, true } -// HasMobilenumber returns a boolean if a field has been set. -func (o *EWalletChannelProperties) HasMobilenumber() bool { - if o != nil && !utils.IsNil(o.Mobilenumber) { +// HasMobileNumber returns a boolean if a field has been set. +func (o *EWalletChannelProperties) HasMobileNumber() bool { + if o != nil && !utils.IsNil(o.MobileNumber) { return true } return false } -// SetMobilenumber gets a reference to the given string and assigns it to the Mobilenumber field. -func (o *EWalletChannelProperties) SetMobilenumber(v string) { - o.Mobilenumber = &v +// SetMobileNumber gets a reference to the given string and assigns it to the MobileNumber field. +func (o *EWalletChannelProperties) SetMobileNumber(v string) { + o.MobileNumber = &v } // GetCashtag returns the Cashtag field value if set, zero value otherwise. @@ -263,8 +263,8 @@ func (o EWalletChannelProperties) ToMap() (map[string]interface{}, error) { if !utils.IsNil(o.RedeemPoints) { toSerialize["redeem_points"] = o.RedeemPoints } - if !utils.IsNil(o.Mobilenumber) { - toSerialize["mobile:number"] = o.Mobilenumber + if !utils.IsNil(o.MobileNumber) { + toSerialize["mobile_number"] = o.MobileNumber } if !utils.IsNil(o.Cashtag) { toSerialize["cashtag"] = o.Cashtag diff --git a/payment_request/model_e_wallet_parameters.go b/payment_request/model_e_wallet_parameters.go index 68ff369f..25878218 100644 --- a/payment_request/model_e_wallet_parameters.go +++ b/payment_request/model_e_wallet_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_error.go b/payment_request/model_error.go index a771a5f8..226769e2 100644 --- a/payment_request/model_error.go +++ b/payment_request/model_error.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -137,10 +137,14 @@ func (o Error) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.ErrorCode.IsSet() { toSerialize["error_code"] = o.ErrorCode.Get() - } + if o.ErrorCode.Get() != nil && (*o.ErrorCode.Get() != "ACCOUNT_ACCESS_BLOCKED" && *o.ErrorCode.Get() != "ADDRESS_VALIDATION_FAILED" && *o.ErrorCode.Get() != "AMOUNT_MISMATCHED" && *o.ErrorCode.Get() != "API_VALIDATION_ERROR" && *o.ErrorCode.Get() != "AUTHENTICATION_FAILED" && *o.ErrorCode.Get() != "AUTHENTICATION_REQUIRED" && *o.ErrorCode.Get() != "CARD_DECLINED" && *o.ErrorCode.Get() != "CHANNEL_CODE_NOT_SUPPORTED_ERROR" && *o.ErrorCode.Get() != "CHANNEL_NOT_ACTIVATED" && *o.ErrorCode.Get() != "CHANNEL_UNAVAILABLE" && *o.ErrorCode.Get() != "COF_COMBINATION_NOT_ALLOWED_ERROR" && *o.ErrorCode.Get() != "CURRENCY_MISMATCHED" && *o.ErrorCode.Get() != "CUSTOMER_NOT_FOUND_ERROR" && *o.ErrorCode.Get() != "CUSTOMER_PAYMENT_METHOD_MISMATCHED" && *o.ErrorCode.Get() != "DATA_NOT_FOUND" && *o.ErrorCode.Get() != "DATA_NOT_FOUND_ERROR" && *o.ErrorCode.Get() != "DECLINED_BY_ISSUER" && *o.ErrorCode.Get() != "DECLINED_BY_PROCESSOR" && *o.ErrorCode.Get() != "DENIED_PERSON_LIST_MATCHED" && *o.ErrorCode.Get() != "DUPLICATE_ERROR" && *o.ErrorCode.Get() != "DUPLICATE_REFERENCE" && *o.ErrorCode.Get() != "EXCEEDS_CAPTURABLE_AMOUNT" && *o.ErrorCode.Get() != "EXPIRED_CARD" && *o.ErrorCode.Get() != "EXPIRED_OTP_ERROR" && *o.ErrorCode.Get() != "FEATURE_NOT_ACTIVATED" && *o.ErrorCode.Get() != "IDEMPOTENCY_ERROR" && *o.ErrorCode.Get() != "INACTIVE_OR_UNAUTHORIZED_CARD" && *o.ErrorCode.Get() != "INSUFFICIENT_BALANCE" && *o.ErrorCode.Get() != "INVALID_ACCOUNT_DETAILS" && *o.ErrorCode.Get() != "INVALID_CVV" && *o.ErrorCode.Get() != "INVALID_OTP_ERROR" && *o.ErrorCode.Get() != "INVALID_PAYMENT_METHOD" && *o.ErrorCode.Get() != "ISSUER_UNAVAILABLE" && *o.ErrorCode.Get() != "MANUAL_CAPTURE_NOT_SUPPORTED" && *o.ErrorCode.Get() != "MAX_ACCOUNT_LINKING" && *o.ErrorCode.Get() != "MAX_AMOUNT_LIMIT_ERROR" && *o.ErrorCode.Get() != "MAX_OTP_ATTEMPTS_ERROR" && *o.ErrorCode.Get() != "OPERATION_NOT_ALLOWED" && *o.ErrorCode.Get() != "OTP_DELIVERY_ERROR" && *o.ErrorCode.Get() != "PAYMENT_METHOD_NOT_FOUND_ERROR" && *o.ErrorCode.Get() != "PAYMENT_REQUEST_ALREADY_COMPLETED" && *o.ErrorCode.Get() != "PAYMENT_REQUEST_ALREADY_FAILED" && *o.ErrorCode.Get() != "PAYMENT_REQUEST_ALREADY_FULLY_CAPTURED" && *o.ErrorCode.Get() != "PAYMENT_STATUS_FAILED" && *o.ErrorCode.Get() != "PROCESSOR_CONFIGURATION_ERROR" && *o.ErrorCode.Get() != "PROCESSOR_ERROR" && *o.ErrorCode.Get() != "PROCESSOR_TEMPORARILY_UNAVAILABLE" && *o.ErrorCode.Get() != "PROCESSOR_TIMEOUT" && *o.ErrorCode.Get() != "REJECTED_BY_ACQUIRER" && *o.ErrorCode.Get() != "SERVER_ERROR" && *o.ErrorCode.Get() != "STOLEN_CARD" && *o.ErrorCode.Get() != "STRONG_CUSTOMER_AUTHENTICATION_REQUIRED" && *o.ErrorCode.Get() != "SUSPECTED_FRAUDULENT" && *o.ErrorCode.Get() != "UNAUTHORIZED" && *o.ErrorCode.Get() != "DUPLICATED_FIXED_PAYMENT_INSTRUMENT") { + toSerialize["error_code"] = nil + return toSerialize, utils.NewError("invalid value for ErrorCode when marshalling to JSON, must be one of ACCOUNT_ACCESS_BLOCKED, ADDRESS_VALIDATION_FAILED, AMOUNT_MISMATCHED, API_VALIDATION_ERROR, AUTHENTICATION_FAILED, AUTHENTICATION_REQUIRED, CARD_DECLINED, CHANNEL_CODE_NOT_SUPPORTED_ERROR, CHANNEL_NOT_ACTIVATED, CHANNEL_UNAVAILABLE, COF_COMBINATION_NOT_ALLOWED_ERROR, CURRENCY_MISMATCHED, CUSTOMER_NOT_FOUND_ERROR, CUSTOMER_PAYMENT_METHOD_MISMATCHED, DATA_NOT_FOUND, DATA_NOT_FOUND_ERROR, DECLINED_BY_ISSUER, DECLINED_BY_PROCESSOR, DENIED_PERSON_LIST_MATCHED, DUPLICATE_ERROR, DUPLICATE_REFERENCE, EXCEEDS_CAPTURABLE_AMOUNT, EXPIRED_CARD, EXPIRED_OTP_ERROR, FEATURE_NOT_ACTIVATED, IDEMPOTENCY_ERROR, INACTIVE_OR_UNAUTHORIZED_CARD, INSUFFICIENT_BALANCE, INVALID_ACCOUNT_DETAILS, INVALID_CVV, INVALID_OTP_ERROR, INVALID_PAYMENT_METHOD, ISSUER_UNAVAILABLE, MANUAL_CAPTURE_NOT_SUPPORTED, MAX_ACCOUNT_LINKING, MAX_AMOUNT_LIMIT_ERROR, MAX_OTP_ATTEMPTS_ERROR, OPERATION_NOT_ALLOWED, OTP_DELIVERY_ERROR, PAYMENT_METHOD_NOT_FOUND_ERROR, PAYMENT_REQUEST_ALREADY_COMPLETED, PAYMENT_REQUEST_ALREADY_FAILED, PAYMENT_REQUEST_ALREADY_FULLY_CAPTURED, PAYMENT_STATUS_FAILED, PROCESSOR_CONFIGURATION_ERROR, PROCESSOR_ERROR, PROCESSOR_TEMPORARILY_UNAVAILABLE, PROCESSOR_TIMEOUT, REJECTED_BY_ACQUIRER, SERVER_ERROR, STOLEN_CARD, STRONG_CUSTOMER_AUTHENTICATION_REQUIRED, SUSPECTED_FRAUDULENT, UNAUTHORIZED, DUPLICATED_FIXED_PAYMENT_INSTRUMENT") + } + } if o.Message.IsSet() { toSerialize["message"] = o.Message.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_over_the_counter.go b/payment_request/model_over_the_counter.go index f890905c..0324df1c 100644 --- a/payment_request/model_over_the_counter.go +++ b/payment_request/model_over_the_counter.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -179,7 +179,7 @@ func (o OverTheCounter) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_request/model_over_the_counter_channel_code.go b/payment_request/model_over_the_counter_channel_code.go index a4968657..b05268d9 100644 --- a/payment_request/model_over_the_counter_channel_code.go +++ b/payment_request/model_over_the_counter_channel_code.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_over_the_counter_channel_properties.go b/payment_request/model_over_the_counter_channel_properties.go index a488821b..2e7d6e52 100644 --- a/payment_request/model_over_the_counter_channel_properties.go +++ b/payment_request/model_over_the_counter_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_over_the_counter_parameters.go b/payment_request/model_over_the_counter_parameters.go index d5d3e982..a27f5764 100644 --- a/payment_request/model_over_the_counter_parameters.go +++ b/payment_request/model_over_the_counter_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -179,7 +179,7 @@ func (o OverTheCounterParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_request/model_payment_method.go b/payment_request/model_payment_method.go index 2f3ef10d..6cb9d63c 100644 --- a/payment_request/model_payment_method.go +++ b/payment_request/model_payment_method.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -597,33 +597,33 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { } if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() - } + } if !utils.IsNil(o.ReferenceId) { toSerialize["reference_id"] = o.ReferenceId } if o.Card.IsSet() { toSerialize["card"] = o.Card.Get() - } + } if o.DirectDebit.IsSet() { toSerialize["direct_debit"] = o.DirectDebit.Get() - } + } if o.Ewallet.IsSet() { toSerialize["ewallet"] = o.Ewallet.Get() - } + } if o.OverTheCounter.IsSet() { toSerialize["over_the_counter"] = o.OverTheCounter.Get() - } + } if o.VirtualAccount.IsSet() { toSerialize["virtual_account"] = o.VirtualAccount.Get() - } + } if o.QrCode.IsSet() { toSerialize["qr_code"] = o.QrCode.Get() - } + } toSerialize["reusability"] = o.Reusability toSerialize["status"] = o.Status if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } return toSerialize, nil } diff --git a/payment_request/model_payment_method_parameters.go b/payment_request/model_payment_method_parameters.go index 74d0854e..e7f26c2a 100644 --- a/payment_request/model_payment_method_parameters.go +++ b/payment_request/model_payment_method_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -396,25 +396,25 @@ func (o PaymentMethodParameters) ToMap() (map[string]interface{}, error) { toSerialize["reusability"] = o.Reusability if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() - } + } if !utils.IsNil(o.ReferenceId) { toSerialize["reference_id"] = o.ReferenceId } if o.DirectDebit.IsSet() { toSerialize["direct_debit"] = o.DirectDebit.Get() - } + } if o.Ewallet.IsSet() { toSerialize["ewallet"] = o.Ewallet.Get() - } + } if o.OverTheCounter.IsSet() { toSerialize["over_the_counter"] = o.OverTheCounter.Get() - } + } if o.VirtualAccount.IsSet() { toSerialize["virtual_account"] = o.VirtualAccount.Get() - } + } if o.QrCode.IsSet() { toSerialize["qr_code"] = o.QrCode.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_payment_method_reusability.go b/payment_request/model_payment_method_reusability.go index bd0f8304..2f679522 100644 --- a/payment_request/model_payment_method_reusability.go +++ b/payment_request/model_payment_method_reusability.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_method_status.go b/payment_request/model_payment_method_status.go index 94ebd269..4911d1dc 100644 --- a/payment_request/model_payment_method_status.go +++ b/payment_request/model_payment_method_status.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_method_type.go b/payment_request/model_payment_method_type.go index f48e84ef..3b4b9d46 100644 --- a/payment_request/model_payment_method_type.go +++ b/payment_request/model_payment_method_type.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request.go b/payment_request/model_payment_request.go index fe3c2774..c4f3464a 100644 --- a/payment_request/model_payment_request.go +++ b/payment_request/model_payment_request.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -852,19 +852,19 @@ func (o PaymentRequest) ToMap() (map[string]interface{}, error) { toSerialize["business_id"] = o.BusinessId if o.CustomerId.IsSet() { toSerialize["customer_id"] = o.CustomerId.Get() - } + } if o.Customer != nil { toSerialize["customer"] = o.Customer - } + } if !utils.IsNil(o.Amount) { toSerialize["amount"] = o.Amount } if o.MinAmount.IsSet() { toSerialize["min_amount"] = o.MinAmount.Get() - } + } if o.MaxAmount.IsSet() { toSerialize["max_amount"] = o.MaxAmount.Get() - } + } if !utils.IsNil(o.Country) { toSerialize["country"] = o.Country } @@ -872,32 +872,32 @@ func (o PaymentRequest) ToMap() (map[string]interface{}, error) { toSerialize["payment_method"] = o.PaymentMethod if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() - } + } if o.FailureCode.IsSet() { toSerialize["failure_code"] = o.FailureCode.Get() - } + } if o.CaptureMethod.IsSet() { toSerialize["capture_method"] = o.CaptureMethod.Get() - } + } if o.Initiator.IsSet() { toSerialize["initiator"] = o.Initiator.Get() - } + } if o.CardVerificationResults.IsSet() { toSerialize["card_verification_results"] = o.CardVerificationResults.Get() - } + } toSerialize["status"] = o.Status if !utils.IsNil(o.Actions) { toSerialize["actions"] = o.Actions } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } if o.ShippingInformation.IsSet() { toSerialize["shipping_information"] = o.ShippingInformation.Get() - } + } if o.Items != nil { toSerialize["items"] = o.Items - } + } return toSerialize, nil } diff --git a/payment_request/model_payment_request_action.go b/payment_request/model_payment_request_action.go index 05024f0e..e0110fe2 100644 --- a/payment_request/model_payment_request_action.go +++ b/payment_request/model_payment_request_action.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -186,10 +186,21 @@ func (o PaymentRequestAction) MarshalJSON() ([]byte, error) { func (o PaymentRequestAction) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["action"] = o.Action + if o.Action != "AUTH" && o.Action != "RESEND_AUTH" && o.Action != "CAPTURE" && o.Action != "CANCEL" && o.Action != "PRESENT_TO_CUSTOMER" { + toSerialize["action"] = nil + return toSerialize, utils.NewError("invalid value for Action when marshalling to JSON, must be one of AUTH, RESEND_AUTH, CAPTURE, CANCEL, PRESENT_TO_CUSTOMER") + } toSerialize["url_type"] = o.UrlType + if o.UrlType != "API" && o.UrlType != "WEB" && o.UrlType != "MOBILE" && o.UrlType != "DEEPLINK" { + toSerialize["url_type"] = nil + return toSerialize, utils.NewError("invalid value for UrlType when marshalling to JSON, must be one of API, WEB, MOBILE, DEEPLINK") + } toSerialize["method"] = o.Method.Get() + toSerialize["url"] = o.Url.Get() + toSerialize["qr_code"] = o.QrCode.Get() + return toSerialize, nil } diff --git a/payment_request/model_payment_request_auth_parameters.go b/payment_request/model_payment_request_auth_parameters.go index 2a3e799c..a6c4346e 100644 --- a/payment_request/model_payment_request_auth_parameters.go +++ b/payment_request/model_payment_request_auth_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_basket_item.go b/payment_request/model_payment_request_basket_item.go index d4666615..a2808037 100644 --- a/payment_request/model_payment_request_basket_item.go +++ b/payment_request/model_payment_request_basket_item.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_capture_method.go b/payment_request/model_payment_request_capture_method.go index 67d849a1..ea714996 100644 --- a/payment_request/model_payment_request_capture_method.go +++ b/payment_request/model_payment_request_capture_method.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_card_verification_results.go b/payment_request/model_payment_request_card_verification_results.go index 59f24622..1ab68c13 100644 --- a/payment_request/model_payment_request_card_verification_results.go +++ b/payment_request/model_payment_request_card_verification_results.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -164,12 +164,13 @@ func (o PaymentRequestCardVerificationResults) MarshalJSON() ([]byte, error) { func (o PaymentRequestCardVerificationResults) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["three_d_secure"] = o.ThreeDSecure.Get() + if o.CvvResult.IsSet() { toSerialize["cvv_result"] = o.CvvResult.Get() - } + } if o.AddressVerificationResult.IsSet() { toSerialize["address_verification_result"] = o.AddressVerificationResult.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_payment_request_card_verification_results_three_dee_secure.go b/payment_request/model_payment_request_card_verification_results_three_dee_secure.go index dce2063d..4513cefc 100644 --- a/payment_request/model_payment_request_card_verification_results_three_dee_secure.go +++ b/payment_request/model_payment_request_card_verification_results_three_dee_secure.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -235,7 +235,7 @@ func (o PaymentRequestCardVerificationResultsThreeDeeSecure) ToMap() (map[string } if o.ThreeDSecureResultReason.IsSet() { toSerialize["three_d_secure_result_reason"] = o.ThreeDSecureResultReason.Get() - } + } if !utils.IsNil(o.ThreeDSecureVersion) { toSerialize["three_d_secure_version"] = o.ThreeDSecureVersion } diff --git a/payment_request/model_payment_request_channel_properties.go b/payment_request/model_payment_request_channel_properties.go index 1fd27e99..dde1dd2b 100644 --- a/payment_request/model_payment_request_channel_properties.go +++ b/payment_request/model_payment_request_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -317,7 +317,7 @@ func (o PaymentRequestChannelProperties) ToMap() (map[string]interface{}, error) } if o.CardonfileType.IsSet() { toSerialize["cardonfile_type"] = o.CardonfileType.Get() - } + } return toSerialize, nil } diff --git a/payment_request/model_payment_request_country.go b/payment_request/model_payment_request_country.go index 42ea38a5..e6ac6dc2 100644 --- a/payment_request/model_payment_request_country.go +++ b/payment_request/model_payment_request_country.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_currency.go b/payment_request/model_payment_request_currency.go index d5909f1a..49592e54 100644 --- a/payment_request/model_payment_request_currency.go +++ b/payment_request/model_payment_request_currency.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_initiator.go b/payment_request/model_payment_request_initiator.go index fd4d3bb5..642c72b7 100644 --- a/payment_request/model_payment_request_initiator.go +++ b/payment_request/model_payment_request_initiator.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_list_response.go b/payment_request/model_payment_request_list_response.go index 5abd9b7c..0c838b0d 100644 --- a/payment_request/model_payment_request_list_response.go +++ b/payment_request/model_payment_request_list_response.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_parameters.go b/payment_request/model_payment_request_parameters.go index 609ac802..2f196899 100644 --- a/payment_request/model_payment_request_parameters.go +++ b/payment_request/model_payment_request_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -569,13 +569,13 @@ func (o PaymentRequestParameters) ToMap() (map[string]interface{}, error) { } if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() - } + } if o.CaptureMethod.IsSet() { toSerialize["capture_method"] = o.CaptureMethod.Get() - } + } if o.Initiator.IsSet() { toSerialize["initiator"] = o.Initiator.Get() - } + } if !utils.IsNil(o.PaymentMethodId) { toSerialize["payment_method_id"] = o.PaymentMethodId } @@ -584,19 +584,19 @@ func (o PaymentRequestParameters) ToMap() (map[string]interface{}, error) { } if o.ShippingInformation.IsSet() { toSerialize["shipping_information"] = o.ShippingInformation.Get() - } + } if o.Items != nil { toSerialize["items"] = o.Items - } + } if o.CustomerId.IsSet() { toSerialize["customer_id"] = o.CustomerId.Get() - } + } if o.Customer != nil { toSerialize["customer"] = o.Customer - } + } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } return toSerialize, nil } diff --git a/payment_request/model_payment_request_parameters_channel_properties.go b/payment_request/model_payment_request_parameters_channel_properties.go index 7765658a..6d25f988 100644 --- a/payment_request/model_payment_request_parameters_channel_properties.go +++ b/payment_request/model_payment_request_parameters_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -351,7 +351,7 @@ func (o PaymentRequestParametersChannelProperties) ToMap() (map[string]interface } if o.CardonfileType.IsSet() { toSerialize["cardonfile_type"] = o.CardonfileType.Get() - } + } if !utils.IsNil(o.Cvv) { toSerialize["cvv"] = o.Cvv } diff --git a/payment_request/model_payment_request_parameters_channel_properties_all_of.go b/payment_request/model_payment_request_parameters_channel_properties_all_of.go index ad474fb6..ba12d478 100644 --- a/payment_request/model_payment_request_parameters_channel_properties_all_of.go +++ b/payment_request/model_payment_request_parameters_channel_properties_all_of.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_shipping_information.go b/payment_request/model_payment_request_shipping_information.go index 56ae34ea..2efa6d1e 100644 --- a/payment_request/model_payment_request_shipping_information.go +++ b/payment_request/model_payment_request_shipping_information.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_payment_request_status.go b/payment_request/model_payment_request_status.go index 53c28b23..3dea2635 100644 --- a/payment_request/model_payment_request_status.go +++ b/payment_request/model_payment_request_status.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_qr_code.go b/payment_request/model_qr_code.go index 0b05e69b..4b647e0d 100644 --- a/payment_request/model_qr_code.go +++ b/payment_request/model_qr_code.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -127,7 +127,7 @@ func (o QRCode) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.ChannelCode.IsSet() { toSerialize["channel_code"] = o.ChannelCode.Get() - } + } if !utils.IsNil(o.ChannelProperties) { toSerialize["channel_properties"] = o.ChannelProperties } diff --git a/payment_request/model_qr_code_channel_code.go b/payment_request/model_qr_code_channel_code.go index ace59764..ad3b31de 100644 --- a/payment_request/model_qr_code_channel_code.go +++ b/payment_request/model_qr_code_channel_code.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_qr_code_channel_properties.go b/payment_request/model_qr_code_channel_properties.go index e6305f21..87396aea 100644 --- a/payment_request/model_qr_code_channel_properties.go +++ b/payment_request/model_qr_code_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_qr_code_parameters.go b/payment_request/model_qr_code_parameters.go index 839d1681..96b1bb70 100644 --- a/payment_request/model_qr_code_parameters.go +++ b/payment_request/model_qr_code_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -127,7 +127,7 @@ func (o QRCodeParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.ChannelCode.IsSet() { toSerialize["channel_code"] = o.ChannelCode.Get() - } + } if !utils.IsNil(o.ChannelProperties) { toSerialize["channel_properties"] = o.ChannelProperties } diff --git a/payment_request/model_virtual_account.go b/payment_request/model_virtual_account.go index 1df664b7..87da1d11 100644 --- a/payment_request/model_virtual_account.go +++ b/payment_request/model_virtual_account.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -332,13 +332,13 @@ func (o VirtualAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.MinAmount.IsSet() { toSerialize["min_amount"] = o.MinAmount.Get() - } + } if o.MaxAmount.IsSet() { toSerialize["max_amount"] = o.MaxAmount.Get() - } + } if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payment_request/model_virtual_account_all_of.go b/payment_request/model_virtual_account_all_of.go index 62f4cd9d..2ce625e7 100644 --- a/payment_request/model_virtual_account_all_of.go +++ b/payment_request/model_virtual_account_all_of.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_virtual_account_alternative_display.go b/payment_request/model_virtual_account_alternative_display.go index 4a490298..b5d320b8 100644 --- a/payment_request/model_virtual_account_alternative_display.go +++ b/payment_request/model_virtual_account_alternative_display.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_virtual_account_channel_code.go b/payment_request/model_virtual_account_channel_code.go index f1e53c8f..3ec23184 100644 --- a/payment_request/model_virtual_account_channel_code.go +++ b/payment_request/model_virtual_account_channel_code.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_virtual_account_channel_properties.go b/payment_request/model_virtual_account_channel_properties.go index 8f1ec608..3c9adf12 100644 --- a/payment_request/model_virtual_account_channel_properties.go +++ b/payment_request/model_virtual_account_channel_properties.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ diff --git a/payment_request/model_virtual_account_parameters.go b/payment_request/model_virtual_account_parameters.go index 1cf2e0d7..5f4726fe 100644 --- a/payment_request/model_virtual_account_parameters.go +++ b/payment_request/model_virtual_account_parameters.go @@ -3,7 +3,7 @@ Payment Requests This API is used for Payment Requests -API version: 1.44.0 +API version: 1.44.1 */ @@ -299,13 +299,13 @@ func (o VirtualAccountParameters) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.MinAmount.IsSet() { toSerialize["min_amount"] = o.MinAmount.Get() - } + } if o.MaxAmount.IsSet() { toSerialize["max_amount"] = o.MaxAmount.Get() - } + } if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() - } + } if !utils.IsNil(o.Currency) { toSerialize["currency"] = o.Currency } diff --git a/payout/model_digital_payout_channel_properties.go b/payout/model_digital_payout_channel_properties.go index f4ce8f28..ec6d6b0c 100644 --- a/payout/model_digital_payout_channel_properties.go +++ b/payout/model_digital_payout_channel_properties.go @@ -155,7 +155,7 @@ func (o DigitalPayoutChannelProperties) ToMap() (map[string]interface{}, error) toSerialize := map[string]interface{}{} if o.AccountHolderName.IsSet() { toSerialize["account_holder_name"] = o.AccountHolderName.Get() - } + } toSerialize["account_number"] = o.AccountNumber if !utils.IsNil(o.AccountType) { toSerialize["account_type"] = o.AccountType diff --git a/payout/model_payout.go b/payout/model_payout.go index 767b5f4f..08450457 100644 --- a/payout/model_payout.go +++ b/payout/model_payout.go @@ -507,6 +507,10 @@ func (o Payout) ToMap() (map[string]interface{}, error) { toSerialize["updated"] = o.Updated toSerialize["business_id"] = o.BusinessId toSerialize["status"] = o.Status + if o.Status != "SUCCEEDED" && o.Status != "FAILED" && o.Status != "ACCEPTED" && o.Status != "REQUESTED" && o.Status != "LOCKED" && o.Status != "CANCELLED" && o.Status != "REVERSED" { + toSerialize["status"] = nil + return toSerialize, utils.NewError("invalid value for Status when marshalling to JSON, must be one of SUCCEEDED, FAILED, ACCEPTED, REQUESTED, LOCKED, CANCELLED, REVERSED") + } if !utils.IsNil(o.FailureCode) { toSerialize["failure_code"] = o.FailureCode } diff --git a/payout/model_payout_all_of.go b/payout/model_payout_all_of.go index 2bbf13c1..e9754416 100644 --- a/payout/model_payout_all_of.go +++ b/payout/model_payout_all_of.go @@ -258,6 +258,10 @@ func (o PayoutAllOf) ToMap() (map[string]interface{}, error) { toSerialize["updated"] = o.Updated toSerialize["business_id"] = o.BusinessId toSerialize["status"] = o.Status + if o.Status != "SUCCEEDED" && o.Status != "FAILED" && o.Status != "ACCEPTED" && o.Status != "REQUESTED" && o.Status != "LOCKED" && o.Status != "CANCELLED" && o.Status != "REVERSED" { + toSerialize["status"] = nil + return toSerialize, utils.NewError("invalid value for Status when marshalling to JSON, must be one of SUCCEEDED, FAILED, ACCEPTED, REQUESTED, LOCKED, CANCELLED, REVERSED") + } if !utils.IsNil(o.FailureCode) { toSerialize["failure_code"] = o.FailureCode } diff --git a/payout/model_receipt_notification.go b/payout/model_receipt_notification.go index 3d9c665d..e4ab2ffb 100644 --- a/payout/model_receipt_notification.go +++ b/payout/model_receipt_notification.go @@ -156,13 +156,13 @@ func (o ReceiptNotification) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.EmailTo != nil { toSerialize["email_to"] = o.EmailTo - } + } if o.EmailCc != nil { toSerialize["email_cc"] = o.EmailCc - } + } if o.EmailBcc != nil { toSerialize["email_bcc"] = o.EmailBcc - } + } return toSerialize, nil } diff --git a/refund/model_create_refund.go b/refund/model_create_refund.go index 27d482fd..d4f6ab69 100644 --- a/refund/model_create_refund.go +++ b/refund/model_create_refund.go @@ -301,7 +301,7 @@ func (o CreateRefund) ToMap() (map[string]interface{}, error) { } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } return toSerialize, nil } diff --git a/refund/model_refund.go b/refund/model_refund.go index 5d52d8bc..43d26e17 100644 --- a/refund/model_refund.go +++ b/refund/model_refund.go @@ -496,13 +496,13 @@ func (o Refund) ToMap() (map[string]interface{}, error) { } if o.ReferenceId.IsSet() { toSerialize["reference_id"] = o.ReferenceId.Get() - } + } if o.FailureCode.IsSet() { toSerialize["failure_code"] = o.FailureCode.Get() - } + } if o.RefundFeeAmount.IsSet() { toSerialize["refund_fee_amount"] = o.RefundFeeAmount.Get() - } + } if !utils.IsNil(o.Created) { toSerialize["created"] = o.Created } @@ -511,7 +511,7 @@ func (o Refund) ToMap() (map[string]interface{}, error) { } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata - } + } return toSerialize, nil } diff --git a/test/api_customer_test.go b/test/api_customer_test.go new file mode 100644 index 00000000..9fba720b --- /dev/null +++ b/test/api_customer_test.go @@ -0,0 +1,76 @@ +/* +XENDIT SDK openapi spec_test + +Testing CustomerApiService + +*/ + +// Code generated by OpenAPI Generator + +package xendit + +import ( + "context" + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + xendit "github.com/xendit/xendit-go/v3" +) + +func Test_xendit_CustomerApiService(t *testing.T) { + + apiKey := os.Getenv("XND_APIKEY") + if apiKey == "" { + t.Skip("XND_APIKEY not set") + } + + apiClient := xendit.NewClient(apiKey) + + t.Run("Test CustomerApiService CreateCustomer", func(t *testing.T) { + + resp, httpRes, err := apiClient.CustomerApi.CreateCustomer(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomerApiService GetCustomer", func(t *testing.T) { + + var id string + + resp, httpRes, err := apiClient.CustomerApi.GetCustomer(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomerApiService GetCustomerByReferenceID", func(t *testing.T) { + + resp, httpRes, err := apiClient.CustomerApi.GetCustomerByReferenceID(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomerApiService UpdateCustomer", func(t *testing.T) { + + var id string + + resp, httpRes, err := apiClient.CustomerApi.UpdateCustomer(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_payment_method_test.go b/test/api_payment_method_test.go index 3feb5d99..8f61197e 100644 --- a/test/api_payment_method_test.go +++ b/test/api_payment_method_test.go @@ -63,16 +63,6 @@ func Test_xendit_PaymentMethodApiService(t *testing.T) { }) - t.Run("Test PaymentMethodApiService GetAllPaymentChannels", func(t *testing.T) { - - resp, httpRes, err := apiClient.PaymentMethodApi.GetAllPaymentChannels(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - t.Run("Test PaymentMethodApiService GetAllPaymentMethods", func(t *testing.T) { resp, httpRes, err := apiClient.PaymentMethodApi.GetAllPaymentMethods(context.Background()).Execute() diff --git a/utils/utils.go b/utils/utils.go index e5c4062c..f16a727e 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -6,6 +6,7 @@ import ( "reflect" "time" "unicode/utf8" + "fmt" ) // PtrBool is a helper routine that returns a pointer to given boolean value. @@ -35,7 +36,6 @@ func PtrTime(v time.Time) *time.Time { return &v } // NewStrictDecoder is a wrapper for strict JSON decoding func NewStrictDecoder(data []byte) *json.Decoder { dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() return dec } @@ -44,6 +44,9 @@ func Strlen(s string) int { return utf8.RuneCountInString(s) } +func NewError(s string) error { + return fmt.Errorf(s) +} // IsNil checks if an input is nil func IsNil(i interface{}) bool {