Documentation ¶
Index ¶
- Constants
- func NewIdempotencyKey() string
- type APIError
- type BankAuthorisation
- type BankAuthorisationCreateParams
- type BankAuthorisationService
- type BankDetailsLookup
- type BankDetailsLookupCreateParams
- type BankDetailsLookupService
- type BillingRequest
- type BillingRequestCancelParams
- type BillingRequestCollectBankAccountParams
- type BillingRequestCollectCustomerDetailsParams
- type BillingRequestConfirmPayerDetailsParams
- type BillingRequestCreateParams
- type BillingRequestFlow
- type BillingRequestFlowCreateParams
- type BillingRequestFlowInitialiseParams
- type BillingRequestFlowService
- func (s *BillingRequestFlowService) Create(ctx context.Context, p BillingRequestFlowCreateParams, opts ...RequestOption) (*BillingRequestFlow, error)
- func (s *BillingRequestFlowService) Initialise(ctx context.Context, identity string, p BillingRequestFlowInitialiseParams, ...) (*BillingRequestFlow, error)
- type BillingRequestFulfilParams
- type BillingRequestListPagingIterator
- type BillingRequestListParams
- type BillingRequestListResult
- type BillingRequestNotifyParams
- type BillingRequestService
- func (s *BillingRequestService) All(ctx context.Context, p BillingRequestListParams, opts ...RequestOption) *BillingRequestListPagingIterator
- func (s *BillingRequestService) Cancel(ctx context.Context, identity string, p BillingRequestCancelParams, ...) (*BillingRequest, error)
- func (s *BillingRequestService) CollectBankAccount(ctx context.Context, identity string, p BillingRequestCollectBankAccountParams, ...) (*BillingRequest, error)
- func (s *BillingRequestService) CollectCustomerDetails(ctx context.Context, identity string, ...) (*BillingRequest, error)
- func (s *BillingRequestService) ConfirmPayerDetails(ctx context.Context, identity string, ...) (*BillingRequest, error)
- func (s *BillingRequestService) Create(ctx context.Context, p BillingRequestCreateParams, opts ...RequestOption) (*BillingRequest, error)
- func (s *BillingRequestService) Fulfil(ctx context.Context, identity string, p BillingRequestFulfilParams, ...) (*BillingRequest, error)
- func (s *BillingRequestService) Get(ctx context.Context, identity string, opts ...RequestOption) (*BillingRequest, error)
- func (s *BillingRequestService) List(ctx context.Context, p BillingRequestListParams, opts ...RequestOption) (*BillingRequestListResult, error)
- func (s *BillingRequestService) Notify(ctx context.Context, identity string, p BillingRequestNotifyParams, ...) (*BillingRequest, error)
- type BillingRequestTemplate
- type BillingRequestTemplateCreateParams
- type BillingRequestTemplateListPagingIterator
- type BillingRequestTemplateListParams
- type BillingRequestTemplateListResult
- type BillingRequestTemplateService
- func (s *BillingRequestTemplateService) All(ctx context.Context, p BillingRequestTemplateListParams, opts ...RequestOption) *BillingRequestTemplateListPagingIterator
- func (s *BillingRequestTemplateService) Create(ctx context.Context, p BillingRequestTemplateCreateParams, ...) (*BillingRequestTemplate, error)
- func (s *BillingRequestTemplateService) Get(ctx context.Context, identity string, opts ...RequestOption) (*BillingRequestTemplate, error)
- func (s *BillingRequestTemplateService) List(ctx context.Context, p BillingRequestTemplateListParams, opts ...RequestOption) (*BillingRequestTemplateListResult, error)
- func (s *BillingRequestTemplateService) Update(ctx context.Context, identity string, p BillingRequestTemplateUpdateParams, ...) (*BillingRequestTemplate, error)
- type BillingRequestTemplateUpdateParams
- type Block
- type BlockBlockByRefParams
- type BlockBlockByRefResult
- type BlockCreateParams
- type BlockListPagingIterator
- type BlockListParams
- type BlockListResult
- type BlockService
- func (s *BlockService) All(ctx context.Context, p BlockListParams, opts ...RequestOption) *BlockListPagingIterator
- func (s *BlockService) BlockByRef(ctx context.Context, p BlockBlockByRefParams, opts ...RequestOption) (*BlockBlockByRefResult, error)
- func (s *BlockService) Create(ctx context.Context, p BlockCreateParams, opts ...RequestOption) (*Block, error)
- func (s *BlockService) Disable(ctx context.Context, identity string, opts ...RequestOption) (*Block, error)
- func (s *BlockService) Enable(ctx context.Context, identity string, opts ...RequestOption) (*Block, error)
- func (s *BlockService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Block, error)
- func (s *BlockService) List(ctx context.Context, p BlockListParams, opts ...RequestOption) (*BlockListResult, error)
- type Creditor
- type CreditorBankAccount
- type CreditorBankAccountCreateParams
- type CreditorBankAccountListPagingIterator
- type CreditorBankAccountListParams
- type CreditorBankAccountListResult
- type CreditorBankAccountService
- func (s *CreditorBankAccountService) All(ctx context.Context, p CreditorBankAccountListParams, opts ...RequestOption) *CreditorBankAccountListPagingIterator
- func (s *CreditorBankAccountService) Create(ctx context.Context, p CreditorBankAccountCreateParams, opts ...RequestOption) (*CreditorBankAccount, error)
- func (s *CreditorBankAccountService) Disable(ctx context.Context, identity string, opts ...RequestOption) (*CreditorBankAccount, error)
- func (s *CreditorBankAccountService) Get(ctx context.Context, identity string, opts ...RequestOption) (*CreditorBankAccount, error)
- func (s *CreditorBankAccountService) List(ctx context.Context, p CreditorBankAccountListParams, opts ...RequestOption) (*CreditorBankAccountListResult, error)
- type CreditorCreateParams
- type CreditorGetParams
- type CreditorListPagingIterator
- type CreditorListParams
- type CreditorListResult
- type CreditorService
- func (s *CreditorService) All(ctx context.Context, p CreditorListParams, opts ...RequestOption) *CreditorListPagingIterator
- func (s *CreditorService) Create(ctx context.Context, p CreditorCreateParams, opts ...RequestOption) (*Creditor, error)
- func (s *CreditorService) Get(ctx context.Context, identity string, p CreditorGetParams, ...) (*Creditor, error)
- func (s *CreditorService) List(ctx context.Context, p CreditorListParams, opts ...RequestOption) (*CreditorListResult, error)
- func (s *CreditorService) Update(ctx context.Context, identity string, p CreditorUpdateParams, ...) (*Creditor, error)
- type CreditorUpdateParams
- type CurrencyExchangeRate
- type CurrencyExchangeRateListPagingIterator
- type CurrencyExchangeRateListParams
- type CurrencyExchangeRateListResult
- type CurrencyExchangeRateService
- func (s *CurrencyExchangeRateService) All(ctx context.Context, p CurrencyExchangeRateListParams, opts ...RequestOption) *CurrencyExchangeRateListPagingIterator
- func (s *CurrencyExchangeRateService) List(ctx context.Context, p CurrencyExchangeRateListParams, opts ...RequestOption) (*CurrencyExchangeRateListResult, error)
- type Customer
- type CustomerBankAccount
- type CustomerBankAccountCreateParams
- type CustomerBankAccountListPagingIterator
- type CustomerBankAccountListParams
- type CustomerBankAccountListResult
- type CustomerBankAccountService
- func (s *CustomerBankAccountService) All(ctx context.Context, p CustomerBankAccountListParams, opts ...RequestOption) *CustomerBankAccountListPagingIterator
- func (s *CustomerBankAccountService) Create(ctx context.Context, p CustomerBankAccountCreateParams, opts ...RequestOption) (*CustomerBankAccount, error)
- func (s *CustomerBankAccountService) Disable(ctx context.Context, identity string, opts ...RequestOption) (*CustomerBankAccount, error)
- func (s *CustomerBankAccountService) Get(ctx context.Context, identity string, opts ...RequestOption) (*CustomerBankAccount, error)
- func (s *CustomerBankAccountService) List(ctx context.Context, p CustomerBankAccountListParams, opts ...RequestOption) (*CustomerBankAccountListResult, error)
- func (s *CustomerBankAccountService) Update(ctx context.Context, identity string, p CustomerBankAccountUpdateParams, ...) (*CustomerBankAccount, error)
- type CustomerBankAccountUpdateParams
- type CustomerCreateParams
- type CustomerListPagingIterator
- type CustomerListParams
- type CustomerListResult
- type CustomerNotification
- type CustomerNotificationHandleParams
- type CustomerNotificationService
- type CustomerRemoveParams
- type CustomerService
- func (s *CustomerService) All(ctx context.Context, p CustomerListParams, opts ...RequestOption) *CustomerListPagingIterator
- func (s *CustomerService) Create(ctx context.Context, p CustomerCreateParams, opts ...RequestOption) (*Customer, error)
- func (s *CustomerService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Customer, error)
- func (s *CustomerService) List(ctx context.Context, p CustomerListParams, opts ...RequestOption) (*CustomerListResult, error)
- func (s *CustomerService) Remove(ctx context.Context, identity string, p CustomerRemoveParams, ...) (*Customer, error)
- func (s *CustomerService) Update(ctx context.Context, identity string, p CustomerUpdateParams, ...) (*Customer, error)
- type CustomerUpdateParams
- type Event
- type EventHandler
- type EventHandlerFunc
- type EventListPagingIterator
- type EventListParams
- type EventListResult
- type EventService
- func (s *EventService) All(ctx context.Context, p EventListParams, opts ...RequestOption) *EventListPagingIterator
- func (s *EventService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Event, error)
- func (s *EventService) List(ctx context.Context, p EventListParams, opts ...RequestOption) (*EventListResult, error)
- type InstalmentSchedule
- type InstalmentScheduleCancelParams
- type InstalmentScheduleCreateWithDatesParams
- type InstalmentScheduleCreateWithScheduleParams
- type InstalmentScheduleListPagingIterator
- type InstalmentScheduleListParams
- type InstalmentScheduleListResult
- type InstalmentScheduleService
- func (s *InstalmentScheduleService) All(ctx context.Context, p InstalmentScheduleListParams, opts ...RequestOption) *InstalmentScheduleListPagingIterator
- func (s *InstalmentScheduleService) Cancel(ctx context.Context, identity string, p InstalmentScheduleCancelParams, ...) (*InstalmentSchedule, error)
- func (s *InstalmentScheduleService) CreateWithDates(ctx context.Context, p InstalmentScheduleCreateWithDatesParams, ...) (*InstalmentSchedule, error)
- func (s *InstalmentScheduleService) CreateWithSchedule(ctx context.Context, p InstalmentScheduleCreateWithScheduleParams, ...) (*InstalmentSchedule, error)
- func (s *InstalmentScheduleService) Get(ctx context.Context, identity string, opts ...RequestOption) (*InstalmentSchedule, error)
- func (s *InstalmentScheduleService) List(ctx context.Context, p InstalmentScheduleListParams, opts ...RequestOption) (*InstalmentScheduleListResult, error)
- func (s *InstalmentScheduleService) Update(ctx context.Context, identity string, p InstalmentScheduleUpdateParams, ...) (*InstalmentSchedule, error)
- type InstalmentScheduleUpdateParams
- type Institution
- type InstitutionListParams
- type InstitutionListResult
- type InstitutionService
- type Mandate
- type MandateCancelParams
- type MandateCreateParams
- type MandateImport
- type MandateImportCancelParams
- type MandateImportCreateParams
- type MandateImportEntry
- type MandateImportEntryCreateParams
- type MandateImportEntryListPagingIterator
- type MandateImportEntryListParams
- type MandateImportEntryListResult
- type MandateImportEntryService
- func (s *MandateImportEntryService) All(ctx context.Context, p MandateImportEntryListParams, opts ...RequestOption) *MandateImportEntryListPagingIterator
- func (s *MandateImportEntryService) Create(ctx context.Context, p MandateImportEntryCreateParams, opts ...RequestOption) (*MandateImportEntry, error)
- func (s *MandateImportEntryService) List(ctx context.Context, p MandateImportEntryListParams, opts ...RequestOption) (*MandateImportEntryListResult, error)
- type MandateImportGetParams
- type MandateImportService
- func (s *MandateImportService) Cancel(ctx context.Context, identity string, p MandateImportCancelParams, ...) (*MandateImport, error)
- func (s *MandateImportService) Create(ctx context.Context, p MandateImportCreateParams, opts ...RequestOption) (*MandateImport, error)
- func (s *MandateImportService) Get(ctx context.Context, identity string, p MandateImportGetParams, ...) (*MandateImport, error)
- func (s *MandateImportService) Submit(ctx context.Context, identity string, p MandateImportSubmitParams, ...) (*MandateImport, error)
- type MandateImportSubmitParams
- type MandateListPagingIterator
- type MandateListParams
- type MandateListResult
- type MandatePdf
- type MandatePdfCreateParams
- type MandatePdfService
- type MandateReinstateParams
- type MandateService
- func (s *MandateService) All(ctx context.Context, p MandateListParams, opts ...RequestOption) *MandateListPagingIterator
- func (s *MandateService) Cancel(ctx context.Context, identity string, p MandateCancelParams, ...) (*Mandate, error)
- func (s *MandateService) Create(ctx context.Context, p MandateCreateParams, opts ...RequestOption) (*Mandate, error)
- func (s *MandateService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Mandate, error)
- func (s *MandateService) List(ctx context.Context, p MandateListParams, opts ...RequestOption) (*MandateListResult, error)
- func (s *MandateService) Reinstate(ctx context.Context, identity string, p MandateReinstateParams, ...) (*Mandate, error)
- func (s *MandateService) Update(ctx context.Context, identity string, p MandateUpdateParams, ...) (*Mandate, error)
- type MandateUpdateParams
- type Option
- type PagingIterator
- type PayerAuthorisation
- type PayerAuthorisationCreateParams
- type PayerAuthorisationService
- func (s *PayerAuthorisationService) Confirm(ctx context.Context, identity string, opts ...RequestOption) (*PayerAuthorisation, error)
- func (s *PayerAuthorisationService) Create(ctx context.Context, p PayerAuthorisationCreateParams, opts ...RequestOption) (*PayerAuthorisation, error)
- func (s *PayerAuthorisationService) Get(ctx context.Context, identity string, opts ...RequestOption) (*PayerAuthorisation, error)
- func (s *PayerAuthorisationService) Submit(ctx context.Context, identity string, opts ...RequestOption) (*PayerAuthorisation, error)
- func (s *PayerAuthorisationService) Update(ctx context.Context, identity string, p PayerAuthorisationUpdateParams, ...) (*PayerAuthorisation, error)
- type PayerAuthorisationUpdateParams
- type Payment
- type PaymentCancelParams
- type PaymentCreateParams
- type PaymentListPagingIterator
- type PaymentListParams
- type PaymentListResult
- type PaymentRetryParams
- type PaymentService
- func (s *PaymentService) All(ctx context.Context, p PaymentListParams, opts ...RequestOption) *PaymentListPagingIterator
- func (s *PaymentService) Cancel(ctx context.Context, identity string, p PaymentCancelParams, ...) (*Payment, error)
- func (s *PaymentService) Create(ctx context.Context, p PaymentCreateParams, opts ...RequestOption) (*Payment, error)
- func (s *PaymentService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Payment, error)
- func (s *PaymentService) List(ctx context.Context, p PaymentListParams, opts ...RequestOption) (*PaymentListResult, error)
- func (s *PaymentService) Retry(ctx context.Context, identity string, p PaymentRetryParams, ...) (*Payment, error)
- func (s *PaymentService) Update(ctx context.Context, identity string, p PaymentUpdateParams, ...) (*Payment, error)
- type PaymentUpdateParams
- type Payout
- type PayoutItem
- type PayoutItemListPagingIterator
- type PayoutItemListParams
- type PayoutItemListResult
- type PayoutItemService
- type PayoutListPagingIterator
- type PayoutListParams
- type PayoutListResult
- type PayoutService
- func (s *PayoutService) All(ctx context.Context, p PayoutListParams, opts ...RequestOption) *PayoutListPagingIterator
- func (s *PayoutService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Payout, error)
- func (s *PayoutService) List(ctx context.Context, p PayoutListParams, opts ...RequestOption) (*PayoutListResult, error)
- func (s *PayoutService) Update(ctx context.Context, identity string, p PayoutUpdateParams, ...) (*Payout, error)
- type PayoutUpdateParams
- type RedirectFlow
- type RedirectFlowCompleteParams
- type RedirectFlowCreateParams
- type RedirectFlowService
- func (s *RedirectFlowService) Complete(ctx context.Context, identity string, p RedirectFlowCompleteParams, ...) (*RedirectFlow, error)
- func (s *RedirectFlowService) Create(ctx context.Context, p RedirectFlowCreateParams, opts ...RequestOption) (*RedirectFlow, error)
- func (s *RedirectFlowService) Get(ctx context.Context, identity string, opts ...RequestOption) (*RedirectFlow, error)
- type Refund
- type RefundCreateParams
- type RefundListPagingIterator
- type RefundListParams
- type RefundListResult
- type RefundService
- func (s *RefundService) All(ctx context.Context, p RefundListParams, opts ...RequestOption) *RefundListPagingIterator
- func (s *RefundService) Create(ctx context.Context, p RefundCreateParams, opts ...RequestOption) (*Refund, error)
- func (s *RefundService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Refund, error)
- func (s *RefundService) List(ctx context.Context, p RefundListParams, opts ...RequestOption) (*RefundListResult, error)
- func (s *RefundService) Update(ctx context.Context, identity string, p RefundUpdateParams, ...) (*Refund, error)
- type RefundUpdateParams
- type RequestOption
- type ScenarioSimulator
- type ScenarioSimulatorRunParams
- type ScenarioSimulatorService
- type Service
- type Subscription
- type SubscriptionCancelParams
- type SubscriptionCreateParams
- type SubscriptionListPagingIterator
- type SubscriptionListParams
- type SubscriptionListResult
- type SubscriptionPauseParams
- type SubscriptionResumeParams
- type SubscriptionService
- func (s *SubscriptionService) All(ctx context.Context, p SubscriptionListParams, opts ...RequestOption) *SubscriptionListPagingIterator
- func (s *SubscriptionService) Cancel(ctx context.Context, identity string, p SubscriptionCancelParams, ...) (*Subscription, error)
- func (s *SubscriptionService) Create(ctx context.Context, p SubscriptionCreateParams, opts ...RequestOption) (*Subscription, error)
- func (s *SubscriptionService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Subscription, error)
- func (s *SubscriptionService) List(ctx context.Context, p SubscriptionListParams, opts ...RequestOption) (*SubscriptionListResult, error)
- func (s *SubscriptionService) Pause(ctx context.Context, identity string, p SubscriptionPauseParams, ...) (*Subscription, error)
- func (s *SubscriptionService) Resume(ctx context.Context, identity string, p SubscriptionResumeParams, ...) (*Subscription, error)
- func (s *SubscriptionService) Update(ctx context.Context, identity string, p SubscriptionUpdateParams, ...) (*Subscription, error)
- type SubscriptionUpdateParams
- type TaxRate
- type TaxRateListPagingIterator
- type TaxRateListParams
- type TaxRateListResult
- type TaxRateService
- func (s *TaxRateService) All(ctx context.Context, p TaxRateListParams, opts ...RequestOption) *TaxRateListPagingIterator
- func (s *TaxRateService) Get(ctx context.Context, identity string, opts ...RequestOption) (*TaxRate, error)
- func (s *TaxRateService) List(ctx context.Context, p TaxRateListParams, opts ...RequestOption) (*TaxRateListResult, error)
- type ValidationError
- type Webhook
- type WebhookHandler
- type WebhookListPagingIterator
- type WebhookListParams
- type WebhookListResult
- type WebhookService
- func (s *WebhookService) All(ctx context.Context, p WebhookListParams, opts ...RequestOption) *WebhookListPagingIterator
- func (s *WebhookService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Webhook, error)
- func (s *WebhookService) List(ctx context.Context, p WebhookListParams, opts ...RequestOption) (*WebhookListResult, error)
- func (s *WebhookService) Retry(ctx context.Context, identity string, opts ...RequestOption) (*Webhook, error)
Constants ¶
const ( // Live environment LiveEndpoint = "https://api.gocardless.com" // Sandbox environment SandboxEndpoint = "https://api-sandbox.gocardless.com" )
Variables ¶
This section is empty.
Functions ¶
func NewIdempotencyKey ¶
func NewIdempotencyKey() string
NewIdempotencyKey generates a random and unique idempotency key
Types ¶
type APIError ¶
type BankAuthorisation ¶
type BankAuthorisation struct { AuthorisationType string `url:"authorisation_type,omitempty" json:"authorisation_type,omitempty"` AuthorisedAt string `url:"authorised_at,omitempty" json:"authorised_at,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` ExpiresAt string `url:"expires_at,omitempty" json:"expires_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` LastVisitedAt string `url:"last_visited_at,omitempty" json:"last_visited_at,omitempty"` Links struct { BillingRequest string `url:"billing_request,omitempty" json:"billing_request,omitempty"` Institution string `url:"institution,omitempty" json:"institution,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` Url string `url:"url,omitempty" json:"url,omitempty"` }
BankAuthorisation model
type BankAuthorisationCreateParams ¶
type BankAuthorisationCreateParams struct { AuthorisationType string `url:"authorisation_type,omitempty" json:"authorisation_type,omitempty"` Links struct { BillingRequest string `url:"billing_request,omitempty" json:"billing_request,omitempty"` Institution string `url:"institution,omitempty" json:"institution,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` }
BankAuthorisationCreateParams parameters
type BankAuthorisationService ¶
type BankAuthorisationService struct {
// contains filtered or unexported fields
}
BankAuthorisationService manages bank_authorisations
func (*BankAuthorisationService) Create ¶
func (s *BankAuthorisationService) Create(ctx context.Context, p BankAuthorisationCreateParams, opts ...RequestOption) (*BankAuthorisation, error)
Create Create a Bank Authorisation.
func (*BankAuthorisationService) Get ¶
func (s *BankAuthorisationService) Get(ctx context.Context, identity string, opts ...RequestOption) (*BankAuthorisation, error)
Get Fetches a bank authorisation
type BankDetailsLookup ¶
type BankDetailsLookup struct { AvailableDebitSchemes []string `url:"available_debit_schemes,omitempty" json:"available_debit_schemes,omitempty"` BankName string `url:"bank_name,omitempty" json:"bank_name,omitempty"` Bic string `url:"bic,omitempty" json:"bic,omitempty"` }
BankDetailsLookup model
type BankDetailsLookupCreateParams ¶
type BankDetailsLookupCreateParams struct { AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` }
BankDetailsLookupCreateParams parameters
type BankDetailsLookupService ¶
type BankDetailsLookupService struct {
// contains filtered or unexported fields
}
BankDetailsLookupService manages bank_details_lookups
func (*BankDetailsLookupService) Create ¶
func (s *BankDetailsLookupService) Create(ctx context.Context, p BankDetailsLookupCreateParams, opts ...RequestOption) (*BankDetailsLookup, error)
Create Performs a bank details lookup. As part of the lookup, a modulus check and reachability check are performed.
If your request returns an [error](#api-usage-errors) or the `available_debit_schemes` attribute is an empty array, you will not be able to collect payments from the specified bank account. GoCardless may be able to collect payments from an account even if no `bic` is returned.
Bank account details may be supplied using [local details](#appendix-local-bank-details) or an IBAN.
_Note:_ Usage of this endpoint is monitored. If your organisation relies on GoCardless for modulus or reachability checking but not for payment collection, please get in touch.
type BillingRequest ¶
type BillingRequest struct { Actions []struct { BankAuthorisation struct { Adapter string `url:"adapter,omitempty" json:"adapter,omitempty"` AuthorisationType string `url:"authorisation_type,omitempty" json:"authorisation_type,omitempty"` RequiresInstitution bool `url:"requires_institution,omitempty" json:"requires_institution,omitempty"` } `url:"bank_authorisation,omitempty" json:"bank_authorisation,omitempty"` CollectCustomerDetails struct { DefaultCountryCode string `url:"default_country_code,omitempty" json:"default_country_code,omitempty"` } `url:"collect_customer_details,omitempty" json:"collect_customer_details,omitempty"` CompletesActions []string `url:"completes_actions,omitempty" json:"completes_actions,omitempty"` Required bool `url:"required,omitempty" json:"required,omitempty"` RequiresActions []string `url:"requires_actions,omitempty" json:"requires_actions,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` Type string `url:"type,omitempty" json:"type,omitempty"` } `url:"actions,omitempty" json:"actions,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { BankAuthorisation string `url:"bank_authorisation,omitempty" json:"bank_authorisation,omitempty"` Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` CustomerBillingDetail string `url:"customer_billing_detail,omitempty" json:"customer_billing_detail,omitempty"` MandateRequest string `url:"mandate_request,omitempty" json:"mandate_request,omitempty"` MandateRequestMandate string `url:"mandate_request_mandate,omitempty" json:"mandate_request_mandate,omitempty"` PaymentRequest string `url:"payment_request,omitempty" json:"payment_request,omitempty"` PaymentRequestPayment string `url:"payment_request_payment,omitempty" json:"payment_request_payment,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` MandateRequest struct { Currency string `url:"currency,omitempty" json:"currency,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` Verify string `url:"verify,omitempty" json:"verify,omitempty"` } `url:"mandate_request,omitempty" json:"mandate_request,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PaymentRequest struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` Links struct { Payment string `url:"payment,omitempty" json:"payment,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"payment_request,omitempty" json:"payment_request,omitempty"` Resources struct { Customer struct { CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` } `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumberEnding string `url:"account_number_ending,omitempty" json:"account_number_ending,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankName string `url:"bank_name,omitempty" json:"bank_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Customer string `url:"customer,omitempty" json:"customer,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` } `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` CustomerBillingDetail struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` IpAddress string `url:"ip_address,omitempty" json:"ip_address,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` Schemes []string `url:"schemes,omitempty" json:"schemes,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"customer_billing_detail,omitempty" json:"customer_billing_detail,omitempty"` } `url:"resources,omitempty" json:"resources,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
BillingRequest model
type BillingRequestCancelParams ¶
type BillingRequestCancelParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
BillingRequestCancelParams parameters
type BillingRequestCollectBankAccountParams ¶
type BillingRequestCollectBankAccountParams struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountNumberSuffix string `url:"account_number_suffix,omitempty" json:"account_number_suffix,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` }
BillingRequestCollectBankAccountParams parameters
type BillingRequestCollectCustomerDetailsParams ¶
type BillingRequestCollectCustomerDetailsParams struct { Customer struct { CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` } `url:"customer,omitempty" json:"customer,omitempty"` CustomerBillingDetail struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"customer_billing_detail,omitempty" json:"customer_billing_detail,omitempty"` }
BillingRequestCollectCustomerDetailsParams parameters
type BillingRequestConfirmPayerDetailsParams ¶
type BillingRequestConfirmPayerDetailsParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
BillingRequestConfirmPayerDetailsParams parameters
type BillingRequestCreateParams ¶
type BillingRequestCreateParams struct { Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` MandateRequest struct { Currency string `url:"currency,omitempty" json:"currency,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"mandate_request,omitempty" json:"mandate_request,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PaymentRequest struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"payment_request,omitempty" json:"payment_request,omitempty"` }
BillingRequestCreateParams parameters
type BillingRequestFlow ¶
type BillingRequestFlow struct { AuthorisationUrl string `url:"authorisation_url,omitempty" json:"authorisation_url,omitempty"` AutoFulfil bool `url:"auto_fulfil,omitempty" json:"auto_fulfil,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` ExitUri string `url:"exit_uri,omitempty" json:"exit_uri,omitempty"` ExpiresAt string `url:"expires_at,omitempty" json:"expires_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { BillingRequest string `url:"billing_request,omitempty" json:"billing_request,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` LockBankAccount bool `url:"lock_bank_account,omitempty" json:"lock_bank_account,omitempty"` LockCustomerDetails bool `url:"lock_customer_details,omitempty" json:"lock_customer_details,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` SessionToken string `url:"session_token,omitempty" json:"session_token,omitempty"` }
BillingRequestFlow model
type BillingRequestFlowCreateParams ¶
type BillingRequestFlowCreateParams struct { AutoFulfil bool `url:"auto_fulfil,omitempty" json:"auto_fulfil,omitempty"` ExitUri string `url:"exit_uri,omitempty" json:"exit_uri,omitempty"` Links struct { BillingRequest string `url:"billing_request,omitempty" json:"billing_request,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` LockBankAccount bool `url:"lock_bank_account,omitempty" json:"lock_bank_account,omitempty"` LockCustomerDetails bool `url:"lock_customer_details,omitempty" json:"lock_customer_details,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` }
BillingRequestFlowCreateParams parameters
type BillingRequestFlowInitialiseParams ¶
type BillingRequestFlowInitialiseParams struct{}
BillingRequestFlowInitialiseParams parameters
type BillingRequestFlowService ¶
type BillingRequestFlowService struct {
// contains filtered or unexported fields
}
BillingRequestFlowService manages billing_request_flows
func (*BillingRequestFlowService) Create ¶
func (s *BillingRequestFlowService) Create(ctx context.Context, p BillingRequestFlowCreateParams, opts ...RequestOption) (*BillingRequestFlow, error)
Create Creates a new billing request flow.
func (*BillingRequestFlowService) Initialise ¶
func (s *BillingRequestFlowService) Initialise(ctx context.Context, identity string, p BillingRequestFlowInitialiseParams, opts ...RequestOption) (*BillingRequestFlow, error)
Initialise Returns the flow having generated a fresh session token which can be used to power integrations that manipulate the flow.
type BillingRequestFulfilParams ¶
type BillingRequestFulfilParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
BillingRequestFulfilParams parameters
type BillingRequestListPagingIterator ¶
type BillingRequestListPagingIterator struct {
// contains filtered or unexported fields
}
func (*BillingRequestListPagingIterator) Next ¶
func (c *BillingRequestListPagingIterator) Next() bool
func (*BillingRequestListPagingIterator) Value ¶
func (c *BillingRequestListPagingIterator) Value(ctx context.Context) (*BillingRequestListResult, error)
type BillingRequestListParams ¶
type BillingRequestListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
BillingRequestListParams parameters
type BillingRequestListResult ¶
type BillingRequestListResult struct { BillingRequests []BillingRequest `json:"billing_requests"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
BillingRequestListResult response including pagination metadata
type BillingRequestNotifyParams ¶
type BillingRequestNotifyParams struct { NotificationType string `url:"notification_type,omitempty" json:"notification_type,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` }
BillingRequestNotifyParams parameters
type BillingRequestService ¶
type BillingRequestService struct {
// contains filtered or unexported fields
}
BillingRequestService manages billing_requests
func (*BillingRequestService) All ¶
func (s *BillingRequestService) All(ctx context.Context, p BillingRequestListParams, opts ...RequestOption) *BillingRequestListPagingIterator
func (*BillingRequestService) Cancel ¶
func (s *BillingRequestService) Cancel(ctx context.Context, identity string, p BillingRequestCancelParams, opts ...RequestOption) (*BillingRequest, error)
Cancel Immediately cancels a billing request, causing all billing request flows to expire.
func (*BillingRequestService) CollectBankAccount ¶
func (s *BillingRequestService) CollectBankAccount(ctx context.Context, identity string, p BillingRequestCollectBankAccountParams, opts ...RequestOption) (*BillingRequest, error)
CollectBankAccount If the billing request has a pending <code>collect_bank_account</code> action, this endpoint can be used to collect the details in order to complete it.
The endpoint takes the same payload as Customer Bank Accounts, but check the bank account is valid for the billing request scheme before creating and attaching it.
func (*BillingRequestService) CollectCustomerDetails ¶
func (s *BillingRequestService) CollectCustomerDetails(ctx context.Context, identity string, p BillingRequestCollectCustomerDetailsParams, opts ...RequestOption) (*BillingRequest, error)
CollectCustomerDetails If the billing request has a pending <code>collect_customer_details</code> action, this endpoint can be used to collect the details in order to complete it.
The endpoint takes the same payload as Customers, but checks that the customer fields are populated correctly for the billing request scheme.
Whatever is provided to this endpoint is used to update the referenced customer, and will take effect immediately after the request is successful.
func (*BillingRequestService) ConfirmPayerDetails ¶
func (s *BillingRequestService) ConfirmPayerDetails(ctx context.Context, identity string, p BillingRequestConfirmPayerDetailsParams, opts ...RequestOption) (*BillingRequest, error)
ConfirmPayerDetails This is needed when you have mandate_request. As a scheme compliance rule we are required to allow the payer to crosscheck the details entered by them and confirm it.
func (*BillingRequestService) Create ¶
func (s *BillingRequestService) Create(ctx context.Context, p BillingRequestCreateParams, opts ...RequestOption) (*BillingRequest, error)
Create
func (*BillingRequestService) Fulfil ¶
func (s *BillingRequestService) Fulfil(ctx context.Context, identity string, p BillingRequestFulfilParams, opts ...RequestOption) (*BillingRequest, error)
Fulfil If a billing request is ready to be fulfilled, call this endpoint to cause it to fulfil, executing the payment.
func (*BillingRequestService) Get ¶
func (s *BillingRequestService) Get(ctx context.Context, identity string, opts ...RequestOption) (*BillingRequest, error)
Get Fetches a billing request
func (*BillingRequestService) List ¶
func (s *BillingRequestService) List(ctx context.Context, p BillingRequestListParams, opts ...RequestOption) (*BillingRequestListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your billing_requests.
func (*BillingRequestService) Notify ¶
func (s *BillingRequestService) Notify(ctx context.Context, identity string, p BillingRequestNotifyParams, opts ...RequestOption) (*BillingRequest, error)
Notify Notifies the customer linked to the billing request, asking them to authorise it. Currently, the customer can only be notified by email.
type BillingRequestTemplate ¶
type BillingRequestTemplate struct { AuthorisationUrl string `url:"authorisation_url,omitempty" json:"authorisation_url,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` MandateRequestCurrency string `url:"mandate_request_currency,omitempty" json:"mandate_request_currency,omitempty"` MandateRequestMetadata map[string]interface{} `url:"mandate_request_metadata,omitempty" json:"mandate_request_metadata,omitempty"` MandateRequestScheme string `url:"mandate_request_scheme,omitempty" json:"mandate_request_scheme,omitempty"` MandateRequestVerify string `url:"mandate_request_verify,omitempty" json:"mandate_request_verify,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentRequestAmount int `url:"payment_request_amount,omitempty" json:"payment_request_amount,omitempty"` PaymentRequestCurrency string `url:"payment_request_currency,omitempty" json:"payment_request_currency,omitempty"` PaymentRequestDescription string `url:"payment_request_description,omitempty" json:"payment_request_description,omitempty"` PaymentRequestMetadata map[string]interface{} `url:"payment_request_metadata,omitempty" json:"payment_request_metadata,omitempty"` PaymentRequestScheme string `url:"payment_request_scheme,omitempty" json:"payment_request_scheme,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` UpdatedAt string `url:"updated_at,omitempty" json:"updated_at,omitempty"` }
BillingRequestTemplate model
type BillingRequestTemplateCreateParams ¶
type BillingRequestTemplateCreateParams struct { Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` MandateRequestCurrency string `url:"mandate_request_currency,omitempty" json:"mandate_request_currency,omitempty"` MandateRequestMetadata map[string]interface{} `url:"mandate_request_metadata,omitempty" json:"mandate_request_metadata,omitempty"` MandateRequestScheme string `url:"mandate_request_scheme,omitempty" json:"mandate_request_scheme,omitempty"` MandateRequestVerify string `url:"mandate_request_verify,omitempty" json:"mandate_request_verify,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentRequestAmount int `url:"payment_request_amount,omitempty" json:"payment_request_amount,omitempty"` PaymentRequestCurrency string `url:"payment_request_currency,omitempty" json:"payment_request_currency,omitempty"` PaymentRequestDescription string `url:"payment_request_description,omitempty" json:"payment_request_description,omitempty"` PaymentRequestMetadata map[string]interface{} `url:"payment_request_metadata,omitempty" json:"payment_request_metadata,omitempty"` PaymentRequestScheme string `url:"payment_request_scheme,omitempty" json:"payment_request_scheme,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` }
BillingRequestTemplateCreateParams parameters
type BillingRequestTemplateListPagingIterator ¶
type BillingRequestTemplateListPagingIterator struct {
// contains filtered or unexported fields
}
func (*BillingRequestTemplateListPagingIterator) Next ¶
func (c *BillingRequestTemplateListPagingIterator) Next() bool
func (*BillingRequestTemplateListPagingIterator) Value ¶
func (c *BillingRequestTemplateListPagingIterator) Value(ctx context.Context) (*BillingRequestTemplateListResult, error)
type BillingRequestTemplateListParams ¶
type BillingRequestTemplateListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` }
BillingRequestTemplateListParams parameters
type BillingRequestTemplateListResult ¶
type BillingRequestTemplateListResult struct { BillingRequestTemplates []BillingRequestTemplate `json:"billing_request_templates"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
BillingRequestTemplateListResult response including pagination metadata
type BillingRequestTemplateService ¶
type BillingRequestTemplateService struct {
// contains filtered or unexported fields
}
BillingRequestTemplateService manages billing_request_templates
func (*BillingRequestTemplateService) All ¶
func (s *BillingRequestTemplateService) All(ctx context.Context, p BillingRequestTemplateListParams, opts ...RequestOption) *BillingRequestTemplateListPagingIterator
func (*BillingRequestTemplateService) Create ¶
func (s *BillingRequestTemplateService) Create(ctx context.Context, p BillingRequestTemplateCreateParams, opts ...RequestOption) (*BillingRequestTemplate, error)
Create
func (*BillingRequestTemplateService) Get ¶
func (s *BillingRequestTemplateService) Get(ctx context.Context, identity string, opts ...RequestOption) (*BillingRequestTemplate, error)
Get Fetches a Billing Request Template
func (*BillingRequestTemplateService) List ¶
func (s *BillingRequestTemplateService) List(ctx context.Context, p BillingRequestTemplateListParams, opts ...RequestOption) (*BillingRequestTemplateListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your Billing Request Templates.
func (*BillingRequestTemplateService) Update ¶
func (s *BillingRequestTemplateService) Update(ctx context.Context, identity string, p BillingRequestTemplateUpdateParams, opts ...RequestOption) (*BillingRequestTemplate, error)
Update Updates a Billing Request Template, which will affect all future Billing Requests created by this template.
type BillingRequestTemplateUpdateParams ¶
type BillingRequestTemplateUpdateParams struct { MandateRequestCurrency string `url:"mandate_request_currency,omitempty" json:"mandate_request_currency,omitempty"` MandateRequestMetadata map[string]interface{} `url:"mandate_request_metadata,omitempty" json:"mandate_request_metadata,omitempty"` MandateRequestScheme string `url:"mandate_request_scheme,omitempty" json:"mandate_request_scheme,omitempty"` MandateRequestVerify string `url:"mandate_request_verify,omitempty" json:"mandate_request_verify,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentRequestAmount int `url:"payment_request_amount,omitempty" json:"payment_request_amount,omitempty"` PaymentRequestCurrency string `url:"payment_request_currency,omitempty" json:"payment_request_currency,omitempty"` PaymentRequestDescription string `url:"payment_request_description,omitempty" json:"payment_request_description,omitempty"` PaymentRequestMetadata map[string]interface{} `url:"payment_request_metadata,omitempty" json:"payment_request_metadata,omitempty"` PaymentRequestScheme string `url:"payment_request_scheme,omitempty" json:"payment_request_scheme,omitempty"` RedirectUri string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"` }
BillingRequestTemplateUpdateParams parameters
type Block ¶
type Block struct { Active bool `url:"active,omitempty" json:"active,omitempty"` BlockType string `url:"block_type,omitempty" json:"block_type,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` ReasonDescription string `url:"reason_description,omitempty" json:"reason_description,omitempty"` ReasonType string `url:"reason_type,omitempty" json:"reason_type,omitempty"` ResourceReference string `url:"resource_reference,omitempty" json:"resource_reference,omitempty"` UpdatedAt string `url:"updated_at,omitempty" json:"updated_at,omitempty"` }
Block model
type BlockBlockByRefParams ¶
type BlockBlockByRefParams struct { Active bool `url:"active,omitempty" json:"active,omitempty"` ReasonDescription string `url:"reason_description,omitempty" json:"reason_description,omitempty"` ReasonType string `url:"reason_type,omitempty" json:"reason_type,omitempty"` ReferenceType string `url:"reference_type,omitempty" json:"reference_type,omitempty"` ReferenceValue string `url:"reference_value,omitempty" json:"reference_value,omitempty"` }
BlockBlockByRefParams parameters
type BlockBlockByRefResult ¶
type BlockBlockByRefResult struct { Blocks []struct { Active bool `url:"active,omitempty" json:"active,omitempty"` BlockType string `url:"block_type,omitempty" json:"block_type,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` ReasonDescription string `url:"reason_description,omitempty" json:"reason_description,omitempty"` ReasonType string `url:"reason_type,omitempty" json:"reason_type,omitempty"` ResourceReference string `url:"resource_reference,omitempty" json:"resource_reference,omitempty"` UpdatedAt string `url:"updated_at,omitempty" json:"updated_at,omitempty"` } `url:"blocks,omitempty" json:"blocks,omitempty"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `url:"meta,omitempty" json:"meta,omitempty"` }
type BlockCreateParams ¶
type BlockCreateParams struct { Active bool `url:"active,omitempty" json:"active,omitempty"` BlockType string `url:"block_type,omitempty" json:"block_type,omitempty"` ReasonDescription string `url:"reason_description,omitempty" json:"reason_description,omitempty"` ReasonType string `url:"reason_type,omitempty" json:"reason_type,omitempty"` ResourceReference string `url:"resource_reference,omitempty" json:"resource_reference,omitempty"` }
BlockCreateParams parameters
type BlockListPagingIterator ¶
type BlockListPagingIterator struct {
// contains filtered or unexported fields
}
func (*BlockListPagingIterator) Next ¶
func (c *BlockListPagingIterator) Next() bool
func (*BlockListPagingIterator) Value ¶
func (c *BlockListPagingIterator) Value(ctx context.Context) (*BlockListResult, error)
type BlockListParams ¶
type BlockListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` Block string `url:"block,omitempty" json:"block,omitempty"` BlockType string `url:"block_type,omitempty" json:"block_type,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` ReasonType string `url:"reason_type,omitempty" json:"reason_type,omitempty"` UpdatedAt string `url:"updated_at,omitempty" json:"updated_at,omitempty"` }
BlockListParams parameters
type BlockListResult ¶
type BlockListResult struct { Blocks []Block `json:"blocks"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
BlockListResult response including pagination metadata
type BlockService ¶
type BlockService struct {
// contains filtered or unexported fields
}
BlockService manages blocks
func (*BlockService) All ¶
func (s *BlockService) All(ctx context.Context, p BlockListParams, opts ...RequestOption) *BlockListPagingIterator
func (*BlockService) BlockByRef ¶
func (s *BlockService) BlockByRef(ctx context.Context, p BlockBlockByRefParams, opts ...RequestOption) ( *BlockBlockByRefResult, error)
BlockByRef Creates new blocks for a given reference. By default blocks will be active. Returns 201 if at least one block was created. Returns 200 if there were no new blocks created.
func (*BlockService) Create ¶
func (s *BlockService) Create(ctx context.Context, p BlockCreateParams, opts ...RequestOption) (*Block, error)
Create Creates a new Block of a given type. By default it will be active.
func (*BlockService) Disable ¶
func (s *BlockService) Disable(ctx context.Context, identity string, opts ...RequestOption) (*Block, error)
Disable Disables a block so that it no longer will prevent mandate creation.
func (*BlockService) Enable ¶
func (s *BlockService) Enable(ctx context.Context, identity string, opts ...RequestOption) (*Block, error)
Enable Enables a previously disabled block so that it will prevent mandate creation
func (*BlockService) Get ¶
func (s *BlockService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Block, error)
Get Retrieves the details of an existing block.
func (*BlockService) List ¶
func (s *BlockService) List(ctx context.Context, p BlockListParams, opts ...RequestOption) (*BlockListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your blocks.
type Creditor ¶
type Creditor struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` CanCreateRefunds bool `url:"can_create_refunds,omitempty" json:"can_create_refunds,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` CustomPaymentPagesEnabled bool `url:"custom_payment_pages_enabled,omitempty" json:"custom_payment_pages_enabled,omitempty"` FxPayoutCurrency string `url:"fx_payout_currency,omitempty" json:"fx_payout_currency,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { DefaultAudPayoutAccount string `url:"default_aud_payout_account,omitempty" json:"default_aud_payout_account,omitempty"` DefaultCadPayoutAccount string `url:"default_cad_payout_account,omitempty" json:"default_cad_payout_account,omitempty"` DefaultDkkPayoutAccount string `url:"default_dkk_payout_account,omitempty" json:"default_dkk_payout_account,omitempty"` DefaultEurPayoutAccount string `url:"default_eur_payout_account,omitempty" json:"default_eur_payout_account,omitempty"` DefaultGbpPayoutAccount string `url:"default_gbp_payout_account,omitempty" json:"default_gbp_payout_account,omitempty"` DefaultNzdPayoutAccount string `url:"default_nzd_payout_account,omitempty" json:"default_nzd_payout_account,omitempty"` DefaultSekPayoutAccount string `url:"default_sek_payout_account,omitempty" json:"default_sek_payout_account,omitempty"` DefaultUsdPayoutAccount string `url:"default_usd_payout_account,omitempty" json:"default_usd_payout_account,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` LogoUrl string `url:"logo_url,omitempty" json:"logo_url,omitempty"` MandateImportsEnabled bool `url:"mandate_imports_enabled,omitempty" json:"mandate_imports_enabled,omitempty"` MerchantResponsibleForNotifications bool `url:"merchant_responsible_for_notifications,omitempty" json:"merchant_responsible_for_notifications,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SchemeIdentifiers []struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` CanSpecifyMandateReference bool `url:"can_specify_mandate_reference,omitempty" json:"can_specify_mandate_reference,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` MinimumAdvanceNotice int `url:"minimum_advance_notice,omitempty" json:"minimum_advance_notice,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"scheme_identifiers,omitempty" json:"scheme_identifiers,omitempty"` VerificationStatus string `url:"verification_status,omitempty" json:"verification_status,omitempty"` }
Creditor model
type CreditorBankAccount ¶
type CreditorBankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumberEnding string `url:"account_number_ending,omitempty" json:"account_number_ending,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankName string `url:"bank_name,omitempty" json:"bank_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` }
CreditorBankAccount model
type CreditorBankAccountCreateParams ¶
type CreditorBankAccountCreateParams struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` SetAsDefaultPayoutAccount bool `url:"set_as_default_payout_account,omitempty" json:"set_as_default_payout_account,omitempty"` }
CreditorBankAccountCreateParams parameters
type CreditorBankAccountListPagingIterator ¶
type CreditorBankAccountListPagingIterator struct {
// contains filtered or unexported fields
}
func (*CreditorBankAccountListPagingIterator) Next ¶
func (c *CreditorBankAccountListPagingIterator) Next() bool
func (*CreditorBankAccountListPagingIterator) Value ¶
func (c *CreditorBankAccountListPagingIterator) Value(ctx context.Context) (*CreditorBankAccountListResult, error)
type CreditorBankAccountListParams ¶
type CreditorBankAccountListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` }
CreditorBankAccountListParams parameters
type CreditorBankAccountListResult ¶
type CreditorBankAccountListResult struct { CreditorBankAccounts []CreditorBankAccount `json:"creditor_bank_accounts"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
CreditorBankAccountListResult response including pagination metadata
type CreditorBankAccountService ¶
type CreditorBankAccountService struct {
// contains filtered or unexported fields
}
CreditorBankAccountService manages creditor_bank_accounts
func (*CreditorBankAccountService) All ¶
func (s *CreditorBankAccountService) All(ctx context.Context, p CreditorBankAccountListParams, opts ...RequestOption) *CreditorBankAccountListPagingIterator
func (*CreditorBankAccountService) Create ¶
func (s *CreditorBankAccountService) Create(ctx context.Context, p CreditorBankAccountCreateParams, opts ...RequestOption) (*CreditorBankAccount, error)
Create Creates a new creditor bank account object.
func (*CreditorBankAccountService) Disable ¶
func (s *CreditorBankAccountService) Disable(ctx context.Context, identity string, opts ...RequestOption) (*CreditorBankAccount, error)
Disable Immediately disables the bank account, no money can be paid out to a disabled account.
This will return a `disable_failed` error if the bank account has already been disabled.
A disabled bank account can be re-enabled by creating a new bank account resource with the same details.
func (*CreditorBankAccountService) Get ¶
func (s *CreditorBankAccountService) Get(ctx context.Context, identity string, opts ...RequestOption) (*CreditorBankAccount, error)
Get Retrieves the details of an existing creditor bank account.
func (*CreditorBankAccountService) List ¶
func (s *CreditorBankAccountService) List(ctx context.Context, p CreditorBankAccountListParams, opts ...RequestOption) (*CreditorBankAccountListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your creditor bank accounts.
type CreditorCreateParams ¶
type CreditorCreateParams struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Links map[string]interface{} `url:"links,omitempty" json:"links,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` }
CreditorCreateParams parameters
type CreditorListPagingIterator ¶
type CreditorListPagingIterator struct {
// contains filtered or unexported fields
}
func (*CreditorListPagingIterator) Next ¶
func (c *CreditorListPagingIterator) Next() bool
func (*CreditorListPagingIterator) Value ¶
func (c *CreditorListPagingIterator) Value(ctx context.Context) (*CreditorListResult, error)
type CreditorListParams ¶
type CreditorListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` }
CreditorListParams parameters
type CreditorListResult ¶
type CreditorListResult struct { Creditors []Creditor `json:"creditors"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
CreditorListResult response including pagination metadata
type CreditorService ¶
type CreditorService struct {
// contains filtered or unexported fields
}
CreditorService manages creditors
func (*CreditorService) All ¶
func (s *CreditorService) All(ctx context.Context, p CreditorListParams, opts ...RequestOption) *CreditorListPagingIterator
func (*CreditorService) Create ¶
func (s *CreditorService) Create(ctx context.Context, p CreditorCreateParams, opts ...RequestOption) (*Creditor, error)
Create Creates a new creditor.
func (*CreditorService) Get ¶
func (s *CreditorService) Get(ctx context.Context, identity string, p CreditorGetParams, opts ...RequestOption) (*Creditor, error)
Get Retrieves the details of an existing creditor.
func (*CreditorService) List ¶
func (s *CreditorService) List(ctx context.Context, p CreditorListParams, opts ...RequestOption) (*CreditorListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your creditors.
func (*CreditorService) Update ¶
func (s *CreditorService) Update(ctx context.Context, identity string, p CreditorUpdateParams, opts ...RequestOption) (*Creditor, error)
Update Updates a creditor object. Supports all of the fields supported when creating a creditor.
type CreditorUpdateParams ¶
type CreditorUpdateParams struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Links struct { DefaultAudPayoutAccount string `url:"default_aud_payout_account,omitempty" json:"default_aud_payout_account,omitempty"` DefaultCadPayoutAccount string `url:"default_cad_payout_account,omitempty" json:"default_cad_payout_account,omitempty"` DefaultDkkPayoutAccount string `url:"default_dkk_payout_account,omitempty" json:"default_dkk_payout_account,omitempty"` DefaultEurPayoutAccount string `url:"default_eur_payout_account,omitempty" json:"default_eur_payout_account,omitempty"` DefaultGbpPayoutAccount string `url:"default_gbp_payout_account,omitempty" json:"default_gbp_payout_account,omitempty"` DefaultNzdPayoutAccount string `url:"default_nzd_payout_account,omitempty" json:"default_nzd_payout_account,omitempty"` DefaultSekPayoutAccount string `url:"default_sek_payout_account,omitempty" json:"default_sek_payout_account,omitempty"` DefaultUsdPayoutAccount string `url:"default_usd_payout_account,omitempty" json:"default_usd_payout_account,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` }
CreditorUpdateParams parameters
type CurrencyExchangeRate ¶
type CurrencyExchangeRate struct { Rate string `url:"rate,omitempty" json:"rate,omitempty"` Source string `url:"source,omitempty" json:"source,omitempty"` Target string `url:"target,omitempty" json:"target,omitempty"` Time string `url:"time,omitempty" json:"time,omitempty"` }
CurrencyExchangeRate model
type CurrencyExchangeRateListPagingIterator ¶
type CurrencyExchangeRateListPagingIterator struct {
// contains filtered or unexported fields
}
func (*CurrencyExchangeRateListPagingIterator) Next ¶
func (c *CurrencyExchangeRateListPagingIterator) Next() bool
func (*CurrencyExchangeRateListPagingIterator) Value ¶
func (c *CurrencyExchangeRateListPagingIterator) Value(ctx context.Context) (*CurrencyExchangeRateListResult, error)
type CurrencyExchangeRateListParams ¶
type CurrencyExchangeRateListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Source string `url:"source,omitempty" json:"source,omitempty"` Target string `url:"target,omitempty" json:"target,omitempty"` }
CurrencyExchangeRateListParams parameters
type CurrencyExchangeRateListResult ¶
type CurrencyExchangeRateListResult struct { CurrencyExchangeRates []CurrencyExchangeRate `json:"currency_exchange_rates"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
CurrencyExchangeRateListResult response including pagination metadata
type CurrencyExchangeRateService ¶
type CurrencyExchangeRateService struct {
// contains filtered or unexported fields
}
CurrencyExchangeRateService manages currency_exchange_rates
func (*CurrencyExchangeRateService) All ¶
func (s *CurrencyExchangeRateService) All(ctx context.Context, p CurrencyExchangeRateListParams, opts ...RequestOption) *CurrencyExchangeRateListPagingIterator
func (*CurrencyExchangeRateService) List ¶
func (s *CurrencyExchangeRateService) List(ctx context.Context, p CurrencyExchangeRateListParams, opts ...RequestOption) (*CurrencyExchangeRateListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all exchange rates.
type Customer ¶
type Customer struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` }
Customer model
type CustomerBankAccount ¶
type CustomerBankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumberEnding string `url:"account_number_ending,omitempty" json:"account_number_ending,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankName string `url:"bank_name,omitempty" json:"bank_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Customer string `url:"customer,omitempty" json:"customer,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` }
CustomerBankAccount model
type CustomerBankAccountCreateParams ¶
type CustomerBankAccountCreateParams struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Links struct { Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccountToken string `url:"customer_bank_account_token,omitempty" json:"customer_bank_account_token,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` }
CustomerBankAccountCreateParams parameters
type CustomerBankAccountListPagingIterator ¶
type CustomerBankAccountListPagingIterator struct {
// contains filtered or unexported fields
}
func (*CustomerBankAccountListPagingIterator) Next ¶
func (c *CustomerBankAccountListPagingIterator) Next() bool
func (*CustomerBankAccountListPagingIterator) Value ¶
func (c *CustomerBankAccountListPagingIterator) Value(ctx context.Context) (*CustomerBankAccountListResult, error)
type CustomerBankAccountListParams ¶
type CustomerBankAccountListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` Enabled bool `url:"enabled,omitempty" json:"enabled,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` }
CustomerBankAccountListParams parameters
type CustomerBankAccountListResult ¶
type CustomerBankAccountListResult struct { CustomerBankAccounts []CustomerBankAccount `json:"customer_bank_accounts"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
CustomerBankAccountListResult response including pagination metadata
type CustomerBankAccountService ¶
type CustomerBankAccountService struct {
// contains filtered or unexported fields
}
CustomerBankAccountService manages customer_bank_accounts
func (*CustomerBankAccountService) All ¶
func (s *CustomerBankAccountService) All(ctx context.Context, p CustomerBankAccountListParams, opts ...RequestOption) *CustomerBankAccountListPagingIterator
func (*CustomerBankAccountService) Create ¶
func (s *CustomerBankAccountService) Create(ctx context.Context, p CustomerBankAccountCreateParams, opts ...RequestOption) (*CustomerBankAccount, error)
Create Creates a new customer bank account object.
There are three different ways to supply bank account details:
- [Local details](#appendix-local-bank-details)
- IBAN
- [Customer Bank Account Tokens](#javascript-flow-create-a-customer-bank-account-token)
For more information on the different fields required in each country, see [local bank details](#appendix-local-bank-details).
func (*CustomerBankAccountService) Disable ¶
func (s *CustomerBankAccountService) Disable(ctx context.Context, identity string, opts ...RequestOption) (*CustomerBankAccount, error)
Disable Immediately cancels all associated mandates and cancellable payments.
This will return a `disable_failed` error if the bank account has already been disabled.
A disabled bank account can be re-enabled by creating a new bank account resource with the same details.
func (*CustomerBankAccountService) Get ¶
func (s *CustomerBankAccountService) Get(ctx context.Context, identity string, opts ...RequestOption) (*CustomerBankAccount, error)
Get Retrieves the details of an existing bank account.
func (*CustomerBankAccountService) List ¶
func (s *CustomerBankAccountService) List(ctx context.Context, p CustomerBankAccountListParams, opts ...RequestOption) (*CustomerBankAccountListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your bank accounts.
func (*CustomerBankAccountService) Update ¶
func (s *CustomerBankAccountService) Update(ctx context.Context, identity string, p CustomerBankAccountUpdateParams, opts ...RequestOption) (*CustomerBankAccount, error)
Update Updates a customer bank account object. Only the metadata parameter is allowed.
type CustomerBankAccountUpdateParams ¶
type CustomerBankAccountUpdateParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
CustomerBankAccountUpdateParams parameters
type CustomerCreateParams ¶
type CustomerCreateParams struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` }
CustomerCreateParams parameters
type CustomerListPagingIterator ¶
type CustomerListPagingIterator struct {
// contains filtered or unexported fields
}
func (*CustomerListPagingIterator) Next ¶
func (c *CustomerListPagingIterator) Next() bool
func (*CustomerListPagingIterator) Value ¶
func (c *CustomerListPagingIterator) Value(ctx context.Context) (*CustomerListResult, error)
type CustomerListParams ¶
type CustomerListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` SortDirection string `url:"sort_direction,omitempty" json:"sort_direction,omitempty"` SortField string `url:"sort_field,omitempty" json:"sort_field,omitempty"` }
CustomerListParams parameters
type CustomerListResult ¶
type CustomerListResult struct { Customers []Customer `json:"customers"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
CustomerListResult response including pagination metadata
type CustomerNotification ¶
type CustomerNotification struct { ActionTaken string `url:"action_taken,omitempty" json:"action_taken,omitempty"` ActionTakenAt string `url:"action_taken_at,omitempty" json:"action_taken_at,omitempty"` ActionTakenBy string `url:"action_taken_by,omitempty" json:"action_taken_by,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Customer string `url:"customer,omitempty" json:"customer,omitempty"` Event string `url:"event,omitempty" json:"event,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` Refund string `url:"refund,omitempty" json:"refund,omitempty"` Subscription string `url:"subscription,omitempty" json:"subscription,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Type string `url:"type,omitempty" json:"type,omitempty"` }
CustomerNotification model
type CustomerNotificationHandleParams ¶
type CustomerNotificationHandleParams map[string]interface{}
CustomerNotificationHandleParams parameters
type CustomerNotificationService ¶
type CustomerNotificationService struct {
// contains filtered or unexported fields
}
CustomerNotificationService manages customer_notifications
func (*CustomerNotificationService) Handle ¶
func (s *CustomerNotificationService) Handle(ctx context.Context, identity string, p CustomerNotificationHandleParams, opts ...RequestOption) (*CustomerNotification, error)
Handle "Handling" a notification means that you have sent the notification yourself (and don't want GoCardless to send it). If the notification has already been actioned, or the deadline to notify has passed, this endpoint will return an `already_actioned` error and you should not take further action. This endpoint takes no additional parameters.
type CustomerRemoveParams ¶
type CustomerRemoveParams map[string]interface{}
CustomerRemoveParams parameters
type CustomerService ¶
type CustomerService struct {
// contains filtered or unexported fields
}
CustomerService manages customers
func (*CustomerService) All ¶
func (s *CustomerService) All(ctx context.Context, p CustomerListParams, opts ...RequestOption) *CustomerListPagingIterator
func (*CustomerService) Create ¶
func (s *CustomerService) Create(ctx context.Context, p CustomerCreateParams, opts ...RequestOption) (*Customer, error)
Create Creates a new customer object.
func (*CustomerService) Get ¶
func (s *CustomerService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Customer, error)
Get Retrieves the details of an existing customer.
func (*CustomerService) List ¶
func (s *CustomerService) List(ctx context.Context, p CustomerListParams, opts ...RequestOption) (*CustomerListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your customers.
func (*CustomerService) Remove ¶
func (s *CustomerService) Remove(ctx context.Context, identity string, p CustomerRemoveParams, opts ...RequestOption) (*Customer, error)
Remove Removed customers will not appear in search results or lists of customers (in our API or exports), and it will not be possible to load an individually removed customer by ID.
<p class="restricted-notice"><strong>The action of removing a customer cannot be reversed, so please use with care.</strong></p>
func (*CustomerService) Update ¶
func (s *CustomerService) Update(ctx context.Context, identity string, p CustomerUpdateParams, opts ...RequestOption) (*Customer, error)
Update Updates a customer object. Supports all of the fields supported when creating a customer.
type CustomerUpdateParams ¶
type CustomerUpdateParams struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` }
CustomerUpdateParams parameters
type Event ¶
type Event struct { Action string `url:"action,omitempty" json:"action,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` CustomerNotifications []struct { Deadline string `url:"deadline,omitempty" json:"deadline,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Mandatory bool `url:"mandatory,omitempty" json:"mandatory,omitempty"` Type string `url:"type,omitempty" json:"type,omitempty"` } `url:"customer_notifications,omitempty" json:"customer_notifications,omitempty"` Details struct { BankAccountId string `url:"bank_account_id,omitempty" json:"bank_account_id,omitempty"` Cause string `url:"cause,omitempty" json:"cause,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` NotRetriedReason string `url:"not_retried_reason,omitempty" json:"not_retried_reason,omitempty"` Origin string `url:"origin,omitempty" json:"origin,omitempty"` Property string `url:"property,omitempty" json:"property,omitempty"` ReasonCode string `url:"reason_code,omitempty" json:"reason_code,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` WillAttemptRetry bool `url:"will_attempt_retry,omitempty" json:"will_attempt_retry,omitempty"` } `url:"details,omitempty" json:"details,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { BankAuthorisation string `url:"bank_authorisation,omitempty" json:"bank_authorisation,omitempty"` BillingRequest string `url:"billing_request,omitempty" json:"billing_request,omitempty"` BillingRequestFlow string `url:"billing_request_flow,omitempty" json:"billing_request_flow,omitempty"` Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` InstalmentSchedule string `url:"instalment_schedule,omitempty" json:"instalment_schedule,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` MandateRequestMandate string `url:"mandate_request_mandate,omitempty" json:"mandate_request_mandate,omitempty"` NewCustomerBankAccount string `url:"new_customer_bank_account,omitempty" json:"new_customer_bank_account,omitempty"` NewMandate string `url:"new_mandate,omitempty" json:"new_mandate,omitempty"` Organisation string `url:"organisation,omitempty" json:"organisation,omitempty"` ParentEvent string `url:"parent_event,omitempty" json:"parent_event,omitempty"` PayerAuthorisation string `url:"payer_authorisation,omitempty" json:"payer_authorisation,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` PaymentRequestPayment string `url:"payment_request_payment,omitempty" json:"payment_request_payment,omitempty"` Payout string `url:"payout,omitempty" json:"payout,omitempty"` PreviousCustomerBankAccount string `url:"previous_customer_bank_account,omitempty" json:"previous_customer_bank_account,omitempty"` Refund string `url:"refund,omitempty" json:"refund,omitempty"` Subscription string `url:"subscription,omitempty" json:"subscription,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` ResourceType string `url:"resource_type,omitempty" json:"resource_type,omitempty"` }
Event model
type EventHandler ¶
EventHandler is the interface that must be implemented to handle events from a webhook.
type EventHandlerFunc ¶
EventHandlerFunc can be used to convert a function into an EventHandler
func (EventHandlerFunc) HandleEvent ¶
func (h EventHandlerFunc) HandleEvent(e Event) error
HandleEvent will call the EventHandlerFunc function
type EventListPagingIterator ¶
type EventListPagingIterator struct {
// contains filtered or unexported fields
}
func (*EventListPagingIterator) Next ¶
func (c *EventListPagingIterator) Next() bool
func (*EventListPagingIterator) Value ¶
func (c *EventListPagingIterator) Value(ctx context.Context) (*EventListResult, error)
type EventListParams ¶
type EventListParams struct { Action string `url:"action,omitempty" json:"action,omitempty"` After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` BillingRequest string `url:"billing_request,omitempty" json:"billing_request,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Include string `url:"include,omitempty" json:"include,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` ParentEvent string `url:"parent_event,omitempty" json:"parent_event,omitempty"` PayerAuthorisation string `url:"payer_authorisation,omitempty" json:"payer_authorisation,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` Payout string `url:"payout,omitempty" json:"payout,omitempty"` Refund string `url:"refund,omitempty" json:"refund,omitempty"` ResourceType string `url:"resource_type,omitempty" json:"resource_type,omitempty"` Subscription string `url:"subscription,omitempty" json:"subscription,omitempty"` }
EventListParams parameters
type EventListResult ¶
type EventListResult struct { Events []Event `json:"events"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
EventListResult response including pagination metadata
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
EventService manages events
func (*EventService) All ¶
func (s *EventService) All(ctx context.Context, p EventListParams, opts ...RequestOption) *EventListPagingIterator
func (*EventService) Get ¶
func (s *EventService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Event, error)
Get Retrieves the details of a single event.
func (*EventService) List ¶
func (s *EventService) List(ctx context.Context, p EventListParams, opts ...RequestOption) (*EventListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your events.
type InstalmentSchedule ¶
type InstalmentSchedule struct { CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Customer string `url:"customer,omitempty" json:"customer,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payments []string `url:"payments,omitempty" json:"payments,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentErrors map[string]interface{} `url:"payment_errors,omitempty" json:"payment_errors,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` TotalAmount int `url:"total_amount,omitempty" json:"total_amount,omitempty"` }
InstalmentSchedule model
type InstalmentScheduleCancelParams ¶
type InstalmentScheduleCancelParams map[string]interface{}
InstalmentScheduleCancelParams parameters
type InstalmentScheduleCreateWithDatesParams ¶
type InstalmentScheduleCreateWithDatesParams struct { AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Instalments []struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` ChargeDate string `url:"charge_date,omitempty" json:"charge_date,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` } `url:"instalments,omitempty" json:"instalments,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentReference string `url:"payment_reference,omitempty" json:"payment_reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` TotalAmount int `url:"total_amount,omitempty" json:"total_amount,omitempty"` }
InstalmentScheduleCreateWithDatesParams parameters
type InstalmentScheduleCreateWithScheduleParams ¶
type InstalmentScheduleCreateWithScheduleParams struct { AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Instalments struct { Amounts []int `url:"amounts,omitempty" json:"amounts,omitempty"` Interval int `url:"interval,omitempty" json:"interval,omitempty"` IntervalUnit string `url:"interval_unit,omitempty" json:"interval_unit,omitempty"` StartDate string `url:"start_date,omitempty" json:"start_date,omitempty"` } `url:"instalments,omitempty" json:"instalments,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentReference string `url:"payment_reference,omitempty" json:"payment_reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` TotalAmount int `url:"total_amount,omitempty" json:"total_amount,omitempty"` }
InstalmentScheduleCreateWithScheduleParams parameters
type InstalmentScheduleListPagingIterator ¶
type InstalmentScheduleListPagingIterator struct {
// contains filtered or unexported fields
}
func (*InstalmentScheduleListPagingIterator) Next ¶
func (c *InstalmentScheduleListPagingIterator) Next() bool
func (*InstalmentScheduleListPagingIterator) Value ¶
func (c *InstalmentScheduleListPagingIterator) Value(ctx context.Context) (*InstalmentScheduleListResult, error)
type InstalmentScheduleListParams ¶
type InstalmentScheduleListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Status []string `url:"status,omitempty" json:"status,omitempty"` }
InstalmentScheduleListParams parameters
type InstalmentScheduleListResult ¶
type InstalmentScheduleListResult struct { InstalmentSchedules []InstalmentSchedule `json:"instalment_schedules"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
InstalmentScheduleListResult response including pagination metadata
type InstalmentScheduleService ¶
type InstalmentScheduleService struct {
// contains filtered or unexported fields
}
InstalmentScheduleService manages instalment_schedules
func (*InstalmentScheduleService) All ¶
func (s *InstalmentScheduleService) All(ctx context.Context, p InstalmentScheduleListParams, opts ...RequestOption) *InstalmentScheduleListPagingIterator
func (*InstalmentScheduleService) Cancel ¶
func (s *InstalmentScheduleService) Cancel(ctx context.Context, identity string, p InstalmentScheduleCancelParams, opts ...RequestOption) (*InstalmentSchedule, error)
Cancel Immediately cancels an instalment schedule; no further payments will be collected for it.
This will fail with a `cancellation_failed` error if the instalment schedule is already cancelled or has completed.
func (*InstalmentScheduleService) CreateWithDates ¶
func (s *InstalmentScheduleService) CreateWithDates(ctx context.Context, p InstalmentScheduleCreateWithDatesParams, opts ...RequestOption) (*InstalmentSchedule, error)
CreateWithDates Creates a new instalment schedule object, along with the associated payments. This API is recommended if you know the specific dates you wish to charge. Otherwise, please check out the [scheduling version](#instalment-schedules-create-with-schedule).
The `instalments` property is an array of payment properties (`amount` and `charge_date`).
It can take quite a while to create the associated payments, so the API will return the status as `pending` initially. When processing has completed, a subsequent GET request for the instalment schedule will either have the status `success` and link to the created payments, or the status `error` and detailed information about the failures.
func (*InstalmentScheduleService) CreateWithSchedule ¶
func (s *InstalmentScheduleService) CreateWithSchedule(ctx context.Context, p InstalmentScheduleCreateWithScheduleParams, opts ...RequestOption) (*InstalmentSchedule, error)
CreateWithSchedule Creates a new instalment schedule object, along with the associated payments. This API is recommended if you wish to use the GoCardless scheduling logic. For finer control over the individual dates, please check out the [alternative version](#instalment-schedules-create-with-dates).
It can take quite a while to create the associated payments, so the API will return the status as `pending` initially. When processing has completed, a subsequent GET request for the instalment schedule will either have the status `success` and link to the created payments, or the status `error` and detailed information about the failures.
func (*InstalmentScheduleService) Get ¶
func (s *InstalmentScheduleService) Get(ctx context.Context, identity string, opts ...RequestOption) (*InstalmentSchedule, error)
Get Retrieves the details of an existing instalment schedule.
func (*InstalmentScheduleService) List ¶
func (s *InstalmentScheduleService) List(ctx context.Context, p InstalmentScheduleListParams, opts ...RequestOption) (*InstalmentScheduleListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your instalment schedules.
func (*InstalmentScheduleService) Update ¶
func (s *InstalmentScheduleService) Update(ctx context.Context, identity string, p InstalmentScheduleUpdateParams, opts ...RequestOption) (*InstalmentSchedule, error)
Update Updates an instalment schedule. This accepts only the metadata parameter.
type InstalmentScheduleUpdateParams ¶
type InstalmentScheduleUpdateParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
InstalmentScheduleUpdateParams parameters
type Institution ¶
type Institution struct { CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` IconUrl string `url:"icon_url,omitempty" json:"icon_url,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` LogoUrl string `url:"logo_url,omitempty" json:"logo_url,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` }
Institution model
type InstitutionListParams ¶
type InstitutionListParams struct {
CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"`
}
InstitutionListParams parameters
type InstitutionListResult ¶
type InstitutionListResult struct { Institutions []Institution `json:"institutions"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
InstitutionListResult response including pagination metadata
type InstitutionService ¶
type InstitutionService struct {
// contains filtered or unexported fields
}
InstitutionService manages institutions
func (*InstitutionService) List ¶
func (s *InstitutionService) List(ctx context.Context, p InstitutionListParams, opts ...RequestOption) (*InstitutionListResult, error)
List Returns a list of all supported institutions.
type Mandate ¶
type Mandate struct { CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` NewMandate string `url:"new_mandate,omitempty" json:"new_mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` NextPossibleChargeDate string `url:"next_possible_charge_date,omitempty" json:"next_possible_charge_date,omitempty"` PaymentsRequireApproval bool `url:"payments_require_approval,omitempty" json:"payments_require_approval,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
Mandate model
type MandateCancelParams ¶
type MandateCancelParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
MandateCancelParams parameters
type MandateCreateParams ¶
type MandateCreateParams struct { Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PayerIpAddress string `url:"payer_ip_address,omitempty" json:"payer_ip_address,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` }
MandateCreateParams parameters
type MandateImport ¶
type MandateImport struct { CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
MandateImport model
type MandateImportCancelParams ¶
type MandateImportCancelParams map[string]interface{}
MandateImportCancelParams parameters
type MandateImportCreateParams ¶
type MandateImportCreateParams struct {
Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"`
}
MandateImportCreateParams parameters
type MandateImportEntry ¶
type MandateImportEntry struct { CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Links struct { Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` MandateImport string `url:"mandate_import,omitempty" json:"mandate_import,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` RecordIdentifier string `url:"record_identifier,omitempty" json:"record_identifier,omitempty"` }
MandateImportEntry model
type MandateImportEntryCreateParams ¶
type MandateImportEntryCreateParams struct { Amendment struct { OriginalCreditorId string `url:"original_creditor_id,omitempty" json:"original_creditor_id,omitempty"` OriginalCreditorName string `url:"original_creditor_name,omitempty" json:"original_creditor_name,omitempty"` OriginalMandateReference string `url:"original_mandate_reference,omitempty" json:"original_mandate_reference,omitempty"` } `url:"amendment,omitempty" json:"amendment,omitempty"` BankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` } `url:"bank_account,omitempty" json:"bank_account,omitempty"` Customer struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"customer,omitempty" json:"customer,omitempty"` Links struct { MandateImport string `url:"mandate_import,omitempty" json:"mandate_import,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` RecordIdentifier string `url:"record_identifier,omitempty" json:"record_identifier,omitempty"` }
MandateImportEntryCreateParams parameters
type MandateImportEntryListPagingIterator ¶
type MandateImportEntryListPagingIterator struct {
// contains filtered or unexported fields
}
func (*MandateImportEntryListPagingIterator) Next ¶
func (c *MandateImportEntryListPagingIterator) Next() bool
func (*MandateImportEntryListPagingIterator) Value ¶
func (c *MandateImportEntryListPagingIterator) Value(ctx context.Context) (*MandateImportEntryListResult, error)
type MandateImportEntryListParams ¶
type MandateImportEntryListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` MandateImport string `url:"mandate_import,omitempty" json:"mandate_import,omitempty"` }
MandateImportEntryListParams parameters
type MandateImportEntryListResult ¶
type MandateImportEntryListResult struct { MandateImportEntries []MandateImportEntry `json:"mandate_import_entries"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
MandateImportEntryListResult response including pagination metadata
type MandateImportEntryService ¶
type MandateImportEntryService struct {
// contains filtered or unexported fields
}
MandateImportEntryService manages mandate_import_entries
func (*MandateImportEntryService) All ¶
func (s *MandateImportEntryService) All(ctx context.Context, p MandateImportEntryListParams, opts ...RequestOption) *MandateImportEntryListPagingIterator
func (*MandateImportEntryService) Create ¶
func (s *MandateImportEntryService) Create(ctx context.Context, p MandateImportEntryCreateParams, opts ...RequestOption) (*MandateImportEntry, error)
Create For an existing [mandate import](#core-endpoints-mandate-imports), this endpoint can be used to add individual mandates to be imported into GoCardless.
You can add no more than 30,000 rows to a single mandate import. If you attempt to go over this limit, the API will return a `record_limit_exceeded` error.
func (*MandateImportEntryService) List ¶
func (s *MandateImportEntryService) List(ctx context.Context, p MandateImportEntryListParams, opts ...RequestOption) (*MandateImportEntryListResult, error)
List For an existing mandate import, this endpoint lists all of the entries attached.
After a mandate import has been submitted, you can use this endpoint to associate records in your system (using the `record_identifier` that you provided when creating the mandate import).
type MandateImportGetParams ¶
type MandateImportGetParams map[string]interface{}
MandateImportGetParams parameters
type MandateImportService ¶
type MandateImportService struct {
// contains filtered or unexported fields
}
MandateImportService manages mandate_imports
func (*MandateImportService) Cancel ¶
func (s *MandateImportService) Cancel(ctx context.Context, identity string, p MandateImportCancelParams, opts ...RequestOption) (*MandateImport, error)
Cancel Cancels the mandate import, which aborts the import process and stops the mandates being set up in GoCardless. Once the import has been cancelled, it can no longer have entries added to it. Mandate imports which have already been submitted or processed cannot be cancelled.
func (*MandateImportService) Create ¶
func (s *MandateImportService) Create(ctx context.Context, p MandateImportCreateParams, opts ...RequestOption) (*MandateImport, error)
Create Mandate imports are first created, before mandates are added one-at-a-time, so this endpoint merely signals the start of the import process. Once you've finished adding entries to an import, you should [submit](#mandate-imports-submit-a-mandate-import) it.
func (*MandateImportService) Get ¶
func (s *MandateImportService) Get(ctx context.Context, identity string, p MandateImportGetParams, opts ...RequestOption) (*MandateImport, error)
Get Returns a single mandate import.
func (*MandateImportService) Submit ¶
func (s *MandateImportService) Submit(ctx context.Context, identity string, p MandateImportSubmitParams, opts ...RequestOption) (*MandateImport, error)
Submit Submits the mandate import, which allows it to be processed by a member of the GoCardless team. Once the import has been submitted, it can no longer have entries added to it.
In our sandbox environment, to aid development, we automatically process mandate imports approximately 10 seconds after they are submitted. This will allow you to test both the "submitted" response and wait for the webhook to confirm the processing has begun.
type MandateImportSubmitParams ¶
type MandateImportSubmitParams map[string]interface{}
MandateImportSubmitParams parameters
type MandateListPagingIterator ¶
type MandateListPagingIterator struct {
// contains filtered or unexported fields
}
func (*MandateListPagingIterator) Next ¶
func (c *MandateListPagingIterator) Next() bool
func (*MandateListPagingIterator) Value ¶
func (c *MandateListPagingIterator) Value(ctx context.Context) (*MandateListResult, error)
type MandateListParams ¶
type MandateListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Scheme []string `url:"scheme,omitempty" json:"scheme,omitempty"` Status []string `url:"status,omitempty" json:"status,omitempty"` }
MandateListParams parameters
type MandateListResult ¶
type MandateListResult struct { Mandates []Mandate `json:"mandates"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
MandateListResult response including pagination metadata
type MandatePdf ¶
type MandatePdf struct { ExpiresAt string `url:"expires_at,omitempty" json:"expires_at,omitempty"` Url string `url:"url,omitempty" json:"url,omitempty"` }
MandatePdf model
type MandatePdfCreateParams ¶
type MandatePdfCreateParams struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` Bic string `url:"bic,omitempty" json:"bic,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` MandateReference string `url:"mandate_reference,omitempty" json:"mandate_reference,omitempty"` PayerIpAddress string `url:"payer_ip_address,omitempty" json:"payer_ip_address,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` SignatureDate string `url:"signature_date,omitempty" json:"signature_date,omitempty"` SubscriptionAmount int `url:"subscription_amount,omitempty" json:"subscription_amount,omitempty"` SubscriptionFrequency string `url:"subscription_frequency,omitempty" json:"subscription_frequency,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` }
MandatePdfCreateParams parameters
type MandatePdfService ¶
type MandatePdfService struct {
// contains filtered or unexported fields
}
MandatePdfService manages mandate_pdfs
func (*MandatePdfService) Create ¶
func (s *MandatePdfService) Create(ctx context.Context, p MandatePdfCreateParams, opts ...RequestOption) (*MandatePdf, error)
Create Generates a PDF mandate and returns its temporary URL.
Customer and bank account details can be left blank (for a blank mandate), provided manually, or inferred from the ID of an existing [mandate](#core-endpoints-mandates).
By default, we'll generate PDF mandates in English.
To generate a PDF mandate in another language, set the `Accept-Language` header when creating the PDF mandate to the relevant [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code supported for the scheme.
| Scheme | Supported languages
|
| :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------- | | ACH | English (`en`)
|
| Autogiro | English (`en`), Swedish (`sv`)
|
| Bacs | English (`en`)
|
| BECS | English (`en`)
|
| BECS NZ | English (`en`)
|
| Betalingsservice | Danish (`da`), English (`en`)
|
| PAD | English (`en`)
|
| SEPA Core | Danish (`da`), Dutch (`nl`), English (`en`), French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`), Spanish (`es`), Swedish (`sv`) |
type MandateReinstateParams ¶
type MandateReinstateParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
MandateReinstateParams parameters
type MandateService ¶
type MandateService struct {
// contains filtered or unexported fields
}
MandateService manages mandates
func (*MandateService) All ¶
func (s *MandateService) All(ctx context.Context, p MandateListParams, opts ...RequestOption) *MandateListPagingIterator
func (*MandateService) Cancel ¶
func (s *MandateService) Cancel(ctx context.Context, identity string, p MandateCancelParams, opts ...RequestOption) (*Mandate, error)
Cancel Immediately cancels a mandate and all associated cancellable payments. Any metadata supplied to this endpoint will be stored on the mandate cancellation event it causes.
This will fail with a `cancellation_failed` error if the mandate is already cancelled.
func (*MandateService) Create ¶
func (s *MandateService) Create(ctx context.Context, p MandateCreateParams, opts ...RequestOption) (*Mandate, error)
Create Creates a new mandate object.
func (*MandateService) Get ¶
func (s *MandateService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Mandate, error)
Get Retrieves the details of an existing mandate.
func (*MandateService) List ¶
func (s *MandateService) List(ctx context.Context, p MandateListParams, opts ...RequestOption) (*MandateListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your mandates.
func (*MandateService) Reinstate ¶
func (s *MandateService) Reinstate(ctx context.Context, identity string, p MandateReinstateParams, opts ...RequestOption) (*Mandate, error)
Reinstate <a name="mandate_not_inactive"></a>Reinstates a cancelled or expired mandate to the banks. You will receive a `resubmission_requested` webhook, but after that reinstating the mandate follows the same process as its initial creation, so you will receive a `submitted` webhook, followed by a `reinstated` or `failed` webhook up to two working days later. Any metadata supplied to this endpoint will be stored on the `resubmission_requested` event it causes.
This will fail with a `mandate_not_inactive` error if the mandate is already being submitted, or is active.
Mandates can be resubmitted up to 10 times.
func (*MandateService) Update ¶
func (s *MandateService) Update(ctx context.Context, identity string, p MandateUpdateParams, opts ...RequestOption) (*Mandate, error)
Update Updates a mandate object. This accepts only the metadata parameter.
type MandateUpdateParams ¶
type MandateUpdateParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
MandateUpdateParams parameters
type Option ¶
type Option func(*options) error
Option used to initialise the client
func WithEndpoint ¶
WithEndpoint configures the endpoint hosting the API
type PagingIterator ¶
type PayerAuthorisation ¶
type PayerAuthorisation struct { BankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountNumberEnding string `url:"account_number_ending,omitempty" json:"account_number_ending,omitempty"` AccountNumberSuffix string `url:"account_number_suffix,omitempty" json:"account_number_suffix,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` } `url:"bank_account,omitempty" json:"bank_account,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Customer struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Locale string `url:"locale,omitempty" json:"locale,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"customer,omitempty" json:"customer,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` IncompleteFields []struct { Field string `url:"field,omitempty" json:"field,omitempty"` Message string `url:"message,omitempty" json:"message,omitempty"` RequestPointer string `url:"request_pointer,omitempty" json:"request_pointer,omitempty"` } `url:"incomplete_fields,omitempty" json:"incomplete_fields,omitempty"` Links struct { BankAccount string `url:"bank_account,omitempty" json:"bank_account,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Mandate struct { Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PayerIpAddress string `url:"payer_ip_address,omitempty" json:"payer_ip_address,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"mandate,omitempty" json:"mandate,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
PayerAuthorisation model
type PayerAuthorisationCreateParams ¶
type PayerAuthorisationCreateParams struct { BankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountNumberEnding string `url:"account_number_ending,omitempty" json:"account_number_ending,omitempty"` AccountNumberSuffix string `url:"account_number_suffix,omitempty" json:"account_number_suffix,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` } `url:"bank_account,omitempty" json:"bank_account,omitempty"` Customer struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Locale string `url:"locale,omitempty" json:"locale,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"customer,omitempty" json:"customer,omitempty"` Mandate struct { Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PayerIpAddress string `url:"payer_ip_address,omitempty" json:"payer_ip_address,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"mandate,omitempty" json:"mandate,omitempty"` }
PayerAuthorisationCreateParams parameters
type PayerAuthorisationService ¶
type PayerAuthorisationService struct {
// contains filtered or unexported fields
}
PayerAuthorisationService manages payer_authorisations
func (*PayerAuthorisationService) Confirm ¶
func (s *PayerAuthorisationService) Confirm(ctx context.Context, identity string, opts ...RequestOption) (*PayerAuthorisation, error)
Confirm Confirms the Payer Authorisation, indicating that the resources are ready to be created. A Payer Authorisation cannot be confirmed if it hasn't been submitted yet.
<p class="notice">
The main use of the confirm endpoint is to enable integrators to
acknowledge the end of the setup process.
They might want to make the payers go through some other steps after they
go through our flow or make them go through the necessary verification mechanism (upcoming feature). </p>
func (*PayerAuthorisationService) Create ¶
func (s *PayerAuthorisationService) Create(ctx context.Context, p PayerAuthorisationCreateParams, opts ...RequestOption) (*PayerAuthorisation, error)
Create Creates a Payer Authorisation. The resource is saved to the database even if incomplete. An empty array of incomplete_fields means that the resource is valid. The ID of the resource is used for the other actions. This endpoint has been designed this way so you do not need to save any payer data on your servers or the browser while still being able to implement a progressive solution, such as a multi-step form.
func (*PayerAuthorisationService) Get ¶
func (s *PayerAuthorisationService) Get(ctx context.Context, identity string, opts ...RequestOption) (*PayerAuthorisation, error)
Get Retrieves the details of a single existing Payer Authorisation. It can be used for polling the status of a Payer Authorisation.
func (*PayerAuthorisationService) Submit ¶
func (s *PayerAuthorisationService) Submit(ctx context.Context, identity string, opts ...RequestOption) (*PayerAuthorisation, error)
Submit Submits all the data previously pushed to this PayerAuthorisation for verification. This time, a 200 HTTP status is returned if the resource is valid and a 422 error response in case of validation errors. After it is successfully submitted, the Payer Authorisation can no longer be edited.
func (*PayerAuthorisationService) Update ¶
func (s *PayerAuthorisationService) Update(ctx context.Context, identity string, p PayerAuthorisationUpdateParams, opts ...RequestOption) (*PayerAuthorisation, error)
Update Updates a Payer Authorisation. Updates the Payer Authorisation with the request data. Can be invoked as many times as needed. Only fields present in the request will be modified. An empty array of incomplete_fields means that the resource is valid. This endpoint has been designed this way so you do not need to save any payer data on your servers or the browser while still being able to implement a progressive solution, such a multi-step form. <p class="notice"> Note that in order to update the `metadata` attribute values it must be sent completely as it overrides the previously existing values. </p>
type PayerAuthorisationUpdateParams ¶
type PayerAuthorisationUpdateParams struct { BankAccount struct { AccountHolderName string `url:"account_holder_name,omitempty" json:"account_holder_name,omitempty"` AccountNumber string `url:"account_number,omitempty" json:"account_number,omitempty"` AccountNumberEnding string `url:"account_number_ending,omitempty" json:"account_number_ending,omitempty"` AccountNumberSuffix string `url:"account_number_suffix,omitempty" json:"account_number_suffix,omitempty"` AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` BankCode string `url:"bank_code,omitempty" json:"bank_code,omitempty"` BranchCode string `url:"branch_code,omitempty" json:"branch_code,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Iban string `url:"iban,omitempty" json:"iban,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` } `url:"bank_account,omitempty" json:"bank_account,omitempty"` Customer struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Locale string `url:"locale,omitempty" json:"locale,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"customer,omitempty" json:"customer,omitempty"` Mandate struct { Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PayerIpAddress string `url:"payer_ip_address,omitempty" json:"payer_ip_address,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` } `url:"mandate,omitempty" json:"mandate,omitempty"` }
PayerAuthorisationUpdateParams parameters
type Payment ¶
type Payment struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AmountRefunded int `url:"amount_refunded,omitempty" json:"amount_refunded,omitempty"` ChargeDate string `url:"charge_date,omitempty" json:"charge_date,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` Fx struct { EstimatedExchangeRate string `url:"estimated_exchange_rate,omitempty" json:"estimated_exchange_rate,omitempty"` ExchangeRate string `url:"exchange_rate,omitempty" json:"exchange_rate,omitempty"` FxAmount int `url:"fx_amount,omitempty" json:"fx_amount,omitempty"` FxCurrency string `url:"fx_currency,omitempty" json:"fx_currency,omitempty"` } `url:"fx,omitempty" json:"fx,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` InstalmentSchedule string `url:"instalment_schedule,omitempty" json:"instalment_schedule,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payout string `url:"payout,omitempty" json:"payout,omitempty"` Subscription string `url:"subscription,omitempty" json:"subscription,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
Payment model
type PaymentCancelParams ¶
type PaymentCancelParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
PaymentCancelParams parameters
type PaymentCreateParams ¶
type PaymentCreateParams struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` ChargeDate string `url:"charge_date,omitempty" json:"charge_date,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` }
PaymentCreateParams parameters
type PaymentListPagingIterator ¶
type PaymentListPagingIterator struct {
// contains filtered or unexported fields
}
func (*PaymentListPagingIterator) Next ¶
func (c *PaymentListPagingIterator) Next() bool
func (*PaymentListPagingIterator) Value ¶
func (c *PaymentListPagingIterator) Value(ctx context.Context) (*PaymentListResult, error)
type PaymentListParams ¶
type PaymentListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` ChargeDate struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"charge_date,omitempty" json:"charge_date,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` SortDirection string `url:"sort_direction,omitempty" json:"sort_direction,omitempty"` SortField string `url:"sort_field,omitempty" json:"sort_field,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` Subscription string `url:"subscription,omitempty" json:"subscription,omitempty"` }
PaymentListParams parameters
type PaymentListResult ¶
type PaymentListResult struct { Payments []Payment `json:"payments"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
PaymentListResult response including pagination metadata
type PaymentRetryParams ¶
type PaymentRetryParams struct { ChargeDate string `url:"charge_date,omitempty" json:"charge_date,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` }
PaymentRetryParams parameters
type PaymentService ¶
type PaymentService struct {
// contains filtered or unexported fields
}
PaymentService manages payments
func (*PaymentService) All ¶
func (s *PaymentService) All(ctx context.Context, p PaymentListParams, opts ...RequestOption) *PaymentListPagingIterator
func (*PaymentService) Cancel ¶
func (s *PaymentService) Cancel(ctx context.Context, identity string, p PaymentCancelParams, opts ...RequestOption) (*Payment, error)
Cancel Cancels the payment if it has not already been submitted to the banks. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.
This will fail with a `cancellation_failed` error unless the payment's status is `pending_submission`.
func (*PaymentService) Create ¶
func (s *PaymentService) Create(ctx context.Context, p PaymentCreateParams, opts ...RequestOption) (*Payment, error)
Create <a name="mandate_is_inactive"></a>Creates a new payment object.
This fails with a `mandate_is_inactive` error if the linked [mandate](#core-endpoints-mandates) is cancelled or has failed. Payments can be created against mandates with status of: `pending_customer_approval`, `pending_submission`, `submitted`, and `active`.
func (*PaymentService) Get ¶
func (s *PaymentService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Payment, error)
Get Retrieves the details of a single existing payment.
func (*PaymentService) List ¶
func (s *PaymentService) List(ctx context.Context, p PaymentListParams, opts ...RequestOption) (*PaymentListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payments.
func (*PaymentService) Retry ¶
func (s *PaymentService) Retry(ctx context.Context, identity string, p PaymentRetryParams, opts ...RequestOption) (*Payment, error)
Retry <a name="retry_failed"></a>Retries a failed payment if the underlying mandate is active. You will receive a `resubmission_requested` webhook, but after that retrying the payment follows the same process as its initial creation, so you will receive a `submitted` webhook, followed by a `confirmed` or `failed` event. Any metadata supplied to this endpoint will be stored against the payment submission event it causes.
This will return a `retry_failed` error if the payment has not failed.
Payments can be retried up to 3 times.
func (*PaymentService) Update ¶
func (s *PaymentService) Update(ctx context.Context, identity string, p PaymentUpdateParams, opts ...RequestOption) (*Payment, error)
Update Updates a payment object. This accepts only the metadata parameter.
type PaymentUpdateParams ¶
type PaymentUpdateParams struct { Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` }
PaymentUpdateParams parameters
type Payout ¶
type Payout struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` ArrivalDate string `url:"arrival_date,omitempty" json:"arrival_date,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` DeductedFees int `url:"deducted_fees,omitempty" json:"deducted_fees,omitempty"` Fx struct { EstimatedExchangeRate string `url:"estimated_exchange_rate,omitempty" json:"estimated_exchange_rate,omitempty"` ExchangeRate string `url:"exchange_rate,omitempty" json:"exchange_rate,omitempty"` FxAmount int `url:"fx_amount,omitempty" json:"fx_amount,omitempty"` FxCurrency string `url:"fx_currency,omitempty" json:"fx_currency,omitempty"` } `url:"fx,omitempty" json:"fx,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` CreditorBankAccount string `url:"creditor_bank_account,omitempty" json:"creditor_bank_account,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PayoutType string `url:"payout_type,omitempty" json:"payout_type,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` TaxCurrency string `url:"tax_currency,omitempty" json:"tax_currency,omitempty"` }
Payout model
type PayoutItem ¶
type PayoutItem struct { Amount string `url:"amount,omitempty" json:"amount,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` Refund string `url:"refund,omitempty" json:"refund,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Taxes []struct { Amount string `url:"amount,omitempty" json:"amount,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` DestinationAmount string `url:"destination_amount,omitempty" json:"destination_amount,omitempty"` DestinationCurrency string `url:"destination_currency,omitempty" json:"destination_currency,omitempty"` ExchangeRate string `url:"exchange_rate,omitempty" json:"exchange_rate,omitempty"` TaxRateId string `url:"tax_rate_id,omitempty" json:"tax_rate_id,omitempty"` } `url:"taxes,omitempty" json:"taxes,omitempty"` Type string `url:"type,omitempty" json:"type,omitempty"` }
PayoutItem model
type PayoutItemListPagingIterator ¶
type PayoutItemListPagingIterator struct {
// contains filtered or unexported fields
}
func (*PayoutItemListPagingIterator) Next ¶
func (c *PayoutItemListPagingIterator) Next() bool
func (*PayoutItemListPagingIterator) Value ¶
func (c *PayoutItemListPagingIterator) Value(ctx context.Context) (*PayoutItemListResult, error)
type PayoutItemListParams ¶
type PayoutItemListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` Include2020TaxCutover string `url:"include_2020_tax_cutover,omitempty" json:"include_2020_tax_cutover,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Payout string `url:"payout,omitempty" json:"payout,omitempty"` }
PayoutItemListParams parameters
type PayoutItemListResult ¶
type PayoutItemListResult struct { PayoutItems []PayoutItem `json:"payout_items"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
PayoutItemListResult response including pagination metadata
type PayoutItemService ¶
type PayoutItemService struct {
// contains filtered or unexported fields
}
PayoutItemService manages payout_items
func (*PayoutItemService) All ¶
func (s *PayoutItemService) All(ctx context.Context, p PayoutItemListParams, opts ...RequestOption) *PayoutItemListPagingIterator
func (*PayoutItemService) List ¶
func (s *PayoutItemService) List(ctx context.Context, p PayoutItemListParams, opts ...RequestOption) (*PayoutItemListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of items in the payout.
type PayoutListPagingIterator ¶
type PayoutListPagingIterator struct {
// contains filtered or unexported fields
}
func (*PayoutListPagingIterator) Next ¶
func (c *PayoutListPagingIterator) Next() bool
func (*PayoutListPagingIterator) Value ¶
func (c *PayoutListPagingIterator) Value(ctx context.Context) (*PayoutListResult, error)
type PayoutListParams ¶
type PayoutListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` CreditorBankAccount string `url:"creditor_bank_account,omitempty" json:"creditor_bank_account,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PayoutType string `url:"payout_type,omitempty" json:"payout_type,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
PayoutListParams parameters
type PayoutListResult ¶
type PayoutListResult struct { Payouts []Payout `json:"payouts"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
PayoutListResult response including pagination metadata
type PayoutService ¶
type PayoutService struct {
// contains filtered or unexported fields
}
PayoutService manages payouts
func (*PayoutService) All ¶
func (s *PayoutService) All(ctx context.Context, p PayoutListParams, opts ...RequestOption) *PayoutListPagingIterator
func (*PayoutService) Get ¶
func (s *PayoutService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Payout, error)
Get Retrieves the details of a single payout. For an example of how to reconcile the transactions in a payout, see [this guide](#events-reconciling-payouts-with-events).
func (*PayoutService) List ¶
func (s *PayoutService) List(ctx context.Context, p PayoutListParams, opts ...RequestOption) (*PayoutListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your payouts.
func (*PayoutService) Update ¶
func (s *PayoutService) Update(ctx context.Context, identity string, p PayoutUpdateParams, opts ...RequestOption) (*Payout, error)
Update Updates a payout object. This accepts only the metadata parameter.
type PayoutUpdateParams ¶
type PayoutUpdateParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
PayoutUpdateParams parameters
type RedirectFlow ¶
type RedirectFlow struct { ConfirmationUrl string `url:"confirmation_url,omitempty" json:"confirmation_url,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` CustomerBankAccount string `url:"customer_bank_account,omitempty" json:"customer_bank_account,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` MandateReference string `url:"mandate_reference,omitempty" json:"mandate_reference,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` RedirectUrl string `url:"redirect_url,omitempty" json:"redirect_url,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` SessionToken string `url:"session_token,omitempty" json:"session_token,omitempty"` SuccessRedirectUrl string `url:"success_redirect_url,omitempty" json:"success_redirect_url,omitempty"` }
RedirectFlow model
type RedirectFlowCompleteParams ¶
type RedirectFlowCompleteParams struct {
SessionToken string `url:"session_token,omitempty" json:"session_token,omitempty"`
}
RedirectFlowCompleteParams parameters
type RedirectFlowCreateParams ¶
type RedirectFlowCreateParams struct { Description string `url:"description,omitempty" json:"description,omitempty"` Links struct { Creditor string `url:"creditor,omitempty" json:"creditor,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PrefilledBankAccount struct { AccountType string `url:"account_type,omitempty" json:"account_type,omitempty"` } `url:"prefilled_bank_account,omitempty" json:"prefilled_bank_account,omitempty"` PrefilledCustomer struct { AddressLine1 string `url:"address_line1,omitempty" json:"address_line1,omitempty"` AddressLine2 string `url:"address_line2,omitempty" json:"address_line2,omitempty"` AddressLine3 string `url:"address_line3,omitempty" json:"address_line3,omitempty"` City string `url:"city,omitempty" json:"city,omitempty"` CompanyName string `url:"company_name,omitempty" json:"company_name,omitempty"` CountryCode string `url:"country_code,omitempty" json:"country_code,omitempty"` DanishIdentityNumber string `url:"danish_identity_number,omitempty" json:"danish_identity_number,omitempty"` Email string `url:"email,omitempty" json:"email,omitempty"` FamilyName string `url:"family_name,omitempty" json:"family_name,omitempty"` GivenName string `url:"given_name,omitempty" json:"given_name,omitempty"` Language string `url:"language,omitempty" json:"language,omitempty"` PhoneNumber string `url:"phone_number,omitempty" json:"phone_number,omitempty"` PostalCode string `url:"postal_code,omitempty" json:"postal_code,omitempty"` Region string `url:"region,omitempty" json:"region,omitempty"` SwedishIdentityNumber string `url:"swedish_identity_number,omitempty" json:"swedish_identity_number,omitempty"` } `url:"prefilled_customer,omitempty" json:"prefilled_customer,omitempty"` Scheme string `url:"scheme,omitempty" json:"scheme,omitempty"` SessionToken string `url:"session_token,omitempty" json:"session_token,omitempty"` SuccessRedirectUrl string `url:"success_redirect_url,omitempty" json:"success_redirect_url,omitempty"` }
RedirectFlowCreateParams parameters
type RedirectFlowService ¶
type RedirectFlowService struct {
// contains filtered or unexported fields
}
RedirectFlowService manages redirect_flows
func (*RedirectFlowService) Complete ¶
func (s *RedirectFlowService) Complete(ctx context.Context, identity string, p RedirectFlowCompleteParams, opts ...RequestOption) (*RedirectFlow, error)
Complete This creates a [customer](#core-endpoints-customers), [customer bank account](#core-endpoints-customer-bank-accounts), and [mandate](#core-endpoints-mandates) using the details supplied by your customer and returns the ID of the created mandate.
This will return a `redirect_flow_incomplete` error if your customer has not yet been redirected back to your site, and a `redirect_flow_already_completed` error if your integration has already completed this flow. It will return a `bad_request` error if the `session_token` differs to the one supplied when the redirect flow was created.
func (*RedirectFlowService) Create ¶
func (s *RedirectFlowService) Create(ctx context.Context, p RedirectFlowCreateParams, opts ...RequestOption) (*RedirectFlow, error)
Create Creates a redirect flow object which can then be used to redirect your customer to the GoCardless hosted payment pages.
func (*RedirectFlowService) Get ¶
func (s *RedirectFlowService) Get(ctx context.Context, identity string, opts ...RequestOption) (*RedirectFlow, error)
Get Returns all details about a single redirect flow
type Refund ¶
type Refund struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` Fx struct { EstimatedExchangeRate string `url:"estimated_exchange_rate,omitempty" json:"estimated_exchange_rate,omitempty"` ExchangeRate string `url:"exchange_rate,omitempty" json:"exchange_rate,omitempty"` FxAmount int `url:"fx_amount,omitempty" json:"fx_amount,omitempty"` FxCurrency string `url:"fx_currency,omitempty" json:"fx_currency,omitempty"` } `url:"fx,omitempty" json:"fx,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` }
Refund model
type RefundCreateParams ¶
type RefundCreateParams struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Reference string `url:"reference,omitempty" json:"reference,omitempty"` TotalAmountConfirmation int `url:"total_amount_confirmation,omitempty" json:"total_amount_confirmation,omitempty"` }
RefundCreateParams parameters
type RefundListPagingIterator ¶
type RefundListPagingIterator struct {
// contains filtered or unexported fields
}
func (*RefundListPagingIterator) Next ¶
func (c *RefundListPagingIterator) Next() bool
func (*RefundListPagingIterator) Value ¶
func (c *RefundListPagingIterator) Value(ctx context.Context) (*RefundListResult, error)
type RefundListParams ¶
type RefundListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Payment string `url:"payment,omitempty" json:"payment,omitempty"` RefundType string `url:"refund_type,omitempty" json:"refund_type,omitempty"` }
RefundListParams parameters
type RefundListResult ¶
type RefundListResult struct { Refunds []Refund `json:"refunds"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
RefundListResult response including pagination metadata
type RefundService ¶
type RefundService struct {
// contains filtered or unexported fields
}
RefundService manages refunds
func (*RefundService) All ¶
func (s *RefundService) All(ctx context.Context, p RefundListParams, opts ...RequestOption) *RefundListPagingIterator
func (*RefundService) Create ¶
func (s *RefundService) Create(ctx context.Context, p RefundCreateParams, opts ...RequestOption) (*Refund, error)
Create Creates a new refund object.
This fails with:<a name="total_amount_confirmation_invalid"></a><a name="number_of_refunds_exceeded"></a><a name="available_refund_amount_insufficient"></a>
- `total_amount_confirmation_invalid` if the confirmation amount doesn't match the total amount refunded for the payment. This safeguard is there to prevent two processes from creating refunds without awareness of each other.
- `number_of_refunds_exceeded` if five or more refunds have already been created against the payment.
- `available_refund_amount_insufficient` if the creditor does not have sufficient balance for refunds available to cover the cost of the requested refund.
func (*RefundService) Get ¶
func (s *RefundService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Refund, error)
Get Retrieves all details for a single refund
func (*RefundService) List ¶
func (s *RefundService) List(ctx context.Context, p RefundListParams, opts ...RequestOption) (*RefundListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your refunds.
func (*RefundService) Update ¶
func (s *RefundService) Update(ctx context.Context, identity string, p RefundUpdateParams, opts ...RequestOption) (*Refund, error)
Update Updates a refund object.
type RefundUpdateParams ¶
type RefundUpdateParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
RefundUpdateParams parameters
type RequestOption ¶
type RequestOption func(*requestOptions) error
RequestOption is used to configure a given request
func WithHeaders ¶
func WithHeaders(headers map[string]string) RequestOption
WithHeaders sets headers to be sent for this request
func WithIdempotencyKey ¶
func WithIdempotencyKey(key string) RequestOption
WithIdempotencyKey sets an idempotency key so multiple calls to a non-idempotent endpoint with the same key are actually idempotent
func WithRetries ¶
func WithRetries(n int) RequestOption
WithRetries sets the amount of total retries to make for the request
func WithoutRetries ¶
func WithoutRetries() RequestOption
WithoutRetries disables retries for this request
type ScenarioSimulator ¶
type ScenarioSimulator struct {
Id string `url:"id,omitempty" json:"id,omitempty"`
}
ScenarioSimulator model
type ScenarioSimulatorRunParams ¶
type ScenarioSimulatorRunParams struct { Links struct { Resource string `url:"resource,omitempty" json:"resource,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` }
ScenarioSimulatorRunParams parameters
type ScenarioSimulatorService ¶
type ScenarioSimulatorService struct {
// contains filtered or unexported fields
}
ScenarioSimulatorService manages scenario_simulators
func (*ScenarioSimulatorService) Run ¶
func (s *ScenarioSimulatorService) Run(ctx context.Context, identity string, p ScenarioSimulatorRunParams, opts ...RequestOption) (*ScenarioSimulator, error)
Run Runs the specific scenario simulator against the specific resource
type Service ¶
type Service struct { BankAuthorisations *BankAuthorisationService BankDetailsLookups *BankDetailsLookupService BillingRequests *BillingRequestService BillingRequestFlows *BillingRequestFlowService BillingRequestTemplates *BillingRequestTemplateService Blocks *BlockService Creditors *CreditorService CreditorBankAccounts *CreditorBankAccountService CurrencyExchangeRates *CurrencyExchangeRateService Customers *CustomerService CustomerBankAccounts *CustomerBankAccountService CustomerNotifications *CustomerNotificationService Events *EventService InstalmentSchedules *InstalmentScheduleService Institutions *InstitutionService Mandates *MandateService MandateImports *MandateImportService MandateImportEntries *MandateImportEntryService MandatePdfs *MandatePdfService PayerAuthorisations *PayerAuthorisationService Payments *PaymentService Payouts *PayoutService PayoutItems *PayoutItemService RedirectFlows *RedirectFlowService Refunds *RefundService ScenarioSimulators *ScenarioSimulatorService Subscriptions *SubscriptionService TaxRates *TaxRateService Webhooks *WebhookService }
type Subscription ¶
type Subscription struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Count int `url:"count,omitempty" json:"count,omitempty"` CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` DayOfMonth int `url:"day_of_month,omitempty" json:"day_of_month,omitempty"` EarliestChargeDateAfterResume string `url:"earliest_charge_date_after_resume,omitempty" json:"earliest_charge_date_after_resume,omitempty"` EndDate string `url:"end_date,omitempty" json:"end_date,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Interval int `url:"interval,omitempty" json:"interval,omitempty"` IntervalUnit string `url:"interval_unit,omitempty" json:"interval_unit,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Month string `url:"month,omitempty" json:"month,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentReference string `url:"payment_reference,omitempty" json:"payment_reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` StartDate string `url:"start_date,omitempty" json:"start_date,omitempty"` Status string `url:"status,omitempty" json:"status,omitempty"` UpcomingPayments []struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` ChargeDate string `url:"charge_date,omitempty" json:"charge_date,omitempty"` } `url:"upcoming_payments,omitempty" json:"upcoming_payments,omitempty"` }
Subscription model
type SubscriptionCancelParams ¶
type SubscriptionCancelParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
SubscriptionCancelParams parameters
type SubscriptionCreateParams ¶
type SubscriptionCreateParams struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Count int `url:"count,omitempty" json:"count,omitempty"` Currency string `url:"currency,omitempty" json:"currency,omitempty"` DayOfMonth int `url:"day_of_month,omitempty" json:"day_of_month,omitempty"` EndDate string `url:"end_date,omitempty" json:"end_date,omitempty"` Interval int `url:"interval,omitempty" json:"interval,omitempty"` IntervalUnit string `url:"interval_unit,omitempty" json:"interval_unit,omitempty"` Links struct { Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` } `url:"links,omitempty" json:"links,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Month string `url:"month,omitempty" json:"month,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentReference string `url:"payment_reference,omitempty" json:"payment_reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` StartDate string `url:"start_date,omitempty" json:"start_date,omitempty"` }
SubscriptionCreateParams parameters
type SubscriptionListPagingIterator ¶
type SubscriptionListPagingIterator struct {
// contains filtered or unexported fields
}
func (*SubscriptionListPagingIterator) Next ¶
func (c *SubscriptionListPagingIterator) Next() bool
func (*SubscriptionListPagingIterator) Value ¶
func (c *SubscriptionListPagingIterator) Value(ctx context.Context) (*SubscriptionListResult, error)
type SubscriptionListParams ¶
type SubscriptionListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` Customer string `url:"customer,omitempty" json:"customer,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Mandate string `url:"mandate,omitempty" json:"mandate,omitempty"` Status []string `url:"status,omitempty" json:"status,omitempty"` }
SubscriptionListParams parameters
type SubscriptionListResult ¶
type SubscriptionListResult struct { Subscriptions []Subscription `json:"subscriptions"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
SubscriptionListResult response including pagination metadata
type SubscriptionPauseParams ¶
type SubscriptionPauseParams struct { Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` PauseCycles int `url:"pause_cycles,omitempty" json:"pause_cycles,omitempty"` }
SubscriptionPauseParams parameters
type SubscriptionResumeParams ¶
type SubscriptionResumeParams struct {
Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"`
}
SubscriptionResumeParams parameters
type SubscriptionService ¶
type SubscriptionService struct {
// contains filtered or unexported fields
}
SubscriptionService manages subscriptions
func (*SubscriptionService) All ¶
func (s *SubscriptionService) All(ctx context.Context, p SubscriptionListParams, opts ...RequestOption) *SubscriptionListPagingIterator
func (*SubscriptionService) Cancel ¶
func (s *SubscriptionService) Cancel(ctx context.Context, identity string, p SubscriptionCancelParams, opts ...RequestOption) (*Subscription, error)
Cancel Immediately cancels a subscription; no more payments will be created under it. Any metadata supplied to this endpoint will be stored on the payment cancellation event it causes.
This will fail with a cancellation_failed error if the subscription is already cancelled or finished.
func (*SubscriptionService) Create ¶
func (s *SubscriptionService) Create(ctx context.Context, p SubscriptionCreateParams, opts ...RequestOption) (*Subscription, error)
Create Creates a new subscription object
func (*SubscriptionService) Get ¶
func (s *SubscriptionService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Subscription, error)
Get Retrieves the details of a single subscription.
func (*SubscriptionService) List ¶
func (s *SubscriptionService) List(ctx context.Context, p SubscriptionListParams, opts ...RequestOption) (*SubscriptionListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your subscriptions.
func (*SubscriptionService) Pause ¶
func (s *SubscriptionService) Pause(ctx context.Context, identity string, p SubscriptionPauseParams, opts ...RequestOption) (*Subscription, error)
Pause Pause a subscription object. No payments will be created until it is resumed.
This can only be used when a subscription is collecting a fixed number of payments (created using `count`), when they continue forever (created without `count` or `end_date`) or the subscription is already paused for a number of cycles.
When `pause_cycles` is omitted the subscription is paused until the [resume endpoint](#subscriptions-resume-a-subscription) is called. If the subscription is collecting a fixed number of payments, `end_date` will be set to `null`. When paused indefinitely, `upcoming_payments` will be empty.
When `pause_cycles` is provided the subscription will be paused for the number of cycles requested. If the subscription is collecting a fixed number of payments, `end_date` will be set to a new value. When paused for a number of cycles, `upcoming_payments` will still contain the upcoming charge dates.
This fails with:
- `forbidden` if the subscription was created by an app and you are not authenticated as that app, or if the subscription was not created by an app and you are authenticated as an app
- `validation_failed` if invalid data is provided when attempting to pause a subscription.
- `subscription_paused_cannot_update_cycles` if the subscription is already paused for a number of cycles and the request provides a value for `pause_cycle`.
- `subscription_cannot_be_paused` if the subscription cannot be paused.
- `subscription_already_ended` if the subscription has taken all payments.
- `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for `pause_cycles` cannot be satisfied.
func (*SubscriptionService) Resume ¶
func (s *SubscriptionService) Resume(ctx context.Context, identity string, p SubscriptionResumeParams, opts ...RequestOption) (*Subscription, error)
Resume Resume a subscription object. Payments will start to be created again based on the subscriptions recurrence rules. The `charge_date` on the next payment will be the same as the subscriptions `earliest_charge_date_after_resume`
This fails with:
- `forbidden` if the subscription was created by an app and you are not authenticated as that app, or if the subscription was not created by an app and you are authenticated as an app
- `validation_failed` if invalid data is provided when attempting to resume a subscription.
- `subscription_not_paused` if the subscription is not paused.
func (*SubscriptionService) Update ¶
func (s *SubscriptionService) Update(ctx context.Context, identity string, p SubscriptionUpdateParams, opts ...RequestOption) (*Subscription, error)
Update Updates a subscription object.
This fails with:
- `validation_failed` if invalid data is provided when attempting to update a subscription.
- `subscription_not_active` if the subscription is no longer active.
- `subscription_already_ended` if the subscription has taken all payments.
- `mandate_payments_require_approval` if the amount is being changed and the mandate requires approval.
- `number_of_subscription_amendments_exceeded` error if the subscription amount has already been changed 10 times.
- `forbidden` if the amount is being changed, and the subscription was created by an app and you are not authenticated as that app, or if the subscription was not created by an app and you are authenticated as an app
- `resource_created_by_another_app` if the app fee is being changed, and the subscription was created by an app other than the app you are authenticated as
type SubscriptionUpdateParams ¶
type SubscriptionUpdateParams struct { Amount int `url:"amount,omitempty" json:"amount,omitempty"` AppFee int `url:"app_fee,omitempty" json:"app_fee,omitempty"` Metadata map[string]interface{} `url:"metadata,omitempty" json:"metadata,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"` PaymentReference string `url:"payment_reference,omitempty" json:"payment_reference,omitempty"` RetryIfPossible bool `url:"retry_if_possible,omitempty" json:"retry_if_possible,omitempty"` }
SubscriptionUpdateParams parameters
type TaxRate ¶
type TaxRate struct { EndDate string `url:"end_date,omitempty" json:"end_date,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` Jurisdiction string `url:"jurisdiction,omitempty" json:"jurisdiction,omitempty"` Percentage string `url:"percentage,omitempty" json:"percentage,omitempty"` StartDate string `url:"start_date,omitempty" json:"start_date,omitempty"` Type string `url:"type,omitempty" json:"type,omitempty"` }
TaxRate model
type TaxRateListPagingIterator ¶
type TaxRateListPagingIterator struct {
// contains filtered or unexported fields
}
func (*TaxRateListPagingIterator) Next ¶
func (c *TaxRateListPagingIterator) Next() bool
func (*TaxRateListPagingIterator) Value ¶
func (c *TaxRateListPagingIterator) Value(ctx context.Context) (*TaxRateListResult, error)
type TaxRateListParams ¶
type TaxRateListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` Jurisdiction string `url:"jurisdiction,omitempty" json:"jurisdiction,omitempty"` }
TaxRateListParams parameters
type TaxRateListResult ¶
type TaxRateListResult struct { TaxRates []TaxRate `json:"tax_rates"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
TaxRateListResult response including pagination metadata
type TaxRateService ¶
type TaxRateService struct {
// contains filtered or unexported fields
}
TaxRateService manages tax_rates
func (*TaxRateService) All ¶
func (s *TaxRateService) All(ctx context.Context, p TaxRateListParams, opts ...RequestOption) *TaxRateListPagingIterator
func (*TaxRateService) Get ¶
func (s *TaxRateService) Get(ctx context.Context, identity string, opts ...RequestOption) (*TaxRate, error)
Get Retrieves the details of a tax rate.
func (*TaxRateService) List ¶
func (s *TaxRateService) List(ctx context.Context, p TaxRateListParams, opts ...RequestOption) (*TaxRateListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all tax rates.
type ValidationError ¶
type Webhook ¶
type Webhook struct { CreatedAt string `url:"created_at,omitempty" json:"created_at,omitempty"` Id string `url:"id,omitempty" json:"id,omitempty"` IsTest bool `url:"is_test,omitempty" json:"is_test,omitempty"` RequestBody string `url:"request_body,omitempty" json:"request_body,omitempty"` RequestHeaders map[string]interface{} `url:"request_headers,omitempty" json:"request_headers,omitempty"` ResponseBody string `url:"response_body,omitempty" json:"response_body,omitempty"` ResponseBodyTruncated bool `url:"response_body_truncated,omitempty" json:"response_body_truncated,omitempty"` ResponseCode int `url:"response_code,omitempty" json:"response_code,omitempty"` ResponseHeaders map[string]interface{} `url:"response_headers,omitempty" json:"response_headers,omitempty"` ResponseHeadersContentTruncated bool `url:"response_headers_content_truncated,omitempty" json:"response_headers_content_truncated,omitempty"` ResponseHeadersCountTruncated bool `url:"response_headers_count_truncated,omitempty" json:"response_headers_count_truncated,omitempty"` Successful bool `url:"successful,omitempty" json:"successful,omitempty"` Url string `url:"url,omitempty" json:"url,omitempty"` }
Webhook model
type WebhookHandler ¶
type WebhookHandler struct { EventHandler // contains filtered or unexported fields }
WebhookHandler allows you to process incoming events from webhooks.
func NewWebhookHandler ¶
func NewWebhookHandler(secret string, h EventHandler) (*WebhookHandler, error)
NewWebhookHandler instantiates a WebhookHandler which can be mounted as a net/http Handler.
func (*WebhookHandler) ServeHTTP ¶
func (h *WebhookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP processes incoming webhooks and dispatches events to the corresponsing handlers.
type WebhookListPagingIterator ¶
type WebhookListPagingIterator struct {
// contains filtered or unexported fields
}
func (*WebhookListPagingIterator) Next ¶
func (c *WebhookListPagingIterator) Next() bool
func (*WebhookListPagingIterator) Value ¶
func (c *WebhookListPagingIterator) Value(ctx context.Context) (*WebhookListResult, error)
type WebhookListParams ¶
type WebhookListParams struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` CreatedAt struct { Gt string `url:"gt,omitempty" json:"gt,omitempty"` Gte string `url:"gte,omitempty" json:"gte,omitempty"` Lt string `url:"lt,omitempty" json:"lt,omitempty"` Lte string `url:"lte,omitempty" json:"lte,omitempty"` } `url:"created_at,omitempty" json:"created_at,omitempty"` IsTest bool `url:"is_test,omitempty" json:"is_test,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` Successful bool `url:"successful,omitempty" json:"successful,omitempty"` }
WebhookListParams parameters
type WebhookListResult ¶
type WebhookListResult struct { Webhooks []Webhook `json:"webhooks"` Meta struct { Cursors struct { After string `url:"after,omitempty" json:"after,omitempty"` Before string `url:"before,omitempty" json:"before,omitempty"` } `url:"cursors,omitempty" json:"cursors,omitempty"` Limit int `url:"limit,omitempty" json:"limit,omitempty"` } `json:"meta"` }
WebhookListResult response including pagination metadata
type WebhookService ¶
type WebhookService struct {
// contains filtered or unexported fields
}
WebhookService manages webhooks
func (*WebhookService) All ¶
func (s *WebhookService) All(ctx context.Context, p WebhookListParams, opts ...RequestOption) *WebhookListPagingIterator
func (*WebhookService) Get ¶
func (s *WebhookService) Get(ctx context.Context, identity string, opts ...RequestOption) (*Webhook, error)
Get Retrieves the details of an existing webhook.
func (*WebhookService) List ¶
func (s *WebhookService) List(ctx context.Context, p WebhookListParams, opts ...RequestOption) (*WebhookListResult, error)
List Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your webhooks.
func (*WebhookService) Retry ¶
func (s *WebhookService) Retry(ctx context.Context, identity string, opts ...RequestOption) (*Webhook, error)
Retry Requests for a previous webhook to be sent again
Source Files ¶
- bank_authorisation_service.go
- bank_details_lookup_service.go
- billing_request_flow_service.go
- billing_request_service.go
- billing_request_template_service.go
- block_service.go
- creditor_bank_account_service.go
- creditor_service.go
- currency_exchange_rate_service.go
- customer_bank_account_service.go
- customer_notification_service.go
- customer_service.go
- event_service.go
- gc.go
- instalment_schedule_service.go
- institution_service.go
- mandate_import_entry_service.go
- mandate_import_service.go
- mandate_pdf_service.go
- mandate_service.go
- options.go
- paging_iterator.go
- payer_authorisation_service.go
- payment_service.go
- payout_item_service.go
- payout_service.go
- redirect_flow_service.go
- refund_service.go
- retries.go
- scenario_simulator_service.go
- subscription_service.go
- tax_rate_service.go
- testing.go
- useragent.go
- webhook_service.go
- webhooks.go