Documentation
¶
Overview ¶
Package raims provides typed services for the Raims public API.
Reuse a Client across requests and pass a context.Context to every call. Amounts use int64 cents and timestamps use Unix seconds. Request fields use Optional to distinguish omission, null and explicit values. Writes are never retried automatically, including when an idempotency key is supplied.
Index ¶
- Constants
- func ConstructWebhookEvent(payload []byte, headers http.Header, secret string, tolerance time.Duration, ...) (map[string]json.RawMessage, error)
- func VerifyWebhookSignature(payload []byte, headers http.Header, secret string, tolerance time.Duration, ...) error
- type APIError
- type AccountContext
- type AccountFee
- type AccountFees
- type AccountNumber
- type AccountRestoredWebhookEvent
- type AccountRestoredWebhookEventData
- type AccountsService
- func (s *AccountsService) CreateCheckoutFaviconUpload(ctx context.Context, params *CreateCheckoutFaviconUploadParams, ...) (*CheckoutAssetUpload, error)
- func (s *AccountsService) CreateCheckoutLogoUpload(ctx context.Context, params *CreateCheckoutLogoUploadParams, ...) (*CheckoutAssetUpload, error)
- func (s *AccountsService) DeleteCheckoutAssetUpload(ctx context.Context, id string, options ...RequestOption) (*CheckoutAssetUploadDeleted, error)
- func (s *AccountsService) GetCheckoutSettings(ctx context.Context, options ...RequestOption) (*CheckoutSettings, error)
- func (s *AccountsService) GetContext(ctx context.Context, options ...RequestOption) (*AccountContext, error)
- func (s *AccountsService) GetFees(ctx context.Context, options ...RequestOption) (*AccountFees, error)
- func (s *AccountsService) GetNumber(ctx context.Context, options ...RequestOption) (*AccountNumber, error)
- func (s *AccountsService) UpdateCheckoutSettings(ctx context.Context, params *UpdateCheckoutSettingsParams, ...) (*CheckoutSettings, error)
- type AutomaticWithdrawalSettings
- type Balance
- type BalanceForecast
- type BalanceHoldCreatedWebhookEvent
- type BalanceHoldCreatedWebhookEventData
- type BalanceHoldReleasedWebhookEvent
- type BalanceHoldReleasedWebhookEventData
- type BalancesService
- type BoletoAvailableWebhookEvent
- type BoletoAvailableWebhookEventData
- type BoletoCompensatedWebhookEvent
- type BoletoCompensatedWebhookEventData
- type BoletoIssuanceFailedWebhookEvent
- type BoletoIssuanceFailedWebhookEventData
- type BoletoOverpaymentReceivedWebhookEvent
- type BoletoOverpaymentReceivedWebhookEventData
- type BoletoPartialSettlementDetectedWebhookEvent
- type BoletoPartialSettlementDetectedWebhookEventData
- type Charge
- type ChargeBoletoCompensation
- type ChargeBoletoPaymentInformation
- type ChargeBoletoSettlement
- type ChargeCanceledWebhookEvent
- type ChargeCanceledWebhookEventData
- type ChargeCreated
- type ChargeCreatedWebhookEvent
- type ChargeCreatedWebhookEventData
- type ChargeExpiredWebhookEvent
- type ChargeExpiredWebhookEventData
- type ChargeFailedWebhookEvent
- type ChargeFailedWebhookEventData
- type ChargeFullyRefundedWebhookEvent
- type ChargeFullyRefundedWebhookEventData
- type ChargeListItem
- type ChargeListPage
- type ChargeListResponse
- type ChargePaidWebhookEvent
- type ChargePaidWebhookEventData
- type ChargePartiallyRefundedWebhookEvent
- type ChargePartiallyRefundedWebhookEventData
- type ChargePaymentInformation
- type ChargePaymentInstructionsAvailableWebhookEvent
- type ChargePaymentInstructionsAvailableWebhookEventData
- type ChargePaymentInstructionsFailedWebhookEvent
- type ChargePaymentInstructionsFailedWebhookEventData
- type ChargePixPaymentInformation
- type ChargeRevocationPending
- type ChargeRevoked
- type ChargeScenario
- type ChargeScenarioParams
- type ChargeSimulation
- type ChargeStatistics
- type ChargeStatisticsAggregate
- type ChargeUpdatedWebhookEvent
- type ChargeUpdatedWebhookEventData
- type ChargesService
- func (s *ChargesService) Create(ctx context.Context, params *CreateChargeParams, options ...RequestOption) (*ChargeCreated, error)
- func (s *ChargesService) CreateRefund(ctx context.Context, id string, params *CreateRefundParams, ...) (*Refund, error)
- func (s *ChargesService) Get(ctx context.Context, id string, options ...RequestOption) (*Charge, error)
- func (s *ChargesService) GetBoleto(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)
- func (s *ChargesService) GetPayment(ctx context.Context, id string, options ...RequestOption) (*PaymentReceipt, error)
- func (s *ChargesService) GetReceipt(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)
- func (s *ChargesService) GetRefundEligibility(ctx context.Context, id string, options ...RequestOption) (*RefundEligibility, error)
- func (s *ChargesService) List(ctx context.Context, params *ListChargesParams, options ...RequestOption) (*ChargeListResponse, error)
- func (s *ChargesService) ListAll(ctx context.Context, params *ListChargesParams, options ...RequestOption) *Iterator[ChargeListItem]
- func (s *ChargesService) ListRefunds(ctx context.Context, id string, params *ListChargeRefundsParams, ...) (*RefundListResponse, error)
- func (s *ChargesService) ListRefundsAll(ctx context.Context, id string, params *ListChargeRefundsParams, ...) *Iterator[Refund]
- func (s *ChargesService) Revoke(ctx context.Context, id string, options ...RequestOption) (*RevokeChargeResult, error)
- func (s *ChargesService) Statistics(ctx context.Context, params *GetChargeStatisticsParams, ...) (*ChargeStatistics, error)
- func (s *ChargesService) Update(ctx context.Context, id string, params *UpdateChargeParams, ...) (*Charge, error)
- type CheckoutAsset
- type CheckoutAssetUpload
- type CheckoutAssetUploadDeleted
- type CheckoutSettings
- type Client
- type ClientOption
- type ConnectionError
- type CreateChargeParams
- type CreateCheckoutFaviconUploadParams
- type CreateCheckoutLogoUploadParams
- type CreateCustomerParams
- type CreatePaymentLinkParams
- type CreateRefundParams
- type CreateWebhookParams
- type CreateWithdrawalParams
- type CustomerBatchDeleted
- type CustomerCreated
- type CustomerCreatedWebhookEvent
- type CustomerCreatedWebhookEventData
- type CustomerDeleted
- type CustomerDeletedWebhookEvent
- type CustomerDeletedWebhookEventData
- type CustomerListItem
- type CustomerListPage
- type CustomerListResponse
- func (v CustomerListResponse) MarshalJSON() ([]byte, error)
- func (v *CustomerListResponse) NextPage(ctx context.Context) (*CustomerListResponse, error)
- func (v *CustomerListResponse) PreviousPage(ctx context.Context) (*CustomerListResponse, error)
- func (v *CustomerListResponse) UnmarshalJSON(data []byte) error
- type CustomerUpdatedWebhookEvent
- type CustomerUpdatedWebhookEventData
- type CustomersService
- func (s *CustomersService) Create(ctx context.Context, params *CreateCustomerParams, options ...RequestOption) (*CustomerCreated, error)
- func (s *CustomersService) Delete(ctx context.Context, id string, options ...RequestOption) (*CustomerDeleted, error)
- func (s *CustomersService) DeleteBatch(ctx context.Context, params *RemoveCustomersParams, options ...RequestOption) (*CustomerBatchDeleted, error)
- func (s *CustomersService) Get(ctx context.Context, id string, options ...RequestOption) (*CustomerListItem, error)
- func (s *CustomersService) List(ctx context.Context, params *ListCustomersParams, options ...RequestOption) (*CustomerListResponse, error)
- func (s *CustomersService) ListAll(ctx context.Context, params *ListCustomersParams, options ...RequestOption) *Iterator[CustomerListItem]
- func (s *CustomersService) Update(ctx context.Context, id string, params *UpdateCustomerParams, ...) (*CustomerListItem, error)
- type DeliverWebhookEventParams
- type Dispute
- type DisputeClosedWebhookEvent
- type DisputeClosedWebhookEventData
- type DisputeFundsDebitedWebhookEvent
- type DisputeFundsDebitedWebhookEventData
- type DisputeListItem
- type DisputeListPage
- type DisputeListResponse
- func (v DisputeListResponse) MarshalJSON() ([]byte, error)
- func (v *DisputeListResponse) NextPage(ctx context.Context) (*DisputeListResponse, error)
- func (v *DisputeListResponse) PreviousPage(ctx context.Context) (*DisputeListResponse, error)
- func (v *DisputeListResponse) UnmarshalJSON(data []byte) error
- type DisputeOpenedWebhookEvent
- type DisputeOpenedWebhookEventData
- type DisputeUpdatedWebhookEvent
- type DisputeUpdatedWebhookEventData
- type DisputesService
- func (s *DisputesService) Get(ctx context.Context, id string, options ...RequestOption) (*Dispute, error)
- func (s *DisputesService) List(ctx context.Context, params *ListDisputesParams, options ...RequestOption) (*DisputeListResponse, error)
- func (s *DisputesService) ListAll(ctx context.Context, params *ListDisputesParams, options ...RequestOption) *Iterator[DisputeListItem]
- type Environment
- type Error
- type ErrorResponse
- type FieldError
- type FinancialDocument
- type GetBalanceForecastParams
- type GetChargeStatisticsParams
- type IssueSimulationPaymentParams
- type Iterator
- type ListChargeRefundsParams
- type ListChargesParams
- type ListCustomersParams
- type ListDisputesParams
- type ListPaymentLinksParams
- type ListRefundsParams
- type ListStatementsParams
- type ListWebhookDeliveriesParams
- type ListWebhookDeliveryAttemptsParams
- type ListWebhookEventsParams
- type ListWebhooksParams
- type ListWithdrawalDestinationsParams
- type ListWithdrawalsParams
- type Optional
- type PaymentLink
- type PaymentLinkCreatedWebhookEvent
- type PaymentLinkCreatedWebhookEventData
- type PaymentLinkDetails
- type PaymentLinkEmailRequestAccepted
- type PaymentLinkListPage
- type PaymentLinkListResponse
- func (v PaymentLinkListResponse) MarshalJSON() ([]byte, error)
- func (v *PaymentLinkListResponse) NextPage(ctx context.Context) (*PaymentLinkListResponse, error)
- func (v *PaymentLinkListResponse) PreviousPage(ctx context.Context) (*PaymentLinkListResponse, error)
- func (v *PaymentLinkListResponse) UnmarshalJSON(data []byte) error
- type PaymentLinkUnavailableReason
- type PaymentLinkUpdatedWebhookEvent
- type PaymentLinkUpdatedWebhookEventData
- type PaymentLinksService
- func (s *PaymentLinksService) Create(ctx context.Context, params *CreatePaymentLinkParams, options ...RequestOption) (*PaymentLink, error)
- func (s *PaymentLinksService) Get(ctx context.Context, id string, options ...RequestOption) (*PaymentLinkDetails, error)
- func (s *PaymentLinksService) List(ctx context.Context, params *ListPaymentLinksParams, options ...RequestOption) (*PaymentLinkListResponse, error)
- func (s *PaymentLinksService) ListAll(ctx context.Context, params *ListPaymentLinksParams, options ...RequestOption) *Iterator[PaymentLink]
- func (s *PaymentLinksService) SendEmail(ctx context.Context, id string, options ...RequestOption) (*PaymentLinkEmailRequestAccepted, error)
- func (s *PaymentLinksService) Update(ctx context.Context, id string, params *UpdatePaymentLinkParams, ...) (*PaymentLink, error)
- type PaymentReceipt
- type PixAvailableWebhookEvent
- type PixAvailableWebhookEventData
- type PixIssuanceFailedWebhookEvent
- type PixIssuanceFailedWebhookEventData
- type PixRefundReceivedWebhookEvent
- type PixRefundReceivedWebhookEventData
- type ProtocolError
- type ReceiptParty
- type Refund
- type RefundAcceptedWebhookEvent
- type RefundAcceptedWebhookEventData
- type RefundCompletedWebhookEvent
- type RefundCompletedWebhookEventData
- type RefundEligibility
- type RefundFailedWebhookEvent
- type RefundFailedWebhookEventData
- type RefundFailureReason
- type RefundListPage
- type RefundListResponse
- type RefundReconciliationRequiredWebhookEvent
- type RefundReconciliationRequiredWebhookEventData
- type RefundRequestedWebhookEvent
- type RefundRequestedWebhookEventData
- type RefundUnavailableReason
- type RefundsService
- func (s *RefundsService) Get(ctx context.Context, id string, options ...RequestOption) (*Refund, error)
- func (s *RefundsService) GetReceipt(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)
- func (s *RefundsService) List(ctx context.Context, params *ListRefundsParams, options ...RequestOption) (*RefundListResponse, error)
- func (s *RefundsService) ListAll(ctx context.Context, params *ListRefundsParams, options ...RequestOption) *Iterator[Refund]
- type RemoveCustomersParams
- type RequestDiagnostics
- type RequestOption
- type ResendWebhookDeliveriesParams
- type ResolveChargeScenarioParams
- type Resource
- type Response
- type RevokeChargeResult
- type RotateWebhookSecretParams
- type SetWebhookPauseParams
- type SignatureError
- type SimulationChargesService
- func (s *SimulationChargesService) CompensateBoleto(ctx context.Context, id string, options ...RequestOption) (*ChargeBoletoCompensation, error)
- func (s *SimulationChargesService) ConfigureScenario(ctx context.Context, id string, params *ChargeScenarioParams, ...) (*ChargeScenario, error)
- func (s *SimulationChargesService) ConfirmPayment(ctx context.Context, id string, options ...RequestOption) (*ChargeSimulation, error)
- func (s *SimulationChargesService) CreateRefund(ctx context.Context, id string, params *CreateRefundParams, ...) (*Refund, error)
- func (s *SimulationChargesService) FailPayment(ctx context.Context, id string, options ...RequestOption) (*ChargeSimulation, error)
- func (s *SimulationChargesService) IssuePayment(ctx context.Context, id string, params *IssueSimulationPaymentParams, ...) (*Charge, error)
- func (s *SimulationChargesService) ResolveScenario(ctx context.Context, id string, params *ResolveChargeScenarioParams, ...) (*ChargeScenario, error)
- type SimulationRefundsService
- type SimulationsService
- type Statement
- type StatementCreatedWebhookEvent
- type StatementCreatedWebhookEventData
- type StatementListPage
- type StatementListResponse
- func (v StatementListResponse) MarshalJSON() ([]byte, error)
- func (v *StatementListResponse) NextPage(ctx context.Context) (*StatementListResponse, error)
- func (v *StatementListResponse) PreviousPage(ctx context.Context) (*StatementListResponse, error)
- func (v *StatementListResponse) UnmarshalJSON(data []byte) error
- type StatementsService
- func (s *StatementsService) Get(ctx context.Context, id string, options ...RequestOption) (*Statement, error)
- func (s *StatementsService) List(ctx context.Context, params *ListStatementsParams, options ...RequestOption) (*StatementListResponse, error)
- func (s *StatementsService) ListAll(ctx context.Context, params *ListStatementsParams, options ...RequestOption) *Iterator[Statement]
- type TedReceivedWebhookEvent
- type TedReceivedWebhookEventData
- type UpdateAutomaticWithdrawalSettingsParams
- type UpdateChargeParams
- type UpdateCheckoutSettingsParams
- type UpdateCustomerParams
- type UpdatePaymentLinkParams
- type UpdateWebhookParams
- type ValidationError
- type Webhook
- type WebhookAdvanceAccepted
- type WebhookAttempt
- type WebhookAttemptDetail
- type WebhookAttemptListResponse
- func (v WebhookAttemptListResponse) MarshalJSON() ([]byte, error)
- func (v *WebhookAttemptListResponse) NextPage(ctx context.Context) (*WebhookAttemptListResponse, error)
- func (v *WebhookAttemptListResponse) PreviousPage(ctx context.Context) (*WebhookAttemptListResponse, error)
- func (v *WebhookAttemptListResponse) UnmarshalJSON(data []byte) error
- type WebhookBulkResendAccepted
- type WebhookBulkResendItem
- type WebhookCreated
- type WebhookDeliveriesService
- func (s *WebhookDeliveriesService) Advance(ctx context.Context, delivery_id string, options ...RequestOption) (*WebhookAdvanceAccepted, error)
- func (s *WebhookDeliveriesService) Get(ctx context.Context, delivery_id string, options ...RequestOption) (*WebhookDelivery, error)
- func (s *WebhookDeliveriesService) GetAttempt(ctx context.Context, delivery_id string, attempt_id string, ...) (*WebhookAttemptDetail, error)
- func (s *WebhookDeliveriesService) List(ctx context.Context, params *ListWebhookDeliveriesParams, ...) (*WebhookDeliveryListResponse, error)
- func (s *WebhookDeliveriesService) ListAll(ctx context.Context, params *ListWebhookDeliveriesParams, ...) *Iterator[WebhookDelivery]
- func (s *WebhookDeliveriesService) ListAttempts(ctx context.Context, delivery_id string, ...) (*WebhookAttemptListResponse, error)
- func (s *WebhookDeliveriesService) ListAttemptsAll(ctx context.Context, delivery_id string, ...) *Iterator[WebhookAttempt]
- func (s *WebhookDeliveriesService) Resend(ctx context.Context, delivery_id string, options ...RequestOption) (*WebhookDeliveryResendAccepted, error)
- func (s *WebhookDeliveriesService) ResendMany(ctx context.Context, params *ResendWebhookDeliveriesParams, ...) (*WebhookBulkResendAccepted, error)
- type WebhookDelivery
- type WebhookDeliveryListResponse
- func (v WebhookDeliveryListResponse) MarshalJSON() ([]byte, error)
- func (v *WebhookDeliveryListResponse) NextPage(ctx context.Context) (*WebhookDeliveryListResponse, error)
- func (v *WebhookDeliveryListResponse) PreviousPage(ctx context.Context) (*WebhookDeliveryListResponse, error)
- func (v *WebhookDeliveryListResponse) UnmarshalJSON(data []byte) error
- type WebhookDeliveryPage
- type WebhookDeliveryResendAccepted
- type WebhookEvent
- type WebhookEventDetail
- type WebhookEventListResponse
- func (v WebhookEventListResponse) MarshalJSON() ([]byte, error)
- func (v *WebhookEventListResponse) NextPage(ctx context.Context) (*WebhookEventListResponse, error)
- func (v *WebhookEventListResponse) PreviousPage(ctx context.Context) (*WebhookEventListResponse, error)
- func (v *WebhookEventListResponse) UnmarshalJSON(data []byte) error
- type WebhookEventType
- type WebhookEventTypeListResponse
- type WebhookEventTypesService
- type WebhookEventsService
- func (s *WebhookEventsService) Deliver(ctx context.Context, event_id string, params *DeliverWebhookEventParams, ...) (*WebhookDeliveryResendAccepted, error)
- func (s *WebhookEventsService) Get(ctx context.Context, event_id string, options ...RequestOption) (*WebhookEventDetail, error)
- func (s *WebhookEventsService) List(ctx context.Context, params *ListWebhookEventsParams, options ...RequestOption) (*WebhookEventListResponse, error)
- func (s *WebhookEventsService) ListAll(ctx context.Context, params *ListWebhookEventsParams, options ...RequestOption) *Iterator[WebhookEvent]
- type WebhookHealth
- type WebhookListPage
- type WebhookListResponse
- func (v WebhookListResponse) MarshalJSON() ([]byte, error)
- func (v *WebhookListResponse) NextPage(ctx context.Context) (*WebhookListResponse, error)
- func (v *WebhookListResponse) PreviousPage(ctx context.Context) (*WebhookListResponse, error)
- func (v *WebhookListResponse) UnmarshalJSON(data []byte) error
- type WebhookPause
- type WebhookSecretRotation
- type WebhookTestAccepted
- type WebhookTestWebhookEvent
- type WebhookTestWebhookEventData
- type WebhooksService
- func (s *WebhooksService) Create(ctx context.Context, params *CreateWebhookParams, options ...RequestOption) (*WebhookCreated, error)
- func (s *WebhooksService) Delete(ctx context.Context, webhook_id string, options ...RequestOption) (*Response, error)
- func (s *WebhooksService) Get(ctx context.Context, webhook_id string, options ...RequestOption) (*Webhook, error)
- func (s *WebhooksService) GetHealth(ctx context.Context, webhook_id string, options ...RequestOption) (*WebhookHealth, error)
- func (s *WebhooksService) List(ctx context.Context, params *ListWebhooksParams, options ...RequestOption) (*WebhookListResponse, error)
- func (s *WebhooksService) ListAll(ctx context.Context, params *ListWebhooksParams, options ...RequestOption) *Iterator[Webhook]
- func (s *WebhooksService) RotateSecret(ctx context.Context, webhook_id string, params *RotateWebhookSecretParams, ...) (*WebhookSecretRotation, error)
- func (s *WebhooksService) SetPause(ctx context.Context, webhook_id string, params *SetWebhookPauseParams, ...) (*WebhookPause, error)
- func (s *WebhooksService) Test(ctx context.Context, webhook_id string, options ...RequestOption) (*WebhookTestAccepted, error)
- func (s *WebhooksService) Update(ctx context.Context, webhook_id string, params *UpdateWebhookParams, ...) (*Webhook, error)
- type Withdrawal
- type WithdrawalAcceptedWebhookEvent
- type WithdrawalAcceptedWebhookEventData
- type WithdrawalAutomaticSettingsChangedWebhookEvent
- type WithdrawalAutomaticSettingsChangedWebhookEventData
- type WithdrawalBankAccount
- type WithdrawalCompletedWebhookEvent
- type WithdrawalCompletedWebhookEventData
- type WithdrawalDestination
- type WithdrawalDestinationChangedWebhookEvent
- type WithdrawalDestinationChangedWebhookEventData
- type WithdrawalDestinationListPage
- type WithdrawalDestinationListResponse
- func (v WithdrawalDestinationListResponse) MarshalJSON() ([]byte, error)
- func (v *WithdrawalDestinationListResponse) NextPage(ctx context.Context) (*WithdrawalDestinationListResponse, error)
- func (v *WithdrawalDestinationListResponse) PreviousPage(ctx context.Context) (*WithdrawalDestinationListResponse, error)
- func (v *WithdrawalDestinationListResponse) UnmarshalJSON(data []byte) error
- type WithdrawalDestinationsService
- func (s *WithdrawalDestinationsService) Get(ctx context.Context, id string, options ...RequestOption) (*WithdrawalDestination, error)
- func (s *WithdrawalDestinationsService) List(ctx context.Context, params *ListWithdrawalDestinationsParams, ...) (*WithdrawalDestinationListResponse, error)
- func (s *WithdrawalDestinationsService) ListAll(ctx context.Context, params *ListWithdrawalDestinationsParams, ...) *Iterator[WithdrawalDestination]
- type WithdrawalFailedWebhookEvent
- type WithdrawalFailedWebhookEventData
- type WithdrawalFailureReason
- type WithdrawalLimits
- type WithdrawalListPage
- type WithdrawalListResponse
- func (v WithdrawalListResponse) MarshalJSON() ([]byte, error)
- func (v *WithdrawalListResponse) NextPage(ctx context.Context) (*WithdrawalListResponse, error)
- func (v *WithdrawalListResponse) PreviousPage(ctx context.Context) (*WithdrawalListResponse, error)
- func (v *WithdrawalListResponse) UnmarshalJSON(data []byte) error
- type WithdrawalPeriodLimits
- type WithdrawalPixDestination
- type WithdrawalRequestedWebhookEvent
- type WithdrawalRequestedWebhookEventData
- type WithdrawalSummary
- type WithdrawalsService
- func (s *WithdrawalsService) Create(ctx context.Context, params *CreateWithdrawalParams, options ...RequestOption) (*Withdrawal, error)
- func (s *WithdrawalsService) Get(ctx context.Context, id string, options ...RequestOption) (*Withdrawal, error)
- func (s *WithdrawalsService) GetAutomaticSettings(ctx context.Context, options ...RequestOption) (*AutomaticWithdrawalSettings, error)
- func (s *WithdrawalsService) GetLimits(ctx context.Context, options ...RequestOption) (*WithdrawalLimits, error)
- func (s *WithdrawalsService) GetSummary(ctx context.Context, options ...RequestOption) (*WithdrawalSummary, error)
- func (s *WithdrawalsService) List(ctx context.Context, params *ListWithdrawalsParams, options ...RequestOption) (*WithdrawalListResponse, error)
- func (s *WithdrawalsService) ListAll(ctx context.Context, params *ListWithdrawalsParams, options ...RequestOption) *Iterator[Withdrawal]
- func (s *WithdrawalsService) UpdateAutomaticSettings(ctx context.Context, params *UpdateAutomaticWithdrawalSettingsParams, ...) (*AutomaticWithdrawalSettings, error)
Constants ¶
const ( Production Environment = "Production" Sandbox Environment = "Sandbox" AccountContextAmountUnitCents = "cents" AccountContextBusinessTimezoneAmericaSaoPaulo = "America/Sao_Paulo" AccountContextCompanyStatusActive = "active" AccountContextCompanyStatusLimited = "limited" AccountContextCompanyStatusPending = "pending" AccountContextCurrencyBRL = "BRL" AccountContextDataEnvironmentProduction = "production" AccountContextDataEnvironmentSandbox = "sandbox" AccountContextTimestampUnitUnixSeconds = "unix_seconds" AccountRestoredWebhookEventDataPaymentMethodBoleto = "boleto" AccountRestoredWebhookEventDataPaymentMethodCreditCard = "credit_card" AccountRestoredWebhookEventDataPaymentMethodDebit = "debit" AccountRestoredWebhookEventDataPaymentMethodPix = "pix" BalanceForecastPeriodLast15Days = "last_15_days" BalanceForecastPeriodLast30Days = "last_30_days" BalanceForecastPeriodLast7Days = "last_7_days" BalanceForecastPeriodToday = "today" BalanceHoldCreatedWebhookEventDataPaymentMethodBoleto = "boleto" BalanceHoldCreatedWebhookEventDataPaymentMethodCreditCard = "credit_card" BalanceHoldCreatedWebhookEventDataPaymentMethodDebit = "debit" BalanceHoldCreatedWebhookEventDataPaymentMethodPix = "pix" BalanceHoldReleasedWebhookEventDataPaymentMethodBoleto = "boleto" BalanceHoldReleasedWebhookEventDataPaymentMethodCreditCard = "credit_card" BalanceHoldReleasedWebhookEventDataPaymentMethodDebit = "debit" BalanceHoldReleasedWebhookEventDataPaymentMethodPix = "pix" BoletoAvailableWebhookEventDataPaymentMethodBoleto = "boleto" BoletoAvailableWebhookEventDataPaymentMethodCreditCard = "credit_card" BoletoAvailableWebhookEventDataPaymentMethodDebit = "debit" BoletoAvailableWebhookEventDataPaymentMethodPix = "pix" BoletoAvailableWebhookEventEnvironmentProduction = "production" BoletoAvailableWebhookEventEnvironmentSandbox = "sandbox" BoletoCompensatedWebhookEventDataPaymentMethodBoleto = "boleto" BoletoCompensatedWebhookEventDataPaymentMethodCreditCard = "credit_card" BoletoCompensatedWebhookEventDataPaymentMethodDebit = "debit" BoletoCompensatedWebhookEventDataPaymentMethodPix = "pix" BoletoCompensatedWebhookEventEnvironmentProduction = "production" BoletoCompensatedWebhookEventEnvironmentSandbox = "sandbox" BoletoIssuanceFailedWebhookEventDataPaymentMethodBoleto = "boleto" BoletoIssuanceFailedWebhookEventDataPaymentMethodCreditCard = "credit_card" BoletoIssuanceFailedWebhookEventDataPaymentMethodDebit = "debit" BoletoIssuanceFailedWebhookEventDataPaymentMethodPix = "pix" BoletoIssuanceFailedWebhookEventEnvironmentProduction = "production" BoletoIssuanceFailedWebhookEventEnvironmentSandbox = "sandbox" BoletoOverpaymentReceivedWebhookEventDataPaymentMethodBoleto = "boleto" BoletoOverpaymentReceivedWebhookEventDataPaymentMethodCreditCard = "credit_card" BoletoOverpaymentReceivedWebhookEventDataPaymentMethodDebit = "debit" BoletoOverpaymentReceivedWebhookEventDataPaymentMethodPix = "pix" BoletoPartialSettlementDetectedWebhookEventDataPaymentMethodBoleto = "boleto" BoletoPartialSettlementDetectedWebhookEventDataPaymentMethodCreditCard = "credit_card" BoletoPartialSettlementDetectedWebhookEventDataPaymentMethodDebit = "debit" BoletoPartialSettlementDetectedWebhookEventDataPaymentMethodPix = "pix" ChargeCanceledWebhookEventDataPaymentMethodBoleto = "boleto" ChargeCanceledWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargeCanceledWebhookEventDataPaymentMethodDebit = "debit" ChargeCanceledWebhookEventDataPaymentMethodPix = "pix" ChargeCanceledWebhookEventEnvironmentProduction = "production" ChargeCanceledWebhookEventEnvironmentSandbox = "sandbox" ChargeCreatedPaymentMethodTypesItemBoleto int64 = 2 ChargeCreatedPaymentMethodTypesItemPix int64 = 1 ChargeCreatedWebhookEventDataPaymentMethodBoleto = "boleto" ChargeCreatedWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargeCreatedWebhookEventDataPaymentMethodDebit = "debit" ChargeCreatedWebhookEventDataPaymentMethodPix = "pix" ChargeCreatedWebhookEventEnvironmentProduction = "production" ChargeCreatedWebhookEventEnvironmentSandbox = "sandbox" ChargeExpiredWebhookEventDataPaymentMethodBoleto = "boleto" ChargeExpiredWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargeExpiredWebhookEventDataPaymentMethodDebit = "debit" ChargeExpiredWebhookEventDataPaymentMethodPix = "pix" ChargeExpiredWebhookEventEnvironmentProduction = "production" ChargeExpiredWebhookEventEnvironmentSandbox = "sandbox" ChargeFailedWebhookEventDataPaymentMethodBoleto = "boleto" ChargeFailedWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargeFailedWebhookEventDataPaymentMethodDebit = "debit" ChargeFailedWebhookEventDataPaymentMethodPix = "pix" ChargeFailedWebhookEventEnvironmentProduction = "production" ChargeFailedWebhookEventEnvironmentSandbox = "sandbox" ChargeFullyRefundedWebhookEventDataPaymentMethodBoleto = "boleto" ChargeFullyRefundedWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargeFullyRefundedWebhookEventDataPaymentMethodDebit = "debit" ChargeFullyRefundedWebhookEventDataPaymentMethodPix = "pix" ChargeFullyRefundedWebhookEventEnvironmentProduction = "production" ChargeFullyRefundedWebhookEventEnvironmentSandbox = "sandbox" ChargeListItemPaymentMethodTypesItemBoleto int64 = 2 ChargeListItemPaymentMethodTypesItemPix int64 = 1 ChargePaidWebhookEventDataPaymentMethodBoleto = "boleto" ChargePaidWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargePaidWebhookEventDataPaymentMethodDebit = "debit" ChargePaidWebhookEventDataPaymentMethodPix = "pix" ChargePaidWebhookEventEnvironmentProduction = "production" ChargePaidWebhookEventEnvironmentSandbox = "sandbox" ChargePartiallyRefundedWebhookEventDataPaymentMethodBoleto = "boleto" ChargePartiallyRefundedWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargePartiallyRefundedWebhookEventDataPaymentMethodDebit = "debit" ChargePartiallyRefundedWebhookEventDataPaymentMethodPix = "pix" ChargePartiallyRefundedWebhookEventEnvironmentProduction = "production" ChargePartiallyRefundedWebhookEventEnvironmentSandbox = "sandbox" ChargePaymentInformationBoletoPaymentStatusAwaitingPayment = "awaiting_payment" ChargePaymentInformationBoletoPaymentStatusCompensated = "compensated" ChargePaymentInformationBoletoPaymentStatusPartiallySettled = "partially_settled" ChargePaymentInformationBoletoPaymentStatusSettled = "settled" ChargePaymentInformationBoletoStatusAvailable = "available" ChargePaymentInformationBoletoStatusFailed = "failed" ChargePaymentInformationBoletoStatusNotGenerated = "not_generated" ChargePaymentInformationBoletoStatusPending = "pending" ChargePaymentInformationPixStatusAvailable = "available" ChargePaymentInformationPixStatusFailed = "failed" ChargePaymentInformationPixStatusNotGenerated = "not_generated" ChargePaymentInformationPixStatusPending = "pending" ChargePaymentInstructionsAvailableWebhookEventDataPaymentMethodBoleto = "boleto" ChargePaymentInstructionsAvailableWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargePaymentInstructionsAvailableWebhookEventDataPaymentMethodDebit = "debit" ChargePaymentInstructionsAvailableWebhookEventDataPaymentMethodPix = "pix" ChargePaymentInstructionsAvailableWebhookEventEnvironmentProduction = "production" ChargePaymentInstructionsAvailableWebhookEventEnvironmentSandbox = "sandbox" ChargePaymentInstructionsFailedWebhookEventDataPaymentMethodBoleto = "boleto" ChargePaymentInstructionsFailedWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargePaymentInstructionsFailedWebhookEventDataPaymentMethodDebit = "debit" ChargePaymentInstructionsFailedWebhookEventDataPaymentMethodPix = "pix" ChargePaymentInstructionsFailedWebhookEventEnvironmentProduction = "production" ChargePaymentInstructionsFailedWebhookEventEnvironmentSandbox = "sandbox" ChargePaymentMethodTypesItemBoleto int64 = 2 ChargePaymentMethodTypesItemPix int64 = 1 ChargeScenarioActionBoletoIssuance = "boleto_issuance" ChargeScenarioActionCancellation = "cancellation" ChargeScenarioActionPixIssuance = "pix_issuance" ChargeScenarioOutcomeCompleted = "completed" ChargeScenarioOutcomeFailed = "failed" ChargeScenarioOutcomePending = "pending" ChargeScenarioParamsActionBoletoIssuance = "boleto_issuance" ChargeScenarioParamsActionCancellation = "cancellation" ChargeScenarioParamsActionPixIssuance = "pix_issuance" ChargeScenarioParamsOutcomeFailed = "failed" ChargeScenarioParamsOutcomePending = "pending" ChargeScenarioStateCompleted = "completed" ChargeScenarioStateConfigured = "configured" ChargeScenarioStateFailed = "failed" ChargeScenarioStatePending = "pending" ChargeStatisticsPeriodLast15Days = "last_15_days" ChargeStatisticsPeriodLast30Days = "last_30_days" ChargeStatisticsPeriodLast7Days = "last_7_days" ChargeStatisticsPeriodToday = "today" ChargeUpdatedWebhookEventDataPaymentMethodBoleto = "boleto" ChargeUpdatedWebhookEventDataPaymentMethodCreditCard = "credit_card" ChargeUpdatedWebhookEventDataPaymentMethodDebit = "debit" ChargeUpdatedWebhookEventDataPaymentMethodPix = "pix" ChargeUpdatedWebhookEventEnvironmentProduction = "production" ChargeUpdatedWebhookEventEnvironmentSandbox = "sandbox" CheckoutAssetErrorCodeCHECKOUTASSETINVALIDIMAGE = "CHECKOUT_ASSET_INVALID_IMAGE" CheckoutAssetErrorCodeCHECKOUTASSETPROCESSINGFAILED = "CHECKOUT_ASSET_PROCESSING_FAILED" CheckoutAssetErrorCodeCHECKOUTASSETUPLOADNOTFOUND = "CHECKOUT_ASSET_UPLOAD_NOT_FOUND" CheckoutAssetStatusAbsent = "absent" CheckoutAssetStatusFailed = "failed" CheckoutAssetStatusPending = "pending" CheckoutAssetStatusReady = "ready" CheckoutAssetUploadContentTypeImageJpeg = "image/jpeg" CheckoutAssetUploadContentTypeImagePng = "image/png" CreateChargeParamsPaymentMethodBoleto int64 = 2 CreateChargeParamsPaymentMethodIndefinido int64 = 0 CreateChargeParamsPaymentMethodPix int64 = 1 CreateChargeParamsPaymentMethodTypesItemBoleto int64 = 2 CreateChargeParamsPaymentMethodTypesItemPix int64 = 1 CreateCheckoutFaviconUploadParamsContentTypeImageJpeg = "image/jpeg" CreateCheckoutFaviconUploadParamsContentTypeImagePng = "image/png" CreateCheckoutLogoUploadParamsContentTypeImageJpeg = "image/jpeg" CreateCheckoutLogoUploadParamsContentTypeImagePng = "image/png" CreatePaymentLinkParamsPaymentMethodTypesItemBoleto int64 = 2 CreatePaymentLinkParamsPaymentMethodTypesItemPix int64 = 1 CreateWebhookParamsEventsItemAccountRestored = "account.restored" CreateWebhookParamsEventsItemBalanceHoldCreated = "balance.hold.created" CreateWebhookParamsEventsItemBalanceHoldReleased = "balance.hold.released" CreateWebhookParamsEventsItemBoletoCompensated = "boleto.compensated" CreateWebhookParamsEventsItemBoletoOverpaymentReceived = "boleto.overpayment_received" CreateWebhookParamsEventsItemBoletoPartialSettlementDetected = "boleto.partial_settlement_detected" CreateWebhookParamsEventsItemChargeCanceled = "charge.canceled" CreateWebhookParamsEventsItemChargeCreated = "charge.created" CreateWebhookParamsEventsItemChargeExpired = "charge.expired" CreateWebhookParamsEventsItemChargeFailed = "charge.failed" CreateWebhookParamsEventsItemChargeFullyRefunded = "charge.fully_refunded" CreateWebhookParamsEventsItemChargePaid = "charge.paid" CreateWebhookParamsEventsItemChargePartiallyRefunded = "charge.partially_refunded" CreateWebhookParamsEventsItemChargePaymentInstructionsAvailable = "charge.payment_instructions_available" CreateWebhookParamsEventsItemChargePaymentInstructionsFailed = "charge.payment_instructions_failed" CreateWebhookParamsEventsItemChargeUpdated = "charge.updated" CreateWebhookParamsEventsItemCustomerCreated = "customer.created" CreateWebhookParamsEventsItemCustomerDeleted = "customer.deleted" CreateWebhookParamsEventsItemCustomerUpdated = "customer.updated" CreateWebhookParamsEventsItemDisputeClosed = "dispute.closed" CreateWebhookParamsEventsItemDisputeFundsDebited = "dispute.funds_debited" CreateWebhookParamsEventsItemDisputeOpened = "dispute.opened" CreateWebhookParamsEventsItemDisputeUpdated = "dispute.updated" CreateWebhookParamsEventsItemPaymentLinkCreated = "payment_link.created" CreateWebhookParamsEventsItemPaymentLinkUpdated = "payment_link.updated" CreateWebhookParamsEventsItemPixRefundReceived = "pix_refund.received" CreateWebhookParamsEventsItemRefundAccepted = "refund.accepted" CreateWebhookParamsEventsItemRefundCompleted = "refund.completed" CreateWebhookParamsEventsItemRefundFailed = "refund.failed" CreateWebhookParamsEventsItemRefundReconciliationRequired = "refund.reconciliation_required" CreateWebhookParamsEventsItemRefundRequested = "refund.requested" CreateWebhookParamsEventsItemStatementCreated = "statement.created" CreateWebhookParamsEventsItemTedReceived = "ted.received" CreateWebhookParamsEventsItemWithdrawalAccepted = "withdrawal.accepted" CreateWebhookParamsEventsItemWithdrawalAutomaticSettingsChanged = "withdrawal.automatic_settings_changed" CreateWebhookParamsEventsItemWithdrawalCompleted = "withdrawal.completed" CreateWebhookParamsEventsItemWithdrawalDestinationChanged = "withdrawal.destination_changed" CreateWebhookParamsEventsItemWithdrawalFailed = "withdrawal.failed" CreateWebhookParamsEventsItemWithdrawalRequested = "withdrawal.requested" CustomerCreatedTaxIDTypeCNPJ = "cnpj" CustomerCreatedTaxIDTypeCPF = "cpf" CustomerCreatedWebhookEventDataPaymentMethodBoleto = "boleto" CustomerCreatedWebhookEventDataPaymentMethodCreditCard = "credit_card" CustomerCreatedWebhookEventDataPaymentMethodDebit = "debit" CustomerCreatedWebhookEventDataPaymentMethodPix = "pix" CustomerCreatedWebhookEventEnvironmentProduction = "production" CustomerCreatedWebhookEventEnvironmentSandbox = "sandbox" CustomerDeletedWebhookEventDataPaymentMethodBoleto = "boleto" CustomerDeletedWebhookEventDataPaymentMethodCreditCard = "credit_card" CustomerDeletedWebhookEventDataPaymentMethodDebit = "debit" CustomerDeletedWebhookEventDataPaymentMethodPix = "pix" CustomerDeletedWebhookEventEnvironmentProduction = "production" CustomerDeletedWebhookEventEnvironmentSandbox = "sandbox" CustomerListItemTaxIDTypeCNPJ = "cnpj" CustomerListItemTaxIDTypeCPF = "cpf" CustomerUpdatedWebhookEventDataPaymentMethodBoleto = "boleto" CustomerUpdatedWebhookEventDataPaymentMethodCreditCard = "credit_card" CustomerUpdatedWebhookEventDataPaymentMethodDebit = "debit" CustomerUpdatedWebhookEventDataPaymentMethodPix = "pix" CustomerUpdatedWebhookEventEnvironmentProduction = "production" CustomerUpdatedWebhookEventEnvironmentSandbox = "sandbox" DisputeClosedWebhookEventDataPaymentMethodBoleto = "boleto" DisputeClosedWebhookEventDataPaymentMethodCreditCard = "credit_card" DisputeClosedWebhookEventDataPaymentMethodDebit = "debit" DisputeClosedWebhookEventDataPaymentMethodPix = "pix" DisputeFundsDebitedWebhookEventDataPaymentMethodBoleto = "boleto" DisputeFundsDebitedWebhookEventDataPaymentMethodCreditCard = "credit_card" DisputeFundsDebitedWebhookEventDataPaymentMethodDebit = "debit" DisputeFundsDebitedWebhookEventDataPaymentMethodPix = "pix" DisputeInfractionResultAgreed = "agreed" DisputeInfractionResultDisagreed = "disagreed" DisputeKindChargeback = "chargeback" DisputeKindMed = "med" DisputeListItemKindChargeback = "chargeback" DisputeListItemKindMed = "med" DisputeListItemStageCancelled = "cancelled" DisputeListItemStageClosed = "closed" DisputeListItemStageFailed = "failed" DisputeListItemStageInAnalysis = "in_analysis" DisputeListItemStageOpen = "open" DisputeListItemStageRefundInAnalysis = "refund_in_analysis" DisputeListItemStageRejected = "rejected" DisputeOpenedWebhookEventDataPaymentMethodBoleto = "boleto" DisputeOpenedWebhookEventDataPaymentMethodCreditCard = "credit_card" DisputeOpenedWebhookEventDataPaymentMethodDebit = "debit" DisputeOpenedWebhookEventDataPaymentMethodPix = "pix" DisputeRefundResultPartiallyAccepted = "partially_accepted" DisputeRefundResultRejected = "rejected" DisputeRefundResultTotallyAccepted = "totally_accepted" DisputeStageCancelled = "cancelled" DisputeStageClosed = "closed" DisputeStageFailed = "failed" DisputeStageInAnalysis = "in_analysis" DisputeStageOpen = "open" DisputeStageRefundInAnalysis = "refund_in_analysis" DisputeStageRejected = "rejected" DisputeUpdatedWebhookEventDataPaymentMethodBoleto = "boleto" DisputeUpdatedWebhookEventDataPaymentMethodCreditCard = "credit_card" DisputeUpdatedWebhookEventDataPaymentMethodDebit = "debit" DisputeUpdatedWebhookEventDataPaymentMethodPix = "pix" GetBalanceForecastParamsPeriodLast15Days = "last_15_days" GetBalanceForecastParamsPeriodLast30Days = "last_30_days" GetBalanceForecastParamsPeriodLast7Days = "last_7_days" GetBalanceForecastParamsPeriodToday = "today" GetChargeStatisticsParamsPeriodLast15Days = "last_15_days" GetChargeStatisticsParamsPeriodLast30Days = "last_30_days" GetChargeStatisticsParamsPeriodLast7Days = "last_7_days" GetChargeStatisticsParamsPeriodToday = "today" ListChargesParamsSortKeyAmountCents = "amount_cents" ListChargesParamsSortKeyCreatedAt = "created_at" ListChargesParamsSortOrderAsc = "asc" ListChargesParamsSortOrderDesc = "desc" ListDisputesParamsSortKeyCreatedAt = "created_at" ListDisputesParamsSortKeyDisputedAmountCents = "disputed_amount_cents" ListDisputesParamsSortOrderAsc = "asc" ListDisputesParamsSortOrderDesc = "desc" ListStatementsParamsSortOrderAsc = "asc" ListStatementsParamsSortOrderDesc = "desc" ListWebhookDeliveriesParamsStatusCanceled = "canceled" ListWebhookDeliveriesParamsStatusDelivered = "delivered" ListWebhookDeliveriesParamsStatusFailed = "failed" ListWebhookDeliveriesParamsStatusPending = "pending" ListWebhookDeliveriesParamsStatusProcessing = "processing" ListWithdrawalsParamsSortOrderAsc = "asc" ListWithdrawalsParamsSortOrderDesc = "desc" PaymentLinkCreatedWebhookEventDataPaymentMethodBoleto = "boleto" PaymentLinkCreatedWebhookEventDataPaymentMethodCreditCard = "credit_card" PaymentLinkCreatedWebhookEventDataPaymentMethodDebit = "debit" PaymentLinkCreatedWebhookEventDataPaymentMethodPix = "pix" PaymentLinkCreatedWebhookEventEnvironmentProduction = "production" PaymentLinkCreatedWebhookEventEnvironmentSandbox = "sandbox" PaymentLinkDetailsEffectivePaymentMethodTypesItemBoleto int64 = 2 PaymentLinkDetailsEffectivePaymentMethodTypesItemPix int64 = 1 PaymentLinkDetailsPaymentMethodTypesItemBoleto int64 = 2 PaymentLinkDetailsPaymentMethodTypesItemPix int64 = 1 PaymentLinkPaymentMethodTypesItemBoleto int64 = 2 PaymentLinkPaymentMethodTypesItemPix int64 = 1 PaymentLinkUpdatedWebhookEventDataPaymentMethodBoleto = "boleto" PaymentLinkUpdatedWebhookEventDataPaymentMethodCreditCard = "credit_card" PaymentLinkUpdatedWebhookEventDataPaymentMethodDebit = "debit" PaymentLinkUpdatedWebhookEventDataPaymentMethodPix = "pix" PaymentLinkUpdatedWebhookEventEnvironmentProduction = "production" PaymentLinkUpdatedWebhookEventEnvironmentSandbox = "sandbox" PixAvailableWebhookEventDataPaymentMethodBoleto = "boleto" PixAvailableWebhookEventDataPaymentMethodCreditCard = "credit_card" PixAvailableWebhookEventDataPaymentMethodDebit = "debit" PixAvailableWebhookEventDataPaymentMethodPix = "pix" PixAvailableWebhookEventEnvironmentProduction = "production" PixAvailableWebhookEventEnvironmentSandbox = "sandbox" PixIssuanceFailedWebhookEventDataPaymentMethodBoleto = "boleto" PixIssuanceFailedWebhookEventDataPaymentMethodCreditCard = "credit_card" PixIssuanceFailedWebhookEventDataPaymentMethodDebit = "debit" PixIssuanceFailedWebhookEventDataPaymentMethodPix = "pix" PixIssuanceFailedWebhookEventEnvironmentProduction = "production" PixIssuanceFailedWebhookEventEnvironmentSandbox = "sandbox" PixRefundReceivedWebhookEventDataPaymentMethodBoleto = "boleto" PixRefundReceivedWebhookEventDataPaymentMethodCreditCard = "credit_card" PixRefundReceivedWebhookEventDataPaymentMethodDebit = "debit" PixRefundReceivedWebhookEventDataPaymentMethodPix = "pix" RefundAcceptedWebhookEventDataPaymentMethodBoleto = "boleto" RefundAcceptedWebhookEventDataPaymentMethodCreditCard = "credit_card" RefundAcceptedWebhookEventDataPaymentMethodDebit = "debit" RefundAcceptedWebhookEventDataPaymentMethodPix = "pix" RefundCompletedWebhookEventDataPaymentMethodBoleto = "boleto" RefundCompletedWebhookEventDataPaymentMethodCreditCard = "credit_card" RefundCompletedWebhookEventDataPaymentMethodDebit = "debit" RefundCompletedWebhookEventDataPaymentMethodPix = "pix" RefundCompletedWebhookEventEnvironmentProduction = "production" RefundCompletedWebhookEventEnvironmentSandbox = "sandbox" RefundFailedWebhookEventDataFailureReasonCodeREFUNDFAILUREREASONUNAVAILABLE = "REFUND_FAILURE_REASON_UNAVAILABLE" RefundFailedWebhookEventDataFailureReasonCodeREFUNDNOTSUBMITTED = "REFUND_NOT_SUBMITTED" RefundFailedWebhookEventDataFailureReasonCodeREFUNDPROCESSINGFAILED = "REFUND_PROCESSING_FAILED" RefundFailedWebhookEventDataFailureReasonCodeREFUNDPROCESSINGUNAVAILABLE = "REFUND_PROCESSING_UNAVAILABLE" RefundFailedWebhookEventDataFailureReasonCodeREFUNDREJECTED = "REFUND_REJECTED" RefundFailedWebhookEventDataPaymentMethodBoleto = "boleto" RefundFailedWebhookEventDataPaymentMethodCreditCard = "credit_card" RefundFailedWebhookEventDataPaymentMethodDebit = "debit" RefundFailedWebhookEventDataPaymentMethodPix = "pix" RefundFailedWebhookEventEnvironmentProduction = "production" RefundFailedWebhookEventEnvironmentSandbox = "sandbox" RefundFailureReasonCodeREFUNDFAILUREREASONUNAVAILABLE = "REFUND_FAILURE_REASON_UNAVAILABLE" RefundFailureReasonCodeREFUNDNOTSUBMITTED = "REFUND_NOT_SUBMITTED" RefundFailureReasonCodeREFUNDPROCESSINGFAILED = "REFUND_PROCESSING_FAILED" RefundFailureReasonCodeREFUNDPROCESSINGUNAVAILABLE = "REFUND_PROCESSING_UNAVAILABLE" RefundFailureReasonCodeREFUNDREJECTED = "REFUND_REJECTED" RefundReconciliationRequiredWebhookEventDataPaymentMethodBoleto = "boleto" RefundReconciliationRequiredWebhookEventDataPaymentMethodCreditCard = "credit_card" RefundReconciliationRequiredWebhookEventDataPaymentMethodDebit = "debit" RefundReconciliationRequiredWebhookEventDataPaymentMethodPix = "pix" RefundRequestedWebhookEventDataPaymentMethodBoleto = "boleto" RefundRequestedWebhookEventDataPaymentMethodCreditCard = "credit_card" RefundRequestedWebhookEventDataPaymentMethodDebit = "debit" RefundRequestedWebhookEventDataPaymentMethodPix = "pix" RefundRequestedWebhookEventEnvironmentProduction = "production" RefundRequestedWebhookEventEnvironmentSandbox = "sandbox" RefundStatusAccepted = "accepted" RefundStatusCompleted = "completed" RefundStatusFailed = "failed" RefundStatusReserved = "reserved" RefundStatusUnknown = "unknown" ResolveChargeScenarioParamsActionBoletoIssuance = "boleto_issuance" ResolveChargeScenarioParamsActionCancellation = "cancellation" ResolveChargeScenarioParamsActionPixIssuance = "pix_issuance" ResolveChargeScenarioParamsOutcomeCompleted = "completed" ResolveChargeScenarioParamsOutcomeFailed = "failed" StatementCreatedWebhookEventDataPaymentMethodBoleto = "boleto" StatementCreatedWebhookEventDataPaymentMethodCreditCard = "credit_card" StatementCreatedWebhookEventDataPaymentMethodDebit = "debit" StatementCreatedWebhookEventDataPaymentMethodPix = "pix" StatementCreatedWebhookEventEnvironmentProduction = "production" StatementCreatedWebhookEventEnvironmentSandbox = "sandbox" StatementReferenceTypeAjuste int64 = 4 StatementReferenceTypeCobranca int64 = 1 StatementReferenceTypeContestacao int64 = 2 StatementReferenceTypeManual int64 = 5 StatementReferenceTypeSaque int64 = 3 StatementStatementTypeBloqueio int64 = 9 StatementStatementTypeCreditoPorAjuste int64 = 7 StatementStatementTypeDebitoPorAjuste int64 = 8 StatementStatementTypeDevolucao int64 = 5 StatementStatementTypeDevolucaoParcial int64 = 6 StatementStatementTypeLiberacao int64 = 10 StatementStatementTypeRecebimento int64 = 1 StatementStatementTypeSaque int64 = 4 StatementStatementTypeTarifa int64 = 2 StatementStatementTypeTarifaDeServico int64 = 3 TedReceivedWebhookEventDataPaymentMethodBoleto = "boleto" TedReceivedWebhookEventDataPaymentMethodCreditCard = "credit_card" TedReceivedWebhookEventDataPaymentMethodDebit = "debit" TedReceivedWebhookEventDataPaymentMethodPix = "pix" UpdatePaymentLinkParamsPaymentMethodTypesItemBoleto int64 = 2 UpdatePaymentLinkParamsPaymentMethodTypesItemPix int64 = 1 WebhookCreatedDisabledReasonContinuousFailure = "continuous_failure" WebhookCreatedDisabledReasonManual = "manual" WebhookDeliveryStatusCanceled = "canceled" WebhookDeliveryStatusDelivered = "delivered" WebhookDeliveryStatusFailed = "failed" WebhookDeliveryStatusPending = "pending" WebhookDeliveryStatusProcessing = "processing" WebhookDisabledReasonContinuousFailure = "continuous_failure" WebhookDisabledReasonManual = "manual" WebhookEventTypeCodeAccountRestored = "account.restored" WebhookEventTypeCodeBalanceHoldCreated = "balance.hold.created" WebhookEventTypeCodeBalanceHoldReleased = "balance.hold.released" WebhookEventTypeCodeBoletoCompensated = "boleto.compensated" WebhookEventTypeCodeBoletoOverpaymentReceived = "boleto.overpayment_received" WebhookEventTypeCodeBoletoPartialSettlementDetected = "boleto.partial_settlement_detected" WebhookEventTypeCodeChargeCanceled = "charge.canceled" WebhookEventTypeCodeChargeCreated = "charge.created" WebhookEventTypeCodeChargeExpired = "charge.expired" WebhookEventTypeCodeChargeFailed = "charge.failed" WebhookEventTypeCodeChargeFullyRefunded = "charge.fully_refunded" WebhookEventTypeCodeChargePaid = "charge.paid" WebhookEventTypeCodeChargePartiallyRefunded = "charge.partially_refunded" WebhookEventTypeCodeChargePaymentInstructionsAvailable = "charge.payment_instructions_available" WebhookEventTypeCodeChargePaymentInstructionsFailed = "charge.payment_instructions_failed" WebhookEventTypeCodeChargeUpdated = "charge.updated" WebhookEventTypeCodeCustomerCreated = "customer.created" WebhookEventTypeCodeCustomerDeleted = "customer.deleted" WebhookEventTypeCodeCustomerUpdated = "customer.updated" WebhookEventTypeCodeDisputeClosed = "dispute.closed" WebhookEventTypeCodeDisputeFundsDebited = "dispute.funds_debited" WebhookEventTypeCodeDisputeOpened = "dispute.opened" WebhookEventTypeCodeDisputeUpdated = "dispute.updated" WebhookEventTypeCodePaymentLinkCreated = "payment_link.created" WebhookEventTypeCodePaymentLinkUpdated = "payment_link.updated" WebhookEventTypeCodePixRefundReceived = "pix_refund.received" WebhookEventTypeCodeRefundAccepted = "refund.accepted" WebhookEventTypeCodeRefundCompleted = "refund.completed" WebhookEventTypeCodeRefundFailed = "refund.failed" WebhookEventTypeCodeRefundReconciliationRequired = "refund.reconciliation_required" WebhookEventTypeCodeRefundRequested = "refund.requested" WebhookEventTypeCodeStatementCreated = "statement.created" WebhookEventTypeCodeTedReceived = "ted.received" WebhookEventTypeCodeWithdrawalAccepted = "withdrawal.accepted" WebhookEventTypeCodeWithdrawalAutomaticSettingsChanged = "withdrawal.automatic_settings_changed" WebhookEventTypeCodeWithdrawalCompleted = "withdrawal.completed" WebhookEventTypeCodeWithdrawalDestinationChanged = "withdrawal.destination_changed" WebhookEventTypeCodeWithdrawalFailed = "withdrawal.failed" WebhookEventTypeCodeWithdrawalRequested = "withdrawal.requested" WebhookHealthStatusDisabled = "disabled" WebhookHealthStatusFailing = "failing" WebhookHealthStatusHealthy = "healthy" WebhookHealthStatusUnknown = "unknown" WebhookTestWebhookEventEnvironmentProduction = "production" WebhookTestWebhookEventEnvironmentSandbox = "sandbox" WithdrawalAcceptedWebhookEventDataPaymentMethodBoleto = "boleto" WithdrawalAcceptedWebhookEventDataPaymentMethodCreditCard = "credit_card" WithdrawalAcceptedWebhookEventDataPaymentMethodDebit = "debit" WithdrawalAcceptedWebhookEventDataPaymentMethodPix = "pix" WithdrawalAutomaticSettingsChangedWebhookEventDataPaymentMethodBoleto = "boleto" WithdrawalAutomaticSettingsChangedWebhookEventDataPaymentMethodCreditCard = "credit_card" WithdrawalAutomaticSettingsChangedWebhookEventDataPaymentMethodDebit = "debit" WithdrawalAutomaticSettingsChangedWebhookEventDataPaymentMethodPix = "pix" WithdrawalCompletedWebhookEventDataPaymentMethodBoleto = "boleto" WithdrawalCompletedWebhookEventDataPaymentMethodCreditCard = "credit_card" WithdrawalCompletedWebhookEventDataPaymentMethodDebit = "debit" WithdrawalCompletedWebhookEventDataPaymentMethodPix = "pix" WithdrawalDestinationChangedWebhookEventDataPaymentMethodBoleto = "boleto" WithdrawalDestinationChangedWebhookEventDataPaymentMethodCreditCard = "credit_card" WithdrawalDestinationChangedWebhookEventDataPaymentMethodDebit = "debit" WithdrawalDestinationChangedWebhookEventDataPaymentMethodPix = "pix" WithdrawalDestinationKeyTypeCNPJ = "CNPJ" WithdrawalDestinationKeyTypeEMAIL = "EMAIL" WithdrawalDestinationKeyTypeEVP = "EVP" WithdrawalDestinationKeyTypePHONE = "PHONE" WithdrawalFailedWebhookEventDataPaymentMethodBoleto = "boleto" WithdrawalFailedWebhookEventDataPaymentMethodCreditCard = "credit_card" WithdrawalFailedWebhookEventDataPaymentMethodDebit = "debit" WithdrawalFailedWebhookEventDataPaymentMethodPix = "pix" WithdrawalFailureReasonCodeABOVEMAXIMUMWITHDRAWAL = "ABOVE_MAXIMUM_WITHDRAWAL" WithdrawalFailureReasonCodeBANKACCOUNTUNAVAILABLE = "BANK_ACCOUNT_UNAVAILABLE" WithdrawalFailureReasonCodeBANKPROCESSINGFAILURE = "BANK_PROCESSING_FAILURE" WithdrawalFailureReasonCodeBANKTIMEOUT = "BANK_TIMEOUT" WithdrawalFailureReasonCodeBANKUNSUPPORTED = "BANK_UNSUPPORTED" WithdrawalFailureReasonCodeBELOWMINIMUMWITHDRAWAL = "BELOW_MINIMUM_WITHDRAWAL" WithdrawalFailureReasonCodeBLOCKEDBALANCE = "BLOCKED_BALANCE" WithdrawalFailureReasonCodeDUPLICATEDREQUEST = "DUPLICATED_REQUEST" WithdrawalFailureReasonCodeINSUFFICIENTBALANCE = "INSUFFICIENT_BALANCE" WithdrawalFailureReasonCodeINTERNALERROR = "INTERNAL_ERROR" WithdrawalFailureReasonCodeINVALIDACCOUNTTYPE = "INVALID_ACCOUNT_TYPE" WithdrawalFailureReasonCodeINVALIDBANKACCOUNT = "INVALID_BANK_ACCOUNT" WithdrawalFailureReasonCodeRISKPOLICYREJECTED = "RISK_POLICY_REJECTED" WithdrawalFailureReasonCodeWITHDRAWALFAILUREREASONUNAVAILABLE = "WITHDRAWAL_FAILURE_REASON_UNAVAILABLE" WithdrawalFailureReasonCodeWITHDRAWALLIMITREACHED = "WITHDRAWAL_LIMIT_REACHED" WithdrawalFailureReasonCodeWITHDRAWALTEMPORARILYUNAVAILABLE = "WITHDRAWAL_TEMPORARILY_UNAVAILABLE" WithdrawalPixDestinationKeyTypeCNPJ = "CNPJ" WithdrawalPixDestinationKeyTypeEMAIL = "EMAIL" WithdrawalPixDestinationKeyTypeEVP = "EVP" WithdrawalPixDestinationKeyTypePHONE = "PHONE" WithdrawalRequestedWebhookEventDataPaymentMethodBoleto = "boleto" WithdrawalRequestedWebhookEventDataPaymentMethodCreditCard = "credit_card" WithdrawalRequestedWebhookEventDataPaymentMethodDebit = "debit" WithdrawalRequestedWebhookEventDataPaymentMethodPix = "pix" WithdrawalStatusCANCELED = "CANCELED" WithdrawalStatusCOMPLETED = "COMPLETED" WithdrawalStatusFAILED = "FAILED" WithdrawalStatusPENDING = "PENDING" WithdrawalStatusPROCESSING = "PROCESSING" WithdrawalStatusUNKNOWN = "UNKNOWN" )
These constants preserve the environment and enum wire values published by the API.
const DefaultBaseURL = "https://api.raims.com"
DefaultBaseURL is the origin of the Raims public API.
const DefaultWebhookTolerance = 5 * time.Minute
DefaultWebhookTolerance is the allowed difference from the signing timestamp.
const Version = "0.2.0"
Version identifies this SDK in the HTTP User-Agent.
Variables ¶
This section is empty.
Functions ¶
func ConstructWebhookEvent ¶
func ConstructWebhookEvent(payload []byte, headers http.Header, secret string, tolerance time.Duration, now time.Time) (map[string]json.RawMessage, error)
ConstructWebhookEvent authenticates the original body before decoding its JSON object. Raw values preserve exact integers and unknown event fields.
func VerifyWebhookSignature ¶
func VerifyWebhookSignature(payload []byte, headers http.Header, secret string, tolerance time.Duration, now time.Time) error
VerifyWebhookSignature authenticates the original HTTP body bytes. A zero now uses the current time. Zero tolerance requires the same Unix second; it does not disable timestamp verification. Headers must occur exactly once. The caller must also check the event environment and durably deduplicate its ID.
Types ¶
type APIError ¶
type APIError struct {
// StatusCode is the failed HTTP status.
StatusCode int
// Code is the structured API code, or empty when no valid error envelope was received.
Code string
// Detail contains the structured error when the response envelope is valid.
Detail *Error
// Response contains the received HTTP metadata.
Response *Response
}
APIError is a non-success HTTP response. Inspect Code and Detail for handling. Error intentionally excludes response payloads and messages from logs.
type AccountContext ¶
type AccountContext struct {
Resource `json:"-"`
// CompanyID Identificador público da empresa na Raims.
CompanyID string `json:"company_id"`
// CompanyName Nome empresarial da conta, ou null quando não disponível.
CompanyName *string `json:"company_name"`
// CompanyStatus Situação cadastral da empresa na Raims. As condições de cada operação continuam sendo verificadas na requisição.
CompanyStatus string `json:"company_status"`
// DataEnvironment Ambiente dos recursos acessados pela chave usada nesta consulta.
DataEnvironment string `json:"data_environment"`
// CheckedAt Instante da consulta, em segundos Unix UTC.
CheckedAt int64 `json:"checked_at"`
// AccessRevision Revisão do contexto consultado. Compare-a com outra resposta para reconhecer alterações de identidade, situação ou acesso. Não é uma autorização para executar operações.
AccessRevision string `json:"access_revision"`
// Currency Moeda dos valores financeiros em reais.
Currency string `json:"currency"`
// AmountUnit Unidade dos valores monetários inteiros: cents representa centavos de real.
AmountUnit string `json:"amount_unit"`
// TimestampUnit Formato dos instantes: unix_seconds representa segundos Unix UTC.
TimestampUnit string `json:"timestamp_unit"`
// BusinessTimezone Fuso usado nas datas e janelas de negócio da conta.
BusinessTimezone string `json:"business_timezone"`
}
AccountContext Identidade e referências de interpretação da conta autenticada. Não inclui credenciais, dados bancários ou identidade de usuário.
func (AccountContext) MarshalJSON ¶
func (v AccountContext) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AccountContext) UnmarshalJSON ¶
func (v *AccountContext) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AccountContext response.
type AccountFee ¶
type AccountFee struct {
Resource `json:"-"`
// PercentageRate Percentual da tarifa. Por exemplo, 0.8 representa 0,8%. Retorna null quando não houver parcela percentual informada.
PercentageRate *json.Number `json:"percentage_rate"`
// FixedFeeCents Parcela fixa da tarifa, em centavos de real. Por exemplo, 85 representa R$ 0,85. Retorna null quando não houver parcela fixa informada.
FixedFeeCents *int64 `json:"fixed_fee_cents"`
// MinimumFeeCents Valor mínimo da tarifa, em centavos de real, ou null quando não houver mínimo informado.
MinimumFeeCents *int64 `json:"minimum_fee_cents"`
// MaximumFeeCents Valor máximo da tarifa, em centavos de real, ou null quando não houver máximo informado.
MaximumFeeCents *int64 `json:"maximum_fee_cents"`
}
AccountFee Componentes da tarifa vigente. As parcelas percentual e fixa podem estar presentes na mesma condição comercial.
func (AccountFee) MarshalJSON ¶
func (v AccountFee) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AccountFee) UnmarshalJSON ¶
func (v *AccountFee) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AccountFee response.
type AccountFees ¶
type AccountFees struct {
Resource `json:"-"`
// Pix Condições vigentes para Pix, ou null quando não houver regra vigente para o plano selecionado.
Pix *AccountFee `json:"pix"`
// Boleto Condições vigentes para boleto, ou null quando não houver regra vigente para o plano selecionado.
Boleto *AccountFee `json:"boleto"`
}
AccountFees Condições comerciais atuais da empresa. A consulta não altera o plano e não informa tarifas aplicadas a pagamentos anteriores.
func (AccountFees) MarshalJSON ¶
func (v AccountFees) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AccountFees) UnmarshalJSON ¶
func (v *AccountFees) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AccountFees response.
type AccountNumber ¶
type AccountNumber struct {
Resource `json:"-"`
// Agency Agência da conta financeira, preservando os zeros à esquerda.
Agency string `json:"agency"`
// Account Número da conta financeira conforme o cadastro, preservando os zeros à esquerda e a formatação retornada.
Account string `json:"account"`
}
AccountNumber Dados da conta financeira da própria empresa na Raims. A consulta não cadastra uma conta nem altera o destino dos saques.
func (AccountNumber) MarshalJSON ¶
func (v AccountNumber) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AccountNumber) UnmarshalJSON ¶
func (v *AccountNumber) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AccountNumber response.
type AccountRestoredWebhookEvent ¶ added in v0.2.0
type AccountRestoredWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data AccountRestoredWebhookEventData `json:"data"`
}
AccountRestoredWebhookEvent contains the fields defined by the public API.
func (AccountRestoredWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v AccountRestoredWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AccountRestoredWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *AccountRestoredWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AccountRestoredWebhookEvent response.
type AccountRestoredWebhookEventData ¶ added in v0.2.0
type AccountRestoredWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
AccountRestoredWebhookEventData contains the fields defined by the public API.
func (AccountRestoredWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v AccountRestoredWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AccountRestoredWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *AccountRestoredWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AccountRestoredWebhookEventData response.
type AccountsService ¶
type AccountsService struct {
// contains filtered or unexported fields
}
AccountsService provides the endpoints available through Client.Accounts.
func (*AccountsService) CreateCheckoutFaviconUpload ¶
func (s *AccountsService) CreateCheckoutFaviconUpload(ctx context.Context, params *CreateCheckoutFaviconUploadParams, options ...RequestOption) (*CheckoutAssetUpload, error)
CreateCheckoutFaviconUpload Preparar envio do ícone
func (*AccountsService) CreateCheckoutLogoUpload ¶
func (s *AccountsService) CreateCheckoutLogoUpload(ctx context.Context, params *CreateCheckoutLogoUploadParams, options ...RequestOption) (*CheckoutAssetUpload, error)
CreateCheckoutLogoUpload Preparar envio da logo
func (*AccountsService) DeleteCheckoutAssetUpload ¶
func (s *AccountsService) DeleteCheckoutAssetUpload(ctx context.Context, id string, options ...RequestOption) (*CheckoutAssetUploadDeleted, error)
DeleteCheckoutAssetUpload Descartar envio de imagem
func (*AccountsService) GetCheckoutSettings ¶
func (s *AccountsService) GetCheckoutSettings(ctx context.Context, options ...RequestOption) (*CheckoutSettings, error)
GetCheckoutSettings Consultar personalização do checkout
func (*AccountsService) GetContext ¶
func (s *AccountsService) GetContext(ctx context.Context, options ...RequestOption) (*AccountContext, error)
GetContext Consultar contexto da conta
func (*AccountsService) GetFees ¶
func (s *AccountsService) GetFees(ctx context.Context, options ...RequestOption) (*AccountFees, error)
GetFees Consultar tarifas da conta
func (*AccountsService) GetNumber ¶
func (s *AccountsService) GetNumber(ctx context.Context, options ...RequestOption) (*AccountNumber, error)
GetNumber Recuperar número de conta
func (*AccountsService) UpdateCheckoutSettings ¶
func (s *AccountsService) UpdateCheckoutSettings(ctx context.Context, params *UpdateCheckoutSettingsParams, options ...RequestOption) (*CheckoutSettings, error)
UpdateCheckoutSettings Atualizar personalização do checkout
type AutomaticWithdrawalSettings ¶
type AutomaticWithdrawalSettings struct {
Resource `json:"-"`
// Enabled Indica se a tentativa diária de saque está ativa.
Enabled bool `json:"enabled"`
// MinimumAmountCents Saldo mínimo para tentar o saque, em centavos de real. O valor retirado depende do saldo disponível e do limite Pix restante.
MinimumAmountCents int64 `json:"minimum_amount_cents"`
// Time Horário diário no formato HH:mm, pelo fuso de São Paulo.
Time string `json:"time"`
// NextExecutionAt Próxima tentativa prevista, em segundos Unix UTC, ou null quando não houver uma programada. Esse instante não confirma uma transferência.
NextExecutionAt *int64 `json:"next_execution_at"`
}
AutomaticWithdrawalSettings Configuração da tentativa diária de saque para o destino próprio da empresa.
func (AutomaticWithdrawalSettings) MarshalJSON ¶
func (v AutomaticWithdrawalSettings) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*AutomaticWithdrawalSettings) UnmarshalJSON ¶
func (v *AutomaticWithdrawalSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public AutomaticWithdrawalSettings response.
type Balance ¶
type Balance struct {
Resource `json:"-"`
// TotalAmountCents Saldo total atual, em centavos de real, incluindo a parcela bloqueada. Pode ser negativo quando houver débitos superiores ao saldo.
TotalAmountCents int64 `json:"total_amount_cents"`
// BlockedAmountCents Parcela do saldo bloqueada, em centavos de real.
BlockedAmountCents int64 `json:"blocked_amount_cents"`
// AvailableAmountCents Saldo total menos o bloqueado, em centavos de real, com mínimo de zero. A realização de saques e estornos também depende das regras de cada recurso.
AvailableAmountCents int64 `json:"available_amount_cents"`
}
Balance Valores atuais da conta, separados entre total, bloqueado e disponível.
func (Balance) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Balance) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Balance response.
type BalanceForecast ¶
type BalanceForecast struct {
Resource `json:"-"`
// Period Período consultado, incluindo hoje e os dias anteriores conforme a opção.
Period string `json:"period"`
// StartAt Início incluído do período, em segundos Unix UTC.
StartAt int64 `json:"start_at"`
// EndAt Fim excluído do período, em segundos Unix UTC.
EndAt int64 `json:"end_at"`
// ForecastDate Dia de referência da estimativa: meia-noite de hoje em São Paulo, em segundos Unix UTC.
ForecastDate int64 `json:"forecast_date"`
// ReceivableAmountCents Valor dos pagamentos ainda considerados previstos para recebimento no período, em centavos de real. Não inclui cobranças abertas por vencer.
ReceivableAmountCents int64 `json:"receivable_amount_cents"`
// ProjectedBalanceCents Soma do saldo total atual com os recebimentos previstos, em centavos de real. Pode incluir valores bloqueados; não representa saldo disponível para saque.
ProjectedBalanceCents int64 `json:"projected_balance_cents"`
// UpdatedAt Última atualização dos dados da previsão, em segundos Unix UTC, ou null quando não estiver disponível.
UpdatedAt *int64 `json:"updated_at"`
}
BalanceForecast Estimativa financeira do período. Os valores não comprovam liquidação bancária nem disponibilidade para saque.
func (BalanceForecast) MarshalJSON ¶
func (v BalanceForecast) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BalanceForecast) UnmarshalJSON ¶
func (v *BalanceForecast) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BalanceForecast response.
type BalanceHoldCreatedWebhookEvent ¶ added in v0.2.0
type BalanceHoldCreatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BalanceHoldCreatedWebhookEventData `json:"data"`
}
BalanceHoldCreatedWebhookEvent contains the fields defined by the public API.
func (BalanceHoldCreatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BalanceHoldCreatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BalanceHoldCreatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BalanceHoldCreatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BalanceHoldCreatedWebhookEvent response.
type BalanceHoldCreatedWebhookEventData ¶ added in v0.2.0
type BalanceHoldCreatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
BalanceHoldCreatedWebhookEventData contains the fields defined by the public API.
func (BalanceHoldCreatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BalanceHoldCreatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BalanceHoldCreatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BalanceHoldCreatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BalanceHoldCreatedWebhookEventData response.
type BalanceHoldReleasedWebhookEvent ¶ added in v0.2.0
type BalanceHoldReleasedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BalanceHoldReleasedWebhookEventData `json:"data"`
}
BalanceHoldReleasedWebhookEvent contains the fields defined by the public API.
func (BalanceHoldReleasedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BalanceHoldReleasedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BalanceHoldReleasedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BalanceHoldReleasedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BalanceHoldReleasedWebhookEvent response.
type BalanceHoldReleasedWebhookEventData ¶ added in v0.2.0
type BalanceHoldReleasedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
BalanceHoldReleasedWebhookEventData contains the fields defined by the public API.
func (BalanceHoldReleasedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BalanceHoldReleasedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BalanceHoldReleasedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BalanceHoldReleasedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BalanceHoldReleasedWebhookEventData response.
type BalancesService ¶
type BalancesService struct {
// contains filtered or unexported fields
}
BalancesService provides the endpoints available through Client.Balances.
func (*BalancesService) Forecast ¶
func (s *BalancesService) Forecast(ctx context.Context, params *GetBalanceForecastParams, options ...RequestOption) (*BalanceForecast, error)
Forecast Consultar recebimentos previstos
func (*BalancesService) Get ¶
func (s *BalancesService) Get(ctx context.Context, options ...RequestOption) (*Balance, error)
Get Recuperar saldo atual
type BoletoAvailableWebhookEvent ¶ added in v0.2.0
type BoletoAvailableWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BoletoAvailableWebhookEventData `json:"data"`
}
BoletoAvailableWebhookEvent contains the fields defined by the public API.
func (BoletoAvailableWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BoletoAvailableWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoAvailableWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoAvailableWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoAvailableWebhookEvent response.
type BoletoAvailableWebhookEventData ¶ added in v0.2.0
type BoletoAvailableWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
BoletoAvailableWebhookEventData contains the fields defined by the public API.
func (BoletoAvailableWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BoletoAvailableWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoAvailableWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoAvailableWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoAvailableWebhookEventData response.
type BoletoCompensatedWebhookEvent ¶ added in v0.2.0
type BoletoCompensatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BoletoCompensatedWebhookEventData `json:"data"`
}
BoletoCompensatedWebhookEvent contains the fields defined by the public API.
func (BoletoCompensatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BoletoCompensatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoCompensatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoCompensatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoCompensatedWebhookEvent response.
type BoletoCompensatedWebhookEventData ¶ added in v0.2.0
type BoletoCompensatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
BoletoCompensatedWebhookEventData contains the fields defined by the public API.
func (BoletoCompensatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BoletoCompensatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoCompensatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoCompensatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoCompensatedWebhookEventData response.
type BoletoIssuanceFailedWebhookEvent ¶ added in v0.2.0
type BoletoIssuanceFailedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BoletoIssuanceFailedWebhookEventData `json:"data"`
}
BoletoIssuanceFailedWebhookEvent contains the fields defined by the public API.
func (BoletoIssuanceFailedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BoletoIssuanceFailedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoIssuanceFailedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoIssuanceFailedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoIssuanceFailedWebhookEvent response.
type BoletoIssuanceFailedWebhookEventData ¶ added in v0.2.0
type BoletoIssuanceFailedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
BoletoIssuanceFailedWebhookEventData contains the fields defined by the public API.
func (BoletoIssuanceFailedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BoletoIssuanceFailedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoIssuanceFailedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoIssuanceFailedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoIssuanceFailedWebhookEventData response.
type BoletoOverpaymentReceivedWebhookEvent ¶ added in v0.2.0
type BoletoOverpaymentReceivedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BoletoOverpaymentReceivedWebhookEventData `json:"data"`
}
BoletoOverpaymentReceivedWebhookEvent contains the fields defined by the public API.
func (BoletoOverpaymentReceivedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BoletoOverpaymentReceivedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoOverpaymentReceivedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoOverpaymentReceivedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoOverpaymentReceivedWebhookEvent response.
type BoletoOverpaymentReceivedWebhookEventData ¶ added in v0.2.0
type BoletoOverpaymentReceivedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// StatementID is defined by the public API.
StatementID *string `json:"statement_id"`
// CreditDeltaCents is defined by the public API.
CreditDeltaCents *int64 `json:"credit_delta_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
BoletoOverpaymentReceivedWebhookEventData contains the fields defined by the public API.
func (BoletoOverpaymentReceivedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BoletoOverpaymentReceivedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoOverpaymentReceivedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoOverpaymentReceivedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoOverpaymentReceivedWebhookEventData response.
type BoletoPartialSettlementDetectedWebhookEvent ¶ added in v0.2.0
type BoletoPartialSettlementDetectedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data BoletoPartialSettlementDetectedWebhookEventData `json:"data"`
}
BoletoPartialSettlementDetectedWebhookEvent contains the fields defined by the public API.
func (BoletoPartialSettlementDetectedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v BoletoPartialSettlementDetectedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoPartialSettlementDetectedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoPartialSettlementDetectedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoPartialSettlementDetectedWebhookEvent response.
type BoletoPartialSettlementDetectedWebhookEventData ¶ added in v0.2.0
type BoletoPartialSettlementDetectedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
BoletoPartialSettlementDetectedWebhookEventData contains the fields defined by the public API.
func (BoletoPartialSettlementDetectedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v BoletoPartialSettlementDetectedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*BoletoPartialSettlementDetectedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *BoletoPartialSettlementDetectedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public BoletoPartialSettlementDetectedWebhookEventData response.
type Charge ¶
type Charge struct {
Resource `json:"-"`
// ID Identificador público da cobrança.
ID string `json:"id"`
// CustomerID Identificador público do cliente vinculado.
CustomerID string `json:"customer_id"`
// AmountCents Valor da cobrança em centavos de real.
AmountCents int64 `json:"amount_cents"`
// PaymentMethod Meio de pagamento da cobrança: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. O valor 0 pode mudar para 1 ou 2 quando o Pix ou boleto é gerado no checkout. A escolha do checkout aparece separadamente em checkout_payment_method.
PaymentMethod int64 `json:"payment_method"`
// CheckoutPaymentMethod Meio de pagamento informado pelo checkout: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. null quando essa informação ainda não estiver disponível. A seleção de uma opção na tela não confirma a geração do pagamento nem que a cobrança foi paga.
CheckoutPaymentMethod *int64 `json:"checkout_payment_method"`
// DueDate Vencimento da cobrança em segundos Unix UTC.
DueDate int64 `json:"due_date"`
// Title Título da cobrança, ou null quando não informado.
Title *string `json:"title"`
// Description Descrição da cobrança, ou null quando não informada.
Description *string `json:"description"`
// Status Status da cobrança, considerando o vencimento. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho.
Status int64 `json:"status"`
// CreatedAt Instante de criação em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// CheckoutURL Link para o pagador abrir o checkout, ou null quando não houver link disponível.
CheckoutURL *string `json:"checkout_url"`
// IsPayable Indica se a cobrança pode ser paga. Os dados de Pix ou boleto ainda podem estar ausentes em payment_information; consulte status para acompanhar o pagamento.
IsPayable bool `json:"is_payable"`
// PaymentInformation Instruções de pagamento e resultado da emissão de Pix ou boleto. pix e boleto são null quando os dados não estão disponíveis.
PaymentInformation ChargePaymentInformation `json:"payment_information"`
// PaymentMethodTypes Lista de meios configurada para a cobrança, ou null quando ela usa a configuração de checkout herdada. 1 significa Pix e 2 significa boleto. A lista não muda com o meio usado no pagamento nem representa a disponibilidade momentânea do checkout.
PaymentMethodTypes *[]int64 `json:"payment_method_types"`
// ExternalReference Referência do pedido ou da cobrança no seu sistema, ou null quando não informada. É independente da referência do cliente e pode ser repetida em outras cobranças.
ExternalReference *string `json:"external_reference"`
// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
Metadata map[string]string `json:"metadata"`
// BoletoSettlement is defined by the public API.
BoletoSettlement *ChargeBoletoSettlement `json:"boleto_settlement"`
}
Charge contains the fields defined by the public API.
func (Charge) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Charge) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Charge response.
type ChargeBoletoCompensation ¶
type ChargeBoletoCompensation struct {
Resource `json:"-"`
// ChargeID ID público da cobrança simulada. Use o mesmo identificador ao consultar os resultados.
ChargeID string `json:"charge_id"`
// Status Estado da cobrança enquanto o boleto aguarda liquidação. A compensação não equivale a status pago.
Status int64 `json:"status"`
// AmountCents Valor do boleto em centavos de real. Informar esse valor não confirma crédito no saldo.
AmountCents int64 `json:"amount_cents"`
// Duplicate Indica que a cobrança já tinha o mesmo resultado. Nesse caso, a simulação não repete o efeito financeiro.
Duplicate bool `json:"duplicate"`
}
ChargeBoletoCompensation Resultado da compensação simulada do boleto, sem confirmação de crédito.
func (ChargeBoletoCompensation) MarshalJSON ¶
func (v ChargeBoletoCompensation) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeBoletoCompensation) UnmarshalJSON ¶
func (v *ChargeBoletoCompensation) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeBoletoCompensation response.
type ChargeBoletoPaymentInformation ¶
type ChargeBoletoPaymentInformation struct {
Resource `json:"-"`
// LineDigits Linha digitável de 47 dígitos do boleto emitido.
LineDigits string `json:"line_digits"`
// Barcode Código de barras de 44 dígitos do boleto emitido.
Barcode string `json:"barcode"`
// DueDate Vencimento do boleto em segundos Unix UTC.
DueDate int64 `json:"due_date"`
}
ChargeBoletoPaymentInformation contains the fields defined by the public API.
func (ChargeBoletoPaymentInformation) MarshalJSON ¶
func (v ChargeBoletoPaymentInformation) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeBoletoPaymentInformation) UnmarshalJSON ¶
func (v *ChargeBoletoPaymentInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeBoletoPaymentInformation response.
type ChargeBoletoSettlement ¶ added in v0.2.0
type ChargeBoletoSettlement struct {
Resource `json:"-"`
// ObservedAmountCents is defined by the public API.
ObservedAmountCents *int64 `json:"observed_amount_cents"`
// ConfirmedTotalCents is defined by the public API.
ConfirmedTotalCents *int64 `json:"confirmed_total_cents"`
// OverpaymentCents is defined by the public API.
OverpaymentCents *int64 `json:"overpayment_cents"`
}
ChargeBoletoSettlement contains the fields defined by the public API.
func (ChargeBoletoSettlement) MarshalJSON ¶ added in v0.2.0
func (v ChargeBoletoSettlement) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeBoletoSettlement) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeBoletoSettlement) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeBoletoSettlement response.
type ChargeCanceledWebhookEvent ¶ added in v0.2.0
type ChargeCanceledWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargeCanceledWebhookEventData `json:"data"`
}
ChargeCanceledWebhookEvent contains the fields defined by the public API.
func (ChargeCanceledWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargeCanceledWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeCanceledWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeCanceledWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeCanceledWebhookEvent response.
type ChargeCanceledWebhookEventData ¶ added in v0.2.0
type ChargeCanceledWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargeCanceledWebhookEventData contains the fields defined by the public API.
func (ChargeCanceledWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargeCanceledWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeCanceledWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeCanceledWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeCanceledWebhookEventData response.
type ChargeCreated ¶
type ChargeCreated struct {
Resource `json:"-"`
// ID Identificador público da cobrança criada.
ID string `json:"id"`
// CustomerID Identificador público do cliente vinculado.
CustomerID string `json:"customer_id"`
// AmountCents Valor da cobrança em centavos de real.
AmountCents int64 `json:"amount_cents"`
// PaymentMethod Meio da cobrança. Com lista própria, retorna 0 até a emissão do pagamento. Sem lista, 1 solicita Pix direto e 2 solicita boleto direto. A lista de meios permanece separada da escolha registrada.
PaymentMethod int64 `json:"payment_method"`
// DueDate Vencimento da cobrança em segundos Unix UTC.
DueDate int64 `json:"due_date"`
// Title Título da cobrança, ou null quando não informado.
Title *string `json:"title"`
// Description Descrição da cobrança, ou null quando não informada.
Description *string `json:"description"`
// Status Status da cobrança, considerando o vencimento. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho.
Status int64 `json:"status"`
// CreatedAt Instante de criação em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// CheckoutURL Link para o pagador abrir o checkout. É retornado quando create_checkout ou send_email é true, ou uma URL de retorno é informada; nos demais casos, é null. O link não comprova pagamento nem entrega de e-mail.
CheckoutURL *string `json:"checkout_url"`
// PaymentMethodTypes Lista de meios configurada para a cobrança, ou null quando ela usa a configuração de checkout herdada. 1 significa Pix e 2 significa boleto. A lista não muda com o meio usado no pagamento nem representa a disponibilidade momentânea do checkout.
PaymentMethodTypes *[]int64 `json:"payment_method_types"`
// ExternalReference Referência do pedido ou da cobrança no seu sistema, ou null quando não informada. É independente da referência do cliente e pode ser repetida em outras cobranças.
ExternalReference *string `json:"external_reference"`
// PaymentInformation Instruções de pagamento e resultado da emissão de Pix ou boleto. Sem lista própria, payment_method 1 solicita Pix e 2 solicita boleto. Confira pix_status ou boleto_status e os dados do meio solicitado.
PaymentInformation ChargePaymentInformation `json:"payment_information"`
// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
Metadata map[string]string `json:"metadata"`
}
ChargeCreated contains the fields defined by the public API.
func (ChargeCreated) MarshalJSON ¶
func (v ChargeCreated) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeCreated) UnmarshalJSON ¶
func (v *ChargeCreated) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeCreated response.
type ChargeCreatedWebhookEvent ¶ added in v0.2.0
type ChargeCreatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargeCreatedWebhookEventData `json:"data"`
}
ChargeCreatedWebhookEvent contains the fields defined by the public API.
func (ChargeCreatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargeCreatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeCreatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeCreatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeCreatedWebhookEvent response.
type ChargeCreatedWebhookEventData ¶ added in v0.2.0
type ChargeCreatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargeCreatedWebhookEventData contains the fields defined by the public API.
func (ChargeCreatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargeCreatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeCreatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeCreatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeCreatedWebhookEventData response.
type ChargeExpiredWebhookEvent ¶ added in v0.2.0
type ChargeExpiredWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargeExpiredWebhookEventData `json:"data"`
}
ChargeExpiredWebhookEvent contains the fields defined by the public API.
func (ChargeExpiredWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargeExpiredWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeExpiredWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeExpiredWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeExpiredWebhookEvent response.
type ChargeExpiredWebhookEventData ¶ added in v0.2.0
type ChargeExpiredWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargeExpiredWebhookEventData contains the fields defined by the public API.
func (ChargeExpiredWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargeExpiredWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeExpiredWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeExpiredWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeExpiredWebhookEventData response.
type ChargeFailedWebhookEvent ¶ added in v0.2.0
type ChargeFailedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargeFailedWebhookEventData `json:"data"`
}
ChargeFailedWebhookEvent contains the fields defined by the public API.
func (ChargeFailedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargeFailedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeFailedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeFailedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeFailedWebhookEvent response.
type ChargeFailedWebhookEventData ¶ added in v0.2.0
type ChargeFailedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargeFailedWebhookEventData contains the fields defined by the public API.
func (ChargeFailedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargeFailedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeFailedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeFailedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeFailedWebhookEventData response.
type ChargeFullyRefundedWebhookEvent ¶ added in v0.2.0
type ChargeFullyRefundedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargeFullyRefundedWebhookEventData `json:"data"`
}
ChargeFullyRefundedWebhookEvent contains the fields defined by the public API.
func (ChargeFullyRefundedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargeFullyRefundedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeFullyRefundedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeFullyRefundedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeFullyRefundedWebhookEvent response.
type ChargeFullyRefundedWebhookEventData ¶ added in v0.2.0
type ChargeFullyRefundedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargeFullyRefundedWebhookEventData contains the fields defined by the public API.
func (ChargeFullyRefundedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargeFullyRefundedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeFullyRefundedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeFullyRefundedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeFullyRefundedWebhookEventData response.
type ChargeListItem ¶
type ChargeListItem struct {
Resource `json:"-"`
// ID Identificador público da cobrança.
ID string `json:"id"`
// CustomerID Identificador público do cliente vinculado.
CustomerID string `json:"customer_id"`
// AmountCents Valor da cobrança em centavos de real.
AmountCents int64 `json:"amount_cents"`
// PaymentMethod Meio de pagamento da cobrança: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. O valor 0 pode mudar para 1 ou 2 quando o Pix ou boleto é gerado no checkout. A escolha do checkout aparece separadamente em checkout_payment_method.
PaymentMethod int64 `json:"payment_method"`
// CheckoutPaymentMethod Meio de pagamento informado pelo checkout: 0 indefinido, 1 Pix, 2 boleto, 3 cartão de crédito e 4 cartão de débito. null quando essa informação ainda não estiver disponível. A seleção de uma opção na tela não confirma a geração do pagamento nem que a cobrança foi paga.
CheckoutPaymentMethod *int64 `json:"checkout_payment_method"`
// DueDate Vencimento da cobrança em segundos Unix UTC.
DueDate int64 `json:"due_date"`
// Title Título da cobrança, ou null quando não informado.
Title *string `json:"title"`
// Description Descrição da cobrança, ou null quando não informada.
Description *string `json:"description"`
// Status Status da cobrança, considerando o vencimento. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho.
Status int64 `json:"status"`
// CreatedAt Instante de criação em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// CheckoutURL Link para o pagador abrir o checkout, ou null quando não houver link disponível.
CheckoutURL *string `json:"checkout_url"`
// PaymentMethodTypes Lista de meios configurada para a cobrança, ou null quando ela usa a configuração de checkout herdada. 1 significa Pix e 2 significa boleto. A lista não muda com o meio usado no pagamento nem representa a disponibilidade momentânea do checkout.
PaymentMethodTypes *[]int64 `json:"payment_method_types"`
// ExternalReference Referência do pedido ou da cobrança no seu sistema, ou null quando não informada. É independente da referência do cliente e pode ser repetida em outras cobranças.
ExternalReference *string `json:"external_reference"`
// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
Metadata map[string]string `json:"metadata"`
}
ChargeListItem contains the fields defined by the public API.
func (ChargeListItem) MarshalJSON ¶
func (v ChargeListItem) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeListItem) UnmarshalJSON ¶
func (v *ChargeListItem) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeListItem response.
type ChargeListPage ¶
type ChargeListPage struct {
Resource `json:"-"`
// PageSize Tamanho de página aplicado à consulta.
PageSize int64 `json:"page_size"`
// HasNext Indica se há cobranças na próxima página.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há cobranças na página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para continuar com after; null quando não há próxima página.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para voltar com before; null quando não há página anterior.
PreviousBefore *string `json:"previous_before"`
}
ChargeListPage contains the fields defined by the public API.
func (ChargeListPage) MarshalJSON ¶
func (v ChargeListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeListPage) UnmarshalJSON ¶
func (v *ChargeListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeListPage response.
type ChargeListResponse ¶
type ChargeListResponse struct {
Resource `json:"-"`
// List Cobranças encontradas na empresa e no ambiente autenticado.
List []ChargeListItem `json:"list"`
// Page Informações para continuar ou voltar na listagem.
Page ChargeListPage `json:"page"`
}
ChargeListResponse contains the fields defined by the public API.
func (ChargeListResponse) MarshalJSON ¶
func (v ChargeListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeListResponse) NextPage ¶
func (v *ChargeListResponse) NextPage(ctx context.Context) (*ChargeListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*ChargeListResponse) PreviousPage ¶
func (v *ChargeListResponse) PreviousPage(ctx context.Context) (*ChargeListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*ChargeListResponse) UnmarshalJSON ¶
func (v *ChargeListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeListResponse response.
type ChargePaidWebhookEvent ¶ added in v0.2.0
type ChargePaidWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargePaidWebhookEventData `json:"data"`
}
ChargePaidWebhookEvent contains the fields defined by the public API.
func (ChargePaidWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargePaidWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaidWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePaidWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaidWebhookEvent response.
type ChargePaidWebhookEventData ¶ added in v0.2.0
type ChargePaidWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// StatementID is defined by the public API.
StatementID *string `json:"statement_id"`
// PaidAmountCents is defined by the public API.
PaidAmountCents *int64 `json:"paid_amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
ChargePaidWebhookEventData contains the fields defined by the public API.
func (ChargePaidWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargePaidWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaidWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePaidWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaidWebhookEventData response.
type ChargePartiallyRefundedWebhookEvent ¶ added in v0.2.0
type ChargePartiallyRefundedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargePartiallyRefundedWebhookEventData `json:"data"`
}
ChargePartiallyRefundedWebhookEvent contains the fields defined by the public API.
func (ChargePartiallyRefundedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargePartiallyRefundedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePartiallyRefundedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePartiallyRefundedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePartiallyRefundedWebhookEvent response.
type ChargePartiallyRefundedWebhookEventData ¶ added in v0.2.0
type ChargePartiallyRefundedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargePartiallyRefundedWebhookEventData contains the fields defined by the public API.
func (ChargePartiallyRefundedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargePartiallyRefundedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePartiallyRefundedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePartiallyRefundedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePartiallyRefundedWebhookEventData response.
type ChargePaymentInformation ¶
type ChargePaymentInformation struct {
Resource `json:"-"`
// Pix Dados do Pix para pagamento, ou null quando não disponíveis.
Pix *ChargePixPaymentInformation `json:"pix"`
// Boleto Dados do boleto para pagamento, ou null quando não disponíveis.
Boleto *ChargeBoletoPaymentInformation `json:"boleto"`
// PixStatus Resultado da emissão do Pix: not_generated quando não há emissão disponível ou solicitada; available quando os dados estão disponíveis; pending enquanto não há resultado confirmado; failed quando não foi possível emitir.
PixStatus string `json:"pix_status"`
// PixError Motivo da pendência ou da falha de emissão do Pix, ou null. Guarde o ID da cobrança e use a consulta individual para acompanhar. Se a condição persistir, entre em contato com o suporte; não repita a criação para tentar emitir o Pix.
PixError *Error `json:"pix_error"`
// BoletoStatus Resultado da emissão do boleto: not_generated quando não há emissão disponível ou solicitada; available quando os dados estão disponíveis; pending enquanto não há resultado confirmado; failed quando não foi possível emitir.
BoletoStatus string `json:"boleto_status"`
// BoletoError Motivo da pendência ou da falha de emissão do boleto, ou null. Guarde o ID da cobrança e use a consulta individual para acompanhar. Se a condição persistir, entre em contato com o suporte; não repita a criação para tentar emitir o boleto.
BoletoError *Error `json:"boleto_error"`
// BoletoPaymentStatus Andamento do pagamento do boleto: awaiting_payment aguarda pagamento, compensated aguarda liquidação e settled confirma a liquidação. Null quando não há andamento disponível. A compensação ainda não representa crédito disponível.
BoletoPaymentStatus *string `json:"boleto_payment_status"`
}
ChargePaymentInformation contains the fields defined by the public API.
func (ChargePaymentInformation) MarshalJSON ¶
func (v ChargePaymentInformation) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaymentInformation) UnmarshalJSON ¶
func (v *ChargePaymentInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaymentInformation response.
type ChargePaymentInstructionsAvailableWebhookEvent ¶ added in v0.2.0
type ChargePaymentInstructionsAvailableWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargePaymentInstructionsAvailableWebhookEventData `json:"data"`
}
ChargePaymentInstructionsAvailableWebhookEvent contains the fields defined by the public API.
func (ChargePaymentInstructionsAvailableWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargePaymentInstructionsAvailableWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaymentInstructionsAvailableWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePaymentInstructionsAvailableWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaymentInstructionsAvailableWebhookEvent response.
type ChargePaymentInstructionsAvailableWebhookEventData ¶ added in v0.2.0
type ChargePaymentInstructionsAvailableWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod string `json:"payment_method"`
}
ChargePaymentInstructionsAvailableWebhookEventData contains the fields defined by the public API.
func (ChargePaymentInstructionsAvailableWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargePaymentInstructionsAvailableWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaymentInstructionsAvailableWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePaymentInstructionsAvailableWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaymentInstructionsAvailableWebhookEventData response.
type ChargePaymentInstructionsFailedWebhookEvent ¶ added in v0.2.0
type ChargePaymentInstructionsFailedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargePaymentInstructionsFailedWebhookEventData `json:"data"`
}
ChargePaymentInstructionsFailedWebhookEvent contains the fields defined by the public API.
func (ChargePaymentInstructionsFailedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargePaymentInstructionsFailedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaymentInstructionsFailedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePaymentInstructionsFailedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaymentInstructionsFailedWebhookEvent response.
type ChargePaymentInstructionsFailedWebhookEventData ¶ added in v0.2.0
type ChargePaymentInstructionsFailedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod string `json:"payment_method"`
}
ChargePaymentInstructionsFailedWebhookEventData contains the fields defined by the public API.
func (ChargePaymentInstructionsFailedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargePaymentInstructionsFailedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePaymentInstructionsFailedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargePaymentInstructionsFailedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePaymentInstructionsFailedWebhookEventData response.
type ChargePixPaymentInformation ¶
type ChargePixPaymentInformation struct {
Resource `json:"-"`
// CopyPaste Código Pix copia e cola para pagar a cobrança.
CopyPaste string `json:"copy_paste"`
// ExpiresAt Expiração do código Pix em segundos Unix UTC.
ExpiresAt int64 `json:"expires_at"`
// QrCodeBase64 Imagem PNG do QR Code em Base64, sem prefixo de data URI. Para exibir no navegador, acrescente data:image/png;base64, antes do valor.
QrCodeBase64 string `json:"qr_code_base64"`
}
ChargePixPaymentInformation contains the fields defined by the public API.
func (ChargePixPaymentInformation) MarshalJSON ¶
func (v ChargePixPaymentInformation) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargePixPaymentInformation) UnmarshalJSON ¶
func (v *ChargePixPaymentInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargePixPaymentInformation response.
type ChargeRevocationPending ¶
type ChargeRevocationPending struct {
Resource `json:"-"`
// ID Identificador público da cobrança.
ID string `json:"id"`
// Status Status atual da cobrança, considerando o vencimento.
Status int64 `json:"status"`
// Revoked Indica que a revogação foi confirmada.
Revoked bool `json:"revoked"`
// RevocationPending Indica que o cancelamento ainda aguarda confirmação.
RevocationPending bool `json:"revocation_pending"`
}
ChargeRevocationPending contains the fields defined by the public API.
func (ChargeRevocationPending) MarshalJSON ¶
func (v ChargeRevocationPending) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeRevocationPending) UnmarshalJSON ¶
func (v *ChargeRevocationPending) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeRevocationPending response.
type ChargeRevoked ¶
type ChargeRevoked struct {
Resource `json:"-"`
// ID Identificador público da cobrança.
ID string `json:"id"`
// Status Estado atual da cobrança, considerando o vencimento.
Status int64 `json:"status"`
// Revoked Indica que a revogação foi confirmada.
Revoked bool `json:"revoked"`
// RevocationPending Indica que o cancelamento ainda aguarda confirmação.
RevocationPending bool `json:"revocation_pending"`
}
ChargeRevoked contains the fields defined by the public API.
func (ChargeRevoked) MarshalJSON ¶
func (v ChargeRevoked) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeRevoked) UnmarshalJSON ¶
func (v *ChargeRevoked) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeRevoked response.
type ChargeScenario ¶
type ChargeScenario struct {
Resource `json:"-"`
// ChargeID Identificador público da cobrança do Sandbox.
ChargeID string `json:"charge_id"`
// Action Ação do cenário: emissão de Pix, emissão de boleto ou cancelamento.
Action string `json:"action"`
// Outcome Resultado escolhido para a ação: pending, failed ou completed.
Outcome string `json:"outcome"`
// State Andamento do cenário: configured aguarda a ação; pending aguarda resolução; failed e completed são resultados finais.
State string `json:"state"`
// ChargeStatus Estado atual da cobrança, conforme os códigos do recurso Cobranças.
ChargeStatus int64 `json:"charge_status"`
// Duplicate Indica que o mesmo resultado já estava registrado, sem repetir a ação.
Duplicate bool `json:"duplicate"`
}
ChargeScenario Resultado da configuração ou resolução de um cenário do Sandbox.
func (ChargeScenario) MarshalJSON ¶
func (v ChargeScenario) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeScenario) UnmarshalJSON ¶
func (v *ChargeScenario) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeScenario response.
type ChargeScenarioParams ¶
type ChargeScenarioParams struct {
// Action Ação a testar: pix_issuance para emissão Pix, boleto_issuance para emissão de boleto ou cancellation para cancelamento. Para cancellation, mantenha a cobrança aberta com Pix ou boleto já emitido, sem confirmar o pagamento.
Action Optional[string] `json:"action,omitzero"`
// Outcome Resultado da ação: pending mantém a confirmação em aberto; failed apresenta uma falha.
Outcome Optional[string] `json:"outcome,omitzero"`
}
ChargeScenarioParams Cenário para a próxima emissão ou cancelamento da cobrança.
type ChargeSimulation ¶
type ChargeSimulation struct {
Resource `json:"-"`
// ChargeID ID público da cobrança simulada. Use o mesmo identificador ao consultar os resultados.
ChargeID string `json:"charge_id"`
// Status Estado registrado após a simulação: 4 corresponde a paga e 9 a falha.
Status int64 `json:"status"`
// AmountCents Valor da cobrança, em centavos de real. Confirmar o pagamento credita esse valor no saldo de teste uma única vez.
AmountCents int64 `json:"amount_cents"`
// Duplicate Indica que a cobrança já tinha o mesmo resultado. Nesse caso, a simulação não repete o efeito financeiro.
Duplicate bool `json:"duplicate"`
}
ChargeSimulation Resultado da simulação registrada na cobrança do Sandbox. Consulte saldo e extrato nos respectivos recursos.
func (ChargeSimulation) MarshalJSON ¶
func (v ChargeSimulation) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeSimulation) UnmarshalJSON ¶
func (v *ChargeSimulation) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeSimulation response.
type ChargeStatistics ¶
type ChargeStatistics struct {
Resource `json:"-"`
// Period Período considerado na consulta.
Period string `json:"period"`
// StartAt Início do período, incluído na consulta, em segundos Unix UTC. Corresponde à meia-noite de São Paulo no primeiro dia.
StartAt int64 `json:"start_at"`
// EndAt Fim do período, excluído da consulta, em segundos Unix UTC. Corresponde à meia-noite de São Paulo após o último dia.
EndAt int64 `json:"end_at"`
// Issued Cobranças criadas no período, independentemente do estado atual.
Issued ChargeStatisticsAggregate `json:"issued"`
// IssuedPaid Cobranças criadas no período que estão pagas ou devolvidas, parcial ou integralmente. O pagamento pode ter ocorrido depois da criação. Cobranças em contestação não entram neste total.
IssuedPaid ChargeStatisticsAggregate `json:"issued_paid"`
// Received Cobranças pagas ou devolvidas cujo pagamento ocorreu no período, mesmo que tenham sido criadas antes dele. Cobranças em contestação não entram neste total. Devoluções não são subtraídas. Não some este valor a issued_paid, pois um pagamento pode aparecer nos dois conjuntos.
Received ChargeStatisticsAggregate `json:"received"`
// PaymentRate Percentual de cobranças emitidas que foram pagas: issued_paid.count dividido por issued.count, multiplicado por 100. Usa até duas casas decimais e retorna zero quando não há cobranças emitidas.
PaymentRate json.Number `json:"payment_rate"`
// UpdatedAt Última atualização conhecida dos totais consultados, em segundos Unix UTC, ou null quando essa informação não estiver disponível.
UpdatedAt *int64 `json:"updated_at"`
}
ChargeStatistics Estatísticas de emissão e recebimento de cobranças no período. Cobranças canceladas permanecem no total emitido; cadastros excluídos não entram nos totais.
func (ChargeStatistics) MarshalJSON ¶
func (v ChargeStatistics) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeStatistics) UnmarshalJSON ¶
func (v *ChargeStatistics) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeStatistics response.
type ChargeStatisticsAggregate ¶
type ChargeStatisticsAggregate struct {
Resource `json:"-"`
// Count Quantidade de cobranças no conjunto.
Count int64 `json:"count"`
// AmountCents Soma dos valores das cobranças, em centavos de real, sem descontar tarifas ou devoluções.
AmountCents int64 `json:"amount_cents"`
}
ChargeStatisticsAggregate Quantidade de cobranças e soma dos seus valores brutos.
func (ChargeStatisticsAggregate) MarshalJSON ¶
func (v ChargeStatisticsAggregate) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeStatisticsAggregate) UnmarshalJSON ¶
func (v *ChargeStatisticsAggregate) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeStatisticsAggregate response.
type ChargeUpdatedWebhookEvent ¶ added in v0.2.0
type ChargeUpdatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data ChargeUpdatedWebhookEventData `json:"data"`
}
ChargeUpdatedWebhookEvent contains the fields defined by the public API.
func (ChargeUpdatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v ChargeUpdatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeUpdatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeUpdatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeUpdatedWebhookEvent response.
type ChargeUpdatedWebhookEventData ¶ added in v0.2.0
type ChargeUpdatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
ChargeUpdatedWebhookEventData contains the fields defined by the public API.
func (ChargeUpdatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v ChargeUpdatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ChargeUpdatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *ChargeUpdatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ChargeUpdatedWebhookEventData response.
type ChargesService ¶
type ChargesService struct {
// contains filtered or unexported fields
}
ChargesService provides the endpoints available through Client.Charges.
func (*ChargesService) Create ¶
func (s *ChargesService) Create(ctx context.Context, params *CreateChargeParams, options ...RequestOption) (*ChargeCreated, error)
Create Criar nova cobrança
func (*ChargesService) CreateRefund ¶
func (s *ChargesService) CreateRefund(ctx context.Context, id string, params *CreateRefundParams, options ...RequestOption) (*Refund, error)
CreateRefund Solicitar estorno
func (*ChargesService) Get ¶
func (s *ChargesService) Get(ctx context.Context, id string, options ...RequestOption) (*Charge, error)
Get Recuperar uma única cobrança
func (*ChargesService) GetBoleto ¶
func (s *ChargesService) GetBoleto(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)
GetBoleto Baixar boleto
func (*ChargesService) GetPayment ¶
func (s *ChargesService) GetPayment(ctx context.Context, id string, options ...RequestOption) (*PaymentReceipt, error)
GetPayment Consultar dados do pagamento
func (*ChargesService) GetReceipt ¶
func (s *ChargesService) GetReceipt(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)
GetReceipt Baixar recibo de pagamento
func (*ChargesService) GetRefundEligibility ¶
func (s *ChargesService) GetRefundEligibility(ctx context.Context, id string, options ...RequestOption) (*RefundEligibility, error)
GetRefundEligibility Consultar elegibilidade para estorno
func (*ChargesService) List ¶
func (s *ChargesService) List(ctx context.Context, params *ListChargesParams, options ...RequestOption) (*ChargeListResponse, error)
List Listar cobranças
func (*ChargesService) ListAll ¶
func (s *ChargesService) ListAll(ctx context.Context, params *ListChargesParams, options ...RequestOption) *Iterator[ChargeListItem]
ListAll lazily follows forward cursors and preserves the original filters.
func (*ChargesService) ListRefunds ¶
func (s *ChargesService) ListRefunds(ctx context.Context, id string, params *ListChargeRefundsParams, options ...RequestOption) (*RefundListResponse, error)
ListRefunds Listar estornos de uma cobrança
func (*ChargesService) ListRefundsAll ¶
func (s *ChargesService) ListRefundsAll(ctx context.Context, id string, params *ListChargeRefundsParams, options ...RequestOption) *Iterator[Refund]
ListRefundsAll lazily follows forward cursors and preserves the original filters.
func (*ChargesService) Revoke ¶
func (s *ChargesService) Revoke(ctx context.Context, id string, options ...RequestOption) (*RevokeChargeResult, error)
Revoke Revogar cobrança
func (*ChargesService) Statistics ¶
func (s *ChargesService) Statistics(ctx context.Context, params *GetChargeStatisticsParams, options ...RequestOption) (*ChargeStatistics, error)
Statistics Consultar estatísticas de cobranças
func (*ChargesService) Update ¶
func (s *ChargesService) Update(ctx context.Context, id string, params *UpdateChargeParams, options ...RequestOption) (*Charge, error)
Update Atualizar cobrança existente
type CheckoutAsset ¶
type CheckoutAsset struct {
Resource `json:"-"`
// URL Endereço da imagem atual, ou null quando não houver imagem disponível. Durante uma troca pendente ou com falha, conserva a imagem anterior, quando existir.
URL *string `json:"url"`
// Status Situação da imagem: absent quando não há imagem configurada; ready quando está disponível; pending durante o processamento; failed quando a alteração não pôde ser aplicada.
Status string `json:"status"`
// ErrorCode Código público da falha na aplicação da imagem, ou null quando não houver falha.
ErrorCode *string `json:"error_code"`
}
CheckoutAsset Endereço da imagem atual e andamento da última alteração solicitada.
func (CheckoutAsset) MarshalJSON ¶
func (v CheckoutAsset) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CheckoutAsset) UnmarshalJSON ¶
func (v *CheckoutAsset) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CheckoutAsset response.
type CheckoutAssetUpload ¶
type CheckoutAssetUpload struct {
Resource `json:"-"`
// ID Identificador do envio. Use-o no campo correspondente do PATCH depois de enviar o arquivo.
ID string `json:"id"`
// UploadURL URL temporária para envio dos bytes do arquivo. Não envie a chave de API Raims para este endereço.
UploadURL string `json:"upload_url"`
// Method Método HTTP para enviar o arquivo à URL retornada.
Method string `json:"method"`
// ContentType Tipo de conteúdo que deve ser enviado no header Content-Type do PUT.
ContentType string `json:"content_type"`
// FileSize Quantidade de bytes que deve ser enviada, também informada no header Content-Length do PUT.
FileSize int64 `json:"file_size"`
// ExpiresAt Prazo de validade da autorização de envio, em segundos Unix UTC.
ExpiresAt int64 `json:"expires_at"`
}
CheckoutAssetUpload Autorização temporária para enviar um arquivo de imagem da empresa, no ambiente autenticado.
func (CheckoutAssetUpload) MarshalJSON ¶
func (v CheckoutAssetUpload) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CheckoutAssetUpload) UnmarshalJSON ¶
func (v *CheckoutAssetUpload) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CheckoutAssetUpload response.
type CheckoutAssetUploadDeleted ¶
type CheckoutAssetUploadDeleted struct {
Resource `json:"-"`
// ID Identificador do envio descartado.
ID string `json:"id"`
// Deleted Confirma que o envio foi descartado e não pode mais ser associado ao checkout.
Deleted bool `json:"deleted"`
}
CheckoutAssetUploadDeleted Confirmação do descarte de um envio de imagem que não será aplicado.
func (CheckoutAssetUploadDeleted) MarshalJSON ¶
func (v CheckoutAssetUploadDeleted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CheckoutAssetUploadDeleted) UnmarshalJSON ¶
func (v *CheckoutAssetUploadDeleted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CheckoutAssetUploadDeleted response.
type CheckoutSettings ¶
type CheckoutSettings struct {
Resource `json:"-"`
// SupportEmail E-mail de suporte apresentado no checkout, ou null quando não informado.
SupportEmail *string `json:"support_email"`
// HexPrimaryColor Cor principal do checkout no formato #RRGGBB.
HexPrimaryColor string `json:"hex_primary_color"`
// HexSecondaryColor Cor de fundo do checkout no formato #RRGGBB.
HexSecondaryColor string `json:"hex_secondary_color"`
// PaymentMethodTypes Meios padrão habilitados e disponíveis: 1 para Pix e 2 para boleto. Cobranças e links podem ter configurações próprias. Para alterar o padrão, use o Dashboard.
PaymentMethodTypes []int64 `json:"payment_method_types"`
// Logo Imagem atual e andamento da última alteração.
Logo CheckoutAsset `json:"logo"`
// Favicon Imagem atual e andamento da última alteração.
Favicon CheckoutAsset `json:"favicon"`
}
CheckoutSettings Imagens, cores, contato de suporte e meios padrão do checkout no ambiente autenticado.
func (CheckoutSettings) MarshalJSON ¶
func (v CheckoutSettings) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CheckoutSettings) UnmarshalJSON ¶
func (v *CheckoutSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CheckoutSettings response.
type Client ¶
type Client struct {
// Accounts provides account context, fees and checkout settings.
Accounts *AccountsService
// Balances provides the account balance and forecast.
Balances *BalancesService
// Charges provides charges, payments, documents and charge refunds.
Charges *ChargesService
// Customers provides customer registration and retrieval.
Customers *CustomersService
// Disputes provides dispute retrieval and listing.
Disputes *DisputesService
// PaymentLinks provides payment links and requests to send them by email.
PaymentLinks *PaymentLinksService
// Refunds provides refund retrieval, listing and receipts.
Refunds *RefundsService
// Statements provides financial statement entries.
Statements *StatementsService
// WebhookEventTypes lists the event types available for webhook subscriptions.
WebhookEventTypes *WebhookEventTypesService
// Webhooks provides webhook subscriptions, health, pause, tests and secret rotation.
Webhooks *WebhooksService
// WebhookEvents lists, reads and delivers webhook events.
WebhookEvents *WebhookEventsService
// WebhookDeliveries provides delivery history, attempts and delivery controls.
WebhookDeliveries *WebhookDeliveriesService
// WithdrawalDestinations provides the configured withdrawal destinations.
WithdrawalDestinations *WithdrawalDestinationsService
// Withdrawals provides withdrawals, limits, summaries and automatic settings.
Withdrawals *WithdrawalsService
// Simulations provides charge and refund simulations in Sandbox.
Simulations *SimulationsService
// contains filtered or unexported fields
}
Client is reusable by concurrent goroutines. Its configuration is immutable.
func NewClient ¶
func NewClient(apiKey string, options ...ClientOption) (*Client, error)
NewClient creates a client authenticated with an API key. The key defines its environment.
func NewOAuthClient ¶
func NewOAuthClient(accessToken string, environment Environment, authorized []Environment, options ...ClientOption) (*Client, error)
NewOAuthClient uses an access token obtained by the application's OAuth flow. The caller supplies the environments granted by the connection. The SDK does not renew tokens.
func (*Client) CloseIdleConnections ¶
func (c *Client) CloseIdleConnections()
CloseIdleConnections closes idle connections in the client's transport. Active requests continue. A shared transport also closes its other idle connections.
type ClientOption ¶
type ClientOption func(*clientConfig) error
ClientOption configures a client through one of the With helpers. Options are applied and validated when the client is constructed.
func WithBaseURL ¶
func WithBaseURL(baseURL string) ClientOption
WithBaseURL sets a trusted HTTPS origin receiving the credential. An HTTP loopback IP is also accepted for local validation. Paths, queries, fragments and credentials in the URL are rejected during construction.
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) ClientOption
WithHTTPClient copies the supplied HTTP client configuration and shares its transport. The SDK refuses redirects and disables cookies. The transport must respect request contexts and preserve the single-send policy for writes.
func WithMaxNetworkRetries ¶
func WithMaxNetworkRetries(retries int) ClientOption
WithMaxNetworkRetries sets zero to five additional GET attempts; the default is zero. Eligible failures are connection errors and HTTP 408, 429, 500, 502, 503 and 504. Writes are never retried, including when an idempotency key is supplied.
func WithRequestObserver ¶
func WithRequestObserver(observer func(RequestDiagnostics)) ClientOption
WithRequestObserver registers a synchronous callback after each transport attempt. The callback must return promptly and support concurrent calls. A nil callback disables observation. Its panic or duration does not discard a conclusive response.
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout sets the positive timeout of each HTTP attempt, including body reads. The default is 80 seconds. A context deadline can limit the entire call, including retries and backoff; WithRequestTimeout overrides an individual call.
type ConnectionError ¶
type ConnectionError struct {
// contains filtered or unexported fields
}
ConnectionError indicates that no conclusive response was received. A write may already have been processed. Unwrap supports errors.Is.
func (*ConnectionError) Error ¶
func (e *ConnectionError) Error() string
Error describes the connection failure without including the request URL or payload.
func (*ConnectionError) Unwrap ¶
func (e *ConnectionError) Unwrap() error
Unwrap exposes the cause for errors.Is and errors.As, including context deadlines. Inspect the underlying error before logging it because it may contain request details.
type CreateChargeParams ¶
type CreateChargeParams struct {
// CustomerID ID de um cliente da empresa e do ambiente autenticado. Use o id retornado no cadastro assim que receber a resposta ou consulte o cliente pelo ID. Pix direto exige CPF/CNPJ válido. Boleto direto exige nome, e-mail válido, CPF/CNPJ e endereço, incluindo CEP e número.
CustomerID Optional[string] `json:"customer_id,omitzero"`
// AmountCents Valor da cobrança em centavos de real. Por exemplo, 10000 representa R$ 100,00.
AmountCents Optional[int64] `json:"amount_cents,omitzero"`
// PaymentMethod Meio da cobrança. Omitir ou enviar 0 permite escolher no checkout. Sem payment_method_types, 1 solicita Pix e 2 solicita boleto na criação, conforme os meios habilitados. Boleto usa o endereço do cliente e completa campos ausentes pelo CEP quando disponíveis. Com lista própria, envie 0 ou omita este campo; a emissão acontece após a escolha no checkout.
PaymentMethod Optional[int64] `json:"payment_method,omitzero"`
// DueDate Vencimento em segundos Unix UTC, pelo menos cinco minutos no futuro. A data máxima é hoje mais dez anos, no calendário de São Paulo.
DueDate Optional[int64] `json:"due_date,omitzero"`
// Title Título da cobrança. Você pode deixar este campo vazio.
Title Optional[string] `json:"title,omitzero"`
// Description Descrição da cobrança. Você pode deixar este campo vazio.
Description Optional[string] `json:"description,omitzero"`
// SendEmail Com true, solicita o envio da cobrança ao e-mail do cliente e gera checkout_url. Em contas pendentes, o cliente precisa ter o mesmo e-mail principal da conta. Fora dessa condição, um e-mail ausente ou inválido impede o envio, mas permite criar a cobrança quando não houver emissão direta de boleto. Boleto direto exige e-mail válido mesmo com false. A resposta não confirma a entrega da mensagem.
SendEmail Optional[bool] `json:"send_email,omitzero"`
// CreateCheckout Com true, gera o link retornado em checkout_url, sem exigir uma URL de retorno nem solicitar envio de e-mail. Com false, o link ainda é gerado quando send_email é true ou uma URL de retorno é informada.
CreateCheckout Optional[bool] `json:"create_checkout,omitzero"`
// SuccessRedirectURL URL HTTPS do seu site para retorno após a confirmação do pagamento. O redirecionamento não comprova o pagamento; consulte a cobrança para confirmá-lo. Não aceita credenciais no endereço, IP literal, localhost ou domínio Raims. Quando preenchida, gera checkout_url mesmo com send_email false. Se omitida, vazia ou null, o retorno não é definido.
SuccessRedirectURL Optional[string] `json:"success_redirect_url,omitzero"`
// CancelRedirectURL URL HTTPS do seu site para o pagador voltar pelo checkout. Voltar não cancela a cobrança, o Pix ou o boleto. Não aceita credenciais no endereço, IP literal, localhost ou domínio Raims. Quando preenchida, gera checkout_url mesmo com send_email false. Se omitida, vazia ou null, o retorno não é definido.
CancelRedirectURL Optional[string] `json:"cancel_redirect_url,omitzero"`
// PaymentMethodTypes Meios permitidos para a cobrança: 1 para Pix e 2 para boleto. Omitir ou enviar null usa a configuração de checkout herdada. Informe uma lista sem repetições. A configuração própria substitui o padrão da conta; uma configuração do link pode apenas restringir essa lista. Combine com payment_method omitido ou 0.
PaymentMethodTypes Optional[[]int64] `json:"payment_method_types,omitzero"`
// ExternalReference Referência do pedido ou da cobrança no seu sistema. Null, vazio ou somente espaços deixam sem referência. Pode ser repetida e não evita cobranças duplicadas. É diferente da referência do cadastro do cliente.
ExternalReference Optional[string] `json:"external_reference,omitzero"`
// Metadata Dados de integração associados à cobrança, em pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir, enviar null ou {} cria a cobrança sem esses dados; pares com valor null não são incluídos. Texto vazio é um valor válido.
Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}
CreateChargeParams contains the fields defined by the public API.
type CreateCheckoutFaviconUploadParams ¶
type CreateCheckoutFaviconUploadParams struct {
// ContentType Tipo de conteúdo do arquivo: image/png ou image/jpeg.
ContentType Optional[string] `json:"content_type,omitzero"`
// FileSize Tamanho do arquivo em bytes.
FileSize Optional[int64] `json:"file_size,omitzero"`
// Width Largura do ícone em pixels. Deve ser igual à altura.
Width Optional[int64] `json:"width,omitzero"`
// Height Altura do ícone em pixels. Deve ser igual à largura.
Height Optional[int64] `json:"height,omitzero"`
}
CreateCheckoutFaviconUploadParams Metadados da imagem que será enviada como ícone do checkout.
type CreateCheckoutLogoUploadParams ¶
type CreateCheckoutLogoUploadParams struct {
// ContentType Tipo de conteúdo do arquivo: image/png ou image/jpeg.
ContentType Optional[string] `json:"content_type,omitzero"`
// FileSize Tamanho do arquivo em bytes.
FileSize Optional[int64] `json:"file_size,omitzero"`
// Width Largura da imagem em pixels.
Width Optional[int64] `json:"width,omitzero"`
// Height Altura da imagem em pixels.
Height Optional[int64] `json:"height,omitzero"`
}
CreateCheckoutLogoUploadParams Metadados da imagem que será enviada como logo do checkout.
type CreateCustomerParams ¶
type CreateCustomerParams struct {
// FullName Nome completo do pagador.
FullName Optional[string] `json:"full_name,omitzero"`
// TaxID CPF ou CNPJ válido, com ou sem pontos, barra, hífen e espaços.
TaxID Optional[string] `json:"tax_id,omitzero"`
// Email E-mail do pagador. Cadastrar o e-mail não envia uma mensagem.
Email Optional[string] `json:"email,omitzero"`
// DialCode Código de discagem internacional. Pode ser informado sem phone_local.
DialCode Optional[string] `json:"dial_code,omitzero"`
// PhoneLocal Número de telefone sem o código de discagem, com ou sem pontuação. Pode ser informado sem dial_code.
PhoneLocal Optional[string] `json:"phone_local,omitzero"`
// ZipCode CEP do endereço, com ou sem hífen. Se street, neigh, city, uf, street_number e complement estiverem vazios, o CEP pode preencher rua, bairro, cidade e estado. O preenchimento não inclui número nem complemento.
ZipCode Optional[string] `json:"zip_code,omitzero"`
// Street Logradouro do endereço.
Street Optional[string] `json:"street,omitzero"`
// StreetNumber Número do endereço.
StreetNumber Optional[string] `json:"street_number,omitzero"`
// Complement Complemento do endereço.
Complement Optional[string] `json:"complement,omitzero"`
// Neigh Bairro do endereço.
Neigh Optional[string] `json:"neigh,omitzero"`
// City Cidade do endereço.
City Optional[string] `json:"city,omitzero"`
// Uf Sigla do estado, como SP.
Uf Optional[string] `json:"uf,omitzero"`
// ExternalReference Identificador do cliente no seu sistema. Para um cliente já cadastrado, omita para manter a referência ou envie null ou texto vazio para removê-la. Use external_reference na listagem de clientes para buscar esse valor.
ExternalReference Optional[string] `json:"external_reference,omitzero"`
// Metadata Dados de integração associados ao recurso. Informe pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir ou enviar {} preserva os dados; null remove todos os pares, e null em uma chave remove somente essa chave. Texto vazio é um valor válido.
Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}
CreateCustomerParams contains the fields defined by the public API.
type CreatePaymentLinkParams ¶
type CreatePaymentLinkParams struct {
// ChargeID Identificador da cobrança existente. O link utiliza o cliente, o valor e o vencimento dessa cobrança.
ChargeID Optional[string] `json:"charge_id,omitzero"`
// SuccessRedirectURL URL HTTPS de retorno após o pagamento confirmado. Omitir, enviar null ou texto vazio preserva a URL existente.
SuccessRedirectURL Optional[string] `json:"success_redirect_url,omitzero"`
// CancelRedirectURL URL HTTPS para voltar ao seu site. Esse retorno não cancela a cobrança. Omitir, enviar null ou texto vazio preserva a URL existente.
CancelRedirectURL Optional[string] `json:"cancel_redirect_url,omitzero"`
// PaymentMethodTypes Meios permitidos no link. Omitir preserva a configuração; null remove a configuração própria. Uma lista limita os meios do checkout e não amplia os permitidos pela cobrança.
PaymentMethodTypes Optional[[]int64] `json:"payment_method_types,omitzero"`
}
CreatePaymentLinkParams contains the fields defined by the public API.
type CreateRefundParams ¶
type CreateRefundParams struct {
// AmountCents Valor solicitado para devolução, em centavos de real. Para devolver tudo, informe o valor restante mostrado na consulta de elegibilidade.
AmountCents Optional[int64] `json:"amount_cents,omitzero"`
// Description Descrição da solicitação de devolução. Você pode deixar este campo vazio.
Description Optional[string] `json:"description,omitzero"`
}
CreateRefundParams Valor explícito da devolução Pix e descrição opcional.
type CreateWebhookParams ¶
type CreateWebhookParams struct {
// Name Nome para identificar o destino.
Name Optional[string] `json:"name,omitzero"`
// URL URL HTTPS que recebe os eventos. Use a porta padrão 443 e um endereço público externo à Raims.
URL Optional[string] `json:"url,omitzero"`
// Events Códigos dos eventos que este destino deve receber. Consulte o catálogo de eventos disponíveis.
Events Optional[[]string] `json:"events,omitzero"`
// IsActive Define se o destino pode receber eventos após o cadastro.
IsActive Optional[bool] `json:"is_active,omitzero"`
}
CreateWebhookParams Dados do webhook a cadastrar.
type CreateWithdrawalParams ¶
type CreateWithdrawalParams struct {
// AmountCents Valor total a retirar, em centavos de real, incluindo a tarifa. Consulte as condições de saque para conferir saldo, tarifa e limites antes de solicitar.
AmountCents Optional[int64] `json:"amount_cents,omitzero"`
// ExpectedDestinationID ID do destino próprio que deve continuar selecionado como padrão. Copie o id retornado na consulta dos destinos. Se o destino mudar ou deixar de ser válido, o saque é recusado. Omitir ou enviar null usa o destino padrão vigente.
ExpectedDestinationID Optional[string] `json:"expected_destination_id,omitzero"`
}
CreateWithdrawalParams Valor total solicitado para o saque Pix. A tarifa, quando aplicável, é descontada desse valor.
type CustomerBatchDeleted ¶
type CustomerBatchDeleted struct {
Resource `json:"-"`
// Removed IDs dos clientes removidos, incluindo os que já haviam sido removidos.
Removed []string `json:"removed"`
// Blocked IDs dos clientes com cobranças vinculadas ainda não removidas, inclusive pagas.
Blocked []string `json:"blocked"`
// Invalid Valores inválidos, de clientes inexistentes ou de clientes que sua autenticação não permite acessar.
Invalid []*string `json:"invalid"`
// Errors Motivo de cada item não removido, com campo identifiers[índice], código e explicação em inglês. Um lote sem falhas retorna uma lista vazia.
Errors []FieldError `json:"errors"`
}
CustomerBatchDeleted contains the fields defined by the public API.
func (CustomerBatchDeleted) MarshalJSON ¶
func (v CustomerBatchDeleted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerBatchDeleted) UnmarshalJSON ¶
func (v *CustomerBatchDeleted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerBatchDeleted response.
type CustomerCreated ¶
type CustomerCreated struct {
Resource `json:"-"`
// ID Identificador público do cliente para reutilizar nas próximas requisições.
ID string `json:"id"`
// Object Tipo do recurso retornado.
Object string `json:"object"`
// TaxID CPF ou CNPJ do cliente.
TaxID string `json:"tax_id"`
// TaxIDType Tipo do documento do cliente: cpf ou cnpj.
TaxIDType string `json:"tax_id_type"`
// CreatedAt Instante da criação em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// ExternalReference Identificador do cliente no seu sistema, quando informado.
ExternalReference *string `json:"external_reference"`
// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
Metadata map[string]string `json:"metadata"`
}
CustomerCreated contains the fields defined by the public API.
func (CustomerCreated) MarshalJSON ¶
func (v CustomerCreated) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerCreated) UnmarshalJSON ¶
func (v *CustomerCreated) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerCreated response.
type CustomerCreatedWebhookEvent ¶ added in v0.2.0
type CustomerCreatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data CustomerCreatedWebhookEventData `json:"data"`
}
CustomerCreatedWebhookEvent contains the fields defined by the public API.
func (CustomerCreatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v CustomerCreatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerCreatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *CustomerCreatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerCreatedWebhookEvent response.
type CustomerCreatedWebhookEventData ¶ added in v0.2.0
type CustomerCreatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
CustomerCreatedWebhookEventData contains the fields defined by the public API.
func (CustomerCreatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v CustomerCreatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerCreatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *CustomerCreatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerCreatedWebhookEventData response.
type CustomerDeleted ¶
type CustomerDeleted struct {
Resource `json:"-"`
// ID Identificador público do cliente removido na Raims.
ID string `json:"id"`
// Deleted Confirma que o cliente foi removido.
Deleted bool `json:"deleted"`
}
CustomerDeleted contains the fields defined by the public API.
func (CustomerDeleted) MarshalJSON ¶
func (v CustomerDeleted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerDeleted) UnmarshalJSON ¶
func (v *CustomerDeleted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerDeleted response.
type CustomerDeletedWebhookEvent ¶ added in v0.2.0
type CustomerDeletedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data CustomerDeletedWebhookEventData `json:"data"`
}
CustomerDeletedWebhookEvent contains the fields defined by the public API.
func (CustomerDeletedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v CustomerDeletedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerDeletedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *CustomerDeletedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerDeletedWebhookEvent response.
type CustomerDeletedWebhookEventData ¶ added in v0.2.0
type CustomerDeletedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
CustomerDeletedWebhookEventData contains the fields defined by the public API.
func (CustomerDeletedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v CustomerDeletedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerDeletedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *CustomerDeletedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerDeletedWebhookEventData response.
type CustomerListItem ¶
type CustomerListItem struct {
Resource `json:"-"`
// ID Identificador público do cliente.
ID string `json:"id"`
// Name Nome completo do cliente.
Name string `json:"name"`
// FirstName Primeiro nome do cliente.
FirstName string `json:"first_name"`
// LastName Restante do nome do cliente.
LastName string `json:"last_name"`
// Email E-mail do cliente.
Email string `json:"email"`
// TaxID CPF ou CNPJ do cliente.
TaxID string `json:"tax_id"`
// TaxIDType Tipo do documento: cpf ou cnpj.
TaxIDType string `json:"tax_id_type"`
// DialCode Código de discagem internacional do telefone.
DialCode string `json:"dial_code"`
// PhoneLocal Número de telefone sem o código de discagem, somente com dígitos.
PhoneLocal string `json:"phone_local"`
// ZipCode CEP do endereço.
ZipCode string `json:"zip_code"`
// Street Logradouro.
Street string `json:"street"`
// StreetNumber Número do endereço.
StreetNumber string `json:"street_number"`
// Complement Complemento do endereço, quando informado.
Complement *string `json:"complement"`
// Neigh Bairro.
Neigh string `json:"neigh"`
// City Cidade.
City string `json:"city"`
// State Sigla do estado.
State string `json:"state"`
// CreatedAt Instante da criação em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Instante da atualização cadastral em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
// ExternalReference Identificador do cliente no seu sistema, quando informado.
ExternalReference *string `json:"external_reference"`
// Metadata Dados de integração associados ao recurso. Retorna {} quando não há valores. Esse mapa não é usado como filtro de busca nem incluído automaticamente nos eventos de webhook.
Metadata map[string]string `json:"metadata"`
}
CustomerListItem contains the fields defined by the public API.
func (CustomerListItem) MarshalJSON ¶
func (v CustomerListItem) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerListItem) UnmarshalJSON ¶
func (v *CustomerListItem) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerListItem response.
type CustomerListPage ¶
type CustomerListPage struct {
Resource `json:"-"`
// PageSize Tamanho de página aplicado à consulta.
PageSize int64 `json:"page_size"`
// HasNext Indica se há clientes na próxima página.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há clientes na página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para continuar com after; null quando não há próxima página.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para voltar com before; null quando não há página anterior.
PreviousBefore *string `json:"previous_before"`
}
CustomerListPage contains the fields defined by the public API.
func (CustomerListPage) MarshalJSON ¶
func (v CustomerListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerListPage) UnmarshalJSON ¶
func (v *CustomerListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerListPage response.
type CustomerListResponse ¶
type CustomerListResponse struct {
Resource `json:"-"`
// List Clientes encontrados na empresa e no ambiente autenticado.
List []CustomerListItem `json:"list"`
// Page Informações para continuar ou voltar na listagem.
Page CustomerListPage `json:"page"`
}
CustomerListResponse contains the fields defined by the public API.
func (CustomerListResponse) MarshalJSON ¶
func (v CustomerListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerListResponse) NextPage ¶
func (v *CustomerListResponse) NextPage(ctx context.Context) (*CustomerListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*CustomerListResponse) PreviousPage ¶
func (v *CustomerListResponse) PreviousPage(ctx context.Context) (*CustomerListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*CustomerListResponse) UnmarshalJSON ¶
func (v *CustomerListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerListResponse response.
type CustomerUpdatedWebhookEvent ¶ added in v0.2.0
type CustomerUpdatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data CustomerUpdatedWebhookEventData `json:"data"`
}
CustomerUpdatedWebhookEvent contains the fields defined by the public API.
func (CustomerUpdatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v CustomerUpdatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerUpdatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *CustomerUpdatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerUpdatedWebhookEvent response.
type CustomerUpdatedWebhookEventData ¶ added in v0.2.0
type CustomerUpdatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
CustomerUpdatedWebhookEventData contains the fields defined by the public API.
func (CustomerUpdatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v CustomerUpdatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*CustomerUpdatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *CustomerUpdatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public CustomerUpdatedWebhookEventData response.
type CustomersService ¶
type CustomersService struct {
// contains filtered or unexported fields
}
CustomersService provides the endpoints available through Client.Customers.
func (*CustomersService) Create ¶
func (s *CustomersService) Create(ctx context.Context, params *CreateCustomerParams, options ...RequestOption) (*CustomerCreated, error)
Create Criar cliente
func (*CustomersService) Delete ¶
func (s *CustomersService) Delete(ctx context.Context, id string, options ...RequestOption) (*CustomerDeleted, error)
Delete Remover cliente
func (*CustomersService) DeleteBatch ¶
func (s *CustomersService) DeleteBatch(ctx context.Context, params *RemoveCustomersParams, options ...RequestOption) (*CustomerBatchDeleted, error)
DeleteBatch Remover clientes em lote
func (*CustomersService) Get ¶
func (s *CustomersService) Get(ctx context.Context, id string, options ...RequestOption) (*CustomerListItem, error)
Get Recuperar um único cliente
func (*CustomersService) List ¶
func (s *CustomersService) List(ctx context.Context, params *ListCustomersParams, options ...RequestOption) (*CustomerListResponse, error)
List Listar clientes
func (*CustomersService) ListAll ¶
func (s *CustomersService) ListAll(ctx context.Context, params *ListCustomersParams, options ...RequestOption) *Iterator[CustomerListItem]
ListAll lazily follows forward cursors and preserves the original filters.
func (*CustomersService) Update ¶
func (s *CustomersService) Update(ctx context.Context, id string, params *UpdateCustomerParams, options ...RequestOption) (*CustomerListItem, error)
Update Atualizar cliente existente
type DeliverWebhookEventParams ¶ added in v0.2.0
type DeliverWebhookEventParams struct {
// WebhookID Identificador do webhook ativo que seleciona o tipo do evento. Use um cadastro da mesma empresa e ambiente da chave.
WebhookID Optional[string] `json:"webhook_id,omitzero"`
}
DeliverWebhookEventParams Destino para uma nova entrega do evento original.
type Dispute ¶
type Dispute struct {
Resource `json:"-"`
// OpenedAt Data de abertura da contestação, em segundos Unix UTC, ou null quando não informada.
OpenedAt *int64 `json:"opened_at"`
// DueAt Prazo registrado para resposta, em segundos Unix UTC, ou null quando não informado. Esta consulta não permite enviar uma resposta.
DueAt *int64 `json:"due_at"`
// ComplaintDetails Relato disponível da contestação, ou null quando não informado.
ComplaintDetails *string `json:"complaint_details"`
// CompanyResponse Resposta registrada da empresa, ou null quando não informada.
CompanyResponse *string `json:"company_response"`
// RespondedAt Data da resposta registrada da empresa, em segundos Unix UTC, ou null.
RespondedAt *int64 `json:"responded_at"`
// ResolvedAt Data registrada de encerramento ou resolução do caso, em segundos Unix UTC, ou null. Não confirma movimentação financeira.
ResolvedAt *int64 `json:"resolved_at"`
// WonAmountCents Valor com decisão favorável à empresa em um registro chargeback, em centavos de real. Null para casos MED ou quando não disponível.
WonAmountCents *int64 `json:"won_amount_cents"`
// LostAmountCents Valor com decisão desfavorável à empresa em um registro chargeback, em centavos de real. Null para casos MED ou quando não disponível.
LostAmountCents *int64 `json:"lost_amount_cents"`
// RefundedAmountCents Total de devoluções confirmadas para o caso MED, em centavos de real. Null para registros chargeback ou quando não houver resultado disponível. O aceite da análise não confirma este valor.
RefundedAmountCents *int64 `json:"refunded_amount_cents"`
// InfractionResult Resultado da análise de infração MED: agreed para infração reconhecida ou disagreed para infração não reconhecida. Null quando não disponível ou não aplicável.
InfractionResult *string `json:"infraction_result"`
// RefundResult Resultado da análise de devolução MED: partially_accepted, totally_accepted ou rejected. Null quando não disponível ou não aplicável. Aceite não comprova devolução financeira.
RefundResult *string `json:"refund_result"`
// LossReasonCode Motivo informado para o resultado desfavorável: 1 prazo de resposta expirado, 2 evidências insuficientes, 3 documentação inválida, 4 decisão final ou 5 outro. Null quando não disponível ou não aplicável.
LossReasonCode *int64 `json:"loss_reason_code"`
// LossReasonNote Observação disponível sobre o motivo do resultado desfavorável, ou null.
LossReasonNote *string `json:"loss_reason_note"`
// ID Identificador público completo do caso, com prefixo dp_ ou med_. Use este valor na consulta individual.
ID string `json:"id"`
// ChargeID Identificador da cobrança vinculada, ou null quando não houver vínculo disponível.
ChargeID *string `json:"charge_id"`
// Kind Tipo do caso: med para o procedimento MED do Pix e chargeback para os demais registros de contestação apresentados pela Raims.
Kind string `json:"kind"`
// Stage Etapa atual: open, in_analysis, refund_in_analysis, closed, cancelled, rejected ou failed. Closed informa análise encerrada, sem confirmar decisão favorável ou devolução.
Stage string `json:"stage"`
// ReasonCode Motivo relatado, que não confirma fraude, conforme kind. Para med: 1 golpe, 2 conta invadida, 3 coação, 4 acesso fraudulento, 5 outro e 6 desconhecido. Para chargeback: 1 alegação de fraude, 2 compra não reconhecida, 3 serviço não reconhecido, 4 produto ou serviço divergente, 5 cobrança indevida e 6 outro. Null quando não informado.
ReasonCode *int64 `json:"reason_code"`
// DisputedAmountCents Valor contestado, em centavos de real. Não representa o valor atualmente bloqueado nem confirma devolução.
DisputedAmountCents int64 `json:"disputed_amount_cents"`
// CreatedAt Data de criação do registro na Raims, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Data da última atualização disponível, em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
}
Dispute Detalhes e resultados disponíveis de uma contestação.
func (Dispute) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Dispute) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Dispute response.
type DisputeClosedWebhookEvent ¶ added in v0.2.0
type DisputeClosedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data DisputeClosedWebhookEventData `json:"data"`
}
DisputeClosedWebhookEvent contains the fields defined by the public API.
func (DisputeClosedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v DisputeClosedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeClosedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeClosedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeClosedWebhookEvent response.
type DisputeClosedWebhookEventData ¶ added in v0.2.0
type DisputeClosedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
}
DisputeClosedWebhookEventData contains the fields defined by the public API.
func (DisputeClosedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v DisputeClosedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeClosedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeClosedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeClosedWebhookEventData response.
type DisputeFundsDebitedWebhookEvent ¶ added in v0.2.0
type DisputeFundsDebitedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data DisputeFundsDebitedWebhookEventData `json:"data"`
}
DisputeFundsDebitedWebhookEvent contains the fields defined by the public API.
func (DisputeFundsDebitedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v DisputeFundsDebitedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeFundsDebitedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeFundsDebitedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeFundsDebitedWebhookEvent response.
type DisputeFundsDebitedWebhookEventData ¶ added in v0.2.0
type DisputeFundsDebitedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
// StatementID is defined by the public API.
StatementID *string `json:"statement_id"`
// DebitedAmountCents is defined by the public API.
DebitedAmountCents *int64 `json:"debited_amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
DisputeFundsDebitedWebhookEventData contains the fields defined by the public API.
func (DisputeFundsDebitedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v DisputeFundsDebitedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeFundsDebitedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeFundsDebitedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeFundsDebitedWebhookEventData response.
type DisputeListItem ¶
type DisputeListItem struct {
Resource `json:"-"`
// ID Identificador público completo do caso, com prefixo dp_ ou med_. Use este valor na consulta individual.
ID string `json:"id"`
// ChargeID Identificador da cobrança vinculada, ou null quando não houver vínculo disponível.
ChargeID *string `json:"charge_id"`
// Kind Tipo do caso: med para o procedimento MED do Pix e chargeback para os demais registros de contestação apresentados pela Raims.
Kind string `json:"kind"`
// Stage Etapa atual: open, in_analysis, refund_in_analysis, closed, cancelled, rejected ou failed. Closed informa análise encerrada, sem confirmar decisão favorável ou devolução.
Stage string `json:"stage"`
// ReasonCode Motivo relatado, que não confirma fraude, conforme kind. Para med: 1 golpe, 2 conta invadida, 3 coação, 4 acesso fraudulento, 5 outro e 6 desconhecido. Para chargeback: 1 alegação de fraude, 2 compra não reconhecida, 3 serviço não reconhecido, 4 produto ou serviço divergente, 5 cobrança indevida e 6 outro. Null quando não informado.
ReasonCode *int64 `json:"reason_code"`
// DisputedAmountCents Valor contestado, em centavos de real. Não representa o valor atualmente bloqueado nem confirma devolução.
DisputedAmountCents int64 `json:"disputed_amount_cents"`
// CreatedAt Data de criação do registro na Raims, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Data da última atualização disponível, em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
}
DisputeListItem Dados de uma contestação presentes na listagem.
func (DisputeListItem) MarshalJSON ¶
func (v DisputeListItem) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeListItem) UnmarshalJSON ¶
func (v *DisputeListItem) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeListItem response.
type DisputeListPage ¶
type DisputeListPage struct {
Resource `json:"-"`
// PageSize Quantidade efetiva de contestações solicitada por página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há outra página na direção de avanço.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há uma página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para after na próxima página, ou null quando não houver avanço.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para before na página anterior, ou null quando não houver retorno.
PreviousBefore *string `json:"previous_before"`
}
DisputeListPage Informações para navegar pelas contestações com os mesmos filtros e ordenação.
func (DisputeListPage) MarshalJSON ¶
func (v DisputeListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeListPage) UnmarshalJSON ¶
func (v *DisputeListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeListPage response.
type DisputeListResponse ¶
type DisputeListResponse struct {
Resource `json:"-"`
// List Contestações presentes nesta página, na ordenação solicitada.
List []DisputeListItem `json:"list"`
// Page Informações de navegação para a mesma consulta.
Page DisputeListPage `json:"page"`
}
DisputeListResponse Página de contestações acessíveis à chave utilizada.
func (DisputeListResponse) MarshalJSON ¶
func (v DisputeListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeListResponse) NextPage ¶
func (v *DisputeListResponse) NextPage(ctx context.Context) (*DisputeListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*DisputeListResponse) PreviousPage ¶
func (v *DisputeListResponse) PreviousPage(ctx context.Context) (*DisputeListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*DisputeListResponse) UnmarshalJSON ¶
func (v *DisputeListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeListResponse response.
type DisputeOpenedWebhookEvent ¶ added in v0.2.0
type DisputeOpenedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data DisputeOpenedWebhookEventData `json:"data"`
}
DisputeOpenedWebhookEvent contains the fields defined by the public API.
func (DisputeOpenedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v DisputeOpenedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeOpenedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeOpenedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeOpenedWebhookEvent response.
type DisputeOpenedWebhookEventData ¶ added in v0.2.0
type DisputeOpenedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
}
DisputeOpenedWebhookEventData contains the fields defined by the public API.
func (DisputeOpenedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v DisputeOpenedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeOpenedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeOpenedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeOpenedWebhookEventData response.
type DisputeUpdatedWebhookEvent ¶ added in v0.2.0
type DisputeUpdatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data DisputeUpdatedWebhookEventData `json:"data"`
}
DisputeUpdatedWebhookEvent contains the fields defined by the public API.
func (DisputeUpdatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v DisputeUpdatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeUpdatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeUpdatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeUpdatedWebhookEvent response.
type DisputeUpdatedWebhookEventData ¶ added in v0.2.0
type DisputeUpdatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
}
DisputeUpdatedWebhookEventData contains the fields defined by the public API.
func (DisputeUpdatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v DisputeUpdatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*DisputeUpdatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *DisputeUpdatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public DisputeUpdatedWebhookEventData response.
type DisputesService ¶
type DisputesService struct {
// contains filtered or unexported fields
}
DisputesService provides the endpoints available through Client.Disputes.
func (*DisputesService) Get ¶
func (s *DisputesService) Get(ctx context.Context, id string, options ...RequestOption) (*Dispute, error)
Get Recuperar uma contestação
func (*DisputesService) List ¶
func (s *DisputesService) List(ctx context.Context, params *ListDisputesParams, options ...RequestOption) (*DisputeListResponse, error)
List Listar contestações
func (*DisputesService) ListAll ¶
func (s *DisputesService) ListAll(ctx context.Context, params *ListDisputesParams, options ...RequestOption) *Iterator[DisputeListItem]
ListAll lazily follows forward cursors and preserves the original filters.
type Environment ¶
type Environment string
Environment selects the data environment of an OAuth client. API keys determine their own environment and do not use this setting.
type Error ¶
type Error struct {
Resource `json:"-"`
// Code Código estável do erro.
Code string `json:"code"`
// Message Explicação do erro em inglês. Em validações, resume a categoria; os detalhes identificam as correções. Use os códigos para tratar a resposta.
Message string `json:"message"`
// Details Falhas em campos recebidos ou referências enviadas no corpo, com campo, código e explicação. Omitido em erros gerais e quando não há correção de campo a indicar.
Details *[]FieldError `json:"details"`
}
Error contains the fields defined by the public API.
func (Error) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Error response.
type ErrorResponse ¶
type ErrorResponse struct {
Resource `json:"-"`
// Error Código e explicação do erro retornado pela API.
Error Error `json:"error"`
}
ErrorResponse contains the fields defined by the public API.
func (ErrorResponse) MarshalJSON ¶
func (v ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ErrorResponse) UnmarshalJSON ¶
func (v *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ErrorResponse response.
type FieldError ¶
type FieldError struct {
Resource `json:"-"`
// Field Nome público do campo JSON, parâmetro de consulta, parâmetro de rota ou header relacionado ao erro. Campos aninhados e listas preservam o caminho e o índice. $ representa a raiz do corpo JSON.
Field string `json:"field"`
// Code Motivo do erro no campo, como REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD ou INVALID_TYPE.
Code string `json:"code"`
// Message Explicação em inglês sobre o problema nesse campo ou parâmetro e a correção disponível. Não use o texto para decidir o fluxo da integração.
Message string `json:"message"`
}
FieldError contains the fields defined by the public API.
func (FieldError) MarshalJSON ¶
func (v FieldError) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*FieldError) UnmarshalJSON ¶
func (v *FieldError) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public FieldError response.
type FinancialDocument ¶
type FinancialDocument struct {
Resource `json:"-"`
// URL URL HTTPS temporária em files.raims.com. Use o endereço completo em um GET para baixar o PDF, sem enviar Authorization ou a chave de API. Não altere seus parâmetros.
URL string `json:"url"`
// ExpiresAt Expiração do link em segundos Unix UTC. Depois desse instante, consulte novamente o endpoint do documento com a chave de API.
ExpiresAt int64 `json:"expires_at"`
}
FinancialDocument URL temporária para baixar um documento financeiro em PDF. A URL permite acesso a quem a possuir até expires_at e pode ser reutilizada nesse prazo. Compartilhe-a somente com pessoas autorizadas e não a registre em logs. Após a expiração, consulte novamente o endpoint autenticado para obter outro link. O download pode retornar HTTP 403 para um link inválido ou expirado, sem o envelope JSON de erros da API.
func (FinancialDocument) MarshalJSON ¶
func (v FinancialDocument) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*FinancialDocument) UnmarshalJSON ¶
func (v *FinancialDocument) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public FinancialDocument response.
type GetBalanceForecastParams ¶
type GetBalanceForecastParams struct {
// Period Período das datas previstas de recebimento, pelo calendário de São Paulo. Inclui hoje e os dias anteriores conforme a opção. Não consulta vencimentos nem projeta os próximos dias. Padrão: "today". Exemplo: "last_7_days".
Period Optional[string] `json:"period,omitzero"`
}
GetBalanceForecastParams contains the fields defined by the public API.
type GetChargeStatisticsParams ¶
type GetChargeStatisticsParams struct {
// Period Período da consulta, pelo calendário de São Paulo. today considera hoje; last_7_days, last_15_days e last_30_days incluem hoje e os dias anteriores. A consulta aceita somente esses períodos. start_at e end_at são campos da resposta, não filtros de datas personalizadas. Padrão: "today". Exemplo: "last_7_days".
Period Optional[string] `json:"period,omitzero"`
}
GetChargeStatisticsParams contains the fields defined by the public API.
type IssueSimulationPaymentParams ¶
type IssueSimulationPaymentParams struct {
// PaymentMethod Meio a emitir: 1 para Pix ou 2 para boleto. Deve estar habilitado na cobrança.
PaymentMethod Optional[int64] `json:"payment_method,omitzero"`
}
IssueSimulationPaymentParams Meio de pagamento da emissão de teste.
type Iterator ¶
type Iterator[T any] struct { // contains filtered or unexported fields }
Iterator loads pages only when Next or All advances. Do not share an iterator between goroutines.
func (*Iterator[T]) All ¶
All supports range over a lazy sequence. Breaking the loop stops further HTTP requests.
func (*Iterator[T]) Current ¶
func (i *Iterator[T]) Current() *T
Current returns the item selected by the last successful Next call. It returns nil before iteration and after Next returns false.
type ListChargeRefundsParams ¶
type ListChargeRefundsParams struct {
// PageSize Quantidade de estornos por página. Valores acima do máximo usam o máximo; ausência, vazio, texto, zero ou valor negativo usa o padrão. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor recebido em page.next_after para avançar. Copie o valor completo e mantenha a mesma cobrança. Não envie junto de before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor recebido em page.previous_before para voltar. Copie o valor completo e mantenha a mesma cobrança. Não envie junto de after. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// CreatedGte Filtra estornos solicitados a partir deste instante, inclusive, em segundos Unix UTC. Usa a data de criação da solicitação, sem depender da conclusão. Mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Filtra estornos solicitados até este instante, inclusive, em segundos Unix UTC. Se informar created_gte, este valor deve ser maior ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
}
ListChargeRefundsParams contains the fields defined by the public API.
type ListChargesParams ¶
type ListChargesParams struct {
// PageSize Quantidade de cobranças por página. Inteiros positivos acima do máximo usam o máximo. Valor omitido, vazio, zero, negativo ou inválido usa 10. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Copie page.next_after da resposta anterior para avançar. Mantenha os mesmos filtros e a ordenação; não envie before junto. Deixe vazio para começar a listagem. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Copie page.previous_before da resposta anterior para voltar. Mantenha os mesmos filtros e a ordenação; não envie after junto. Deixe vazio se não quiser voltar. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// Identifier Filtra pelo ID completo da cobrança. Se não houver correspondência, list será vazio. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
Identifier Optional[string] `json:"identifier,omitzero"`
// CustomerID Filtra pelo ID público completo do cliente, retornado no cadastro ou na consulta. O vínculo permanece o mesmo se nome ou e-mail mudar. Pode ser combinado com os demais filtros; mantenha o mesmo customer_id ao mudar de página. Um ID válido sem cobranças na empresa e no ambiente autenticado retorna list vazio. Vazio ou ausência não aplica o filtro. Comprimento máximo: 100. Exemplo: "cus_1Q2W3E4R5T6Y7U8I9O0P".
CustomerID Optional[string] `json:"customer_id,omitzero"`
// ExternalReference Filtra pela referência atual da cobrança no seu sistema. Compara o valor completo, com distinção de maiúsculas, minúsculas e acentos. Cobranças novas ou alteradas podem ficar temporariamente fora dos resultados. Vazio ou ausência ignora o filtro. Mantenha o valor ao navegar por cursor. Comprimento máximo: 120. Exemplo: "pedido_12345".
ExternalReference Optional[string] `json:"external_reference,omitzero"`
// Email Filtra pelo e-mail completo registrado na cobrança. Alterar o cadastro do cliente não altera esse e-mail. Comprimento máximo: 254. Exemplo: "cliente@example.com".
Email Optional[string] `json:"email,omitzero"`
// Status Filtra por um ou mais códigos separados por vírgula, como 0,1. 0 criado, 1 aguardando pagamento, 2 autorizado, 3 em processamento, 4 pago, 5 parcialmente devolvido, 6 devolvido, 7 cancelado, 8 expirado, 9 falha, 10 chargeback, 11 chargeback em análise, 12 chargeback perdido e 13 chargeback ganho. A busca pode demorar a refletir o status atual. Comprimento máximo: 64. Exemplo: "0,1".
Status Optional[string] `json:"status,omitzero"`
// PaymentMethod Filtra pelo meio de pagamento da cobrança: 1 para Pix e 2 para boleto. Para combinar, envie 1,2. Uma cobrança com meio indefinido pode passar a usar Pix ou boleto quando o código Pix ou boleto é gerado no checkout. A seleção na tela, por si só, não altera o filtro. Comprimento máximo: 32. Exemplo: "1,2".
PaymentMethod Optional[string] `json:"payment_method,omitzero"`
// CreatedGte Filtra cobranças criadas a partir deste instante, inclusive, em segundos Unix UTC. Se informar created_lte, este valor deve ser menor ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Filtra cobranças criadas até este instante, inclusive, em segundos Unix UTC. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
// DueGte Filtra cobranças com vencimento a partir deste instante, inclusive, em segundos Unix UTC. Pode ser combinado com due_lte e os demais filtros; mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1893456000.
DueGte Optional[int64] `json:"due_gte,omitzero"`
// DueLte Filtra cobranças com vencimento até este instante, inclusive, em segundos Unix UTC. Se informar due_gte, este valor deve ser maior ou igual a ele. Pode ser usado sozinho ou com os demais filtros. Mínimo: 0. Máximo: 253402300799. Exemplo: 1896047999.
DueLte Optional[int64] `json:"due_lte,omitzero"`
// PaidGte Filtra cobranças pagas a partir deste instante, inclusive, em segundos Unix UTC. Usa a data do pagamento confirmado, mesmo quando houver estorno posterior. Cobranças sem pagamento confirmado ficam fora do resultado. Mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
PaidGte Optional[int64] `json:"paid_gte,omitzero"`
// PaidLte Filtra cobranças pagas até este instante, inclusive, em segundos Unix UTC. Se informar paid_gte, este valor deve ser maior ou igual a ele. Pode ser combinado com os demais filtros. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
PaidLte Optional[int64] `json:"paid_lte,omitzero"`
// SortKey Ordena por valor em centavos ou data de criação. Se omitido, usa a ordem de cadastro; com filtro de criação, usa created_at. Mantenha a mesma ordenação ao mudar de página. Exemplo: "created_at".
SortKey Optional[string] `json:"sort_key,omitzero"`
// SortOrder Define a direção da ordenação. Com desc, a ordem padrão mostra as cobranças mais recentes primeiro. Padrão: "desc".
SortOrder Optional[string] `json:"sort_order,omitzero"`
}
ListChargesParams contains the fields defined by the public API.
type ListCustomersParams ¶
type ListCustomersParams struct {
// PageSize Quantidade de clientes por página. Inteiros positivos acima do máximo usam o máximo. Valor omitido, vazio, zero, negativo ou inválido usa 10. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Copie page.next_after da resposta anterior para avançar. Use o cursor sem alterações, mantenha os mesmos filtros e não envie before junto. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Copie page.previous_before da resposta anterior para voltar uma página. Mantenha os mesmos filtros e não envie after junto. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// Identifier Identificador público do cliente, com prefixo cus_. Comprimento máximo: 100. Exemplo: "cus_3AbHiWSrsZBoaTg47OcMzC".
Identifier Optional[string] `json:"identifier,omitzero"`
// Name Busca pelo nome do cliente, com os cadastros mais recentes primeiro. Cadastros novos ou alterados podem ficar temporariamente fora dos resultados. Após renomear um cliente, a busca pelo nome anterior ainda pode devolver o cadastro com o nome novo. Deixe vazio para ignorar este filtro. Comprimento mínimo: 2. Comprimento máximo: 120. Exemplo: "Maria Silva".
Name Optional[string] `json:"name,omitzero"`
// Email Filtra pelo e-mail completo do cliente. Comprimento máximo: 254. Exemplo: "cliente@example.com".
Email Optional[string] `json:"email,omitzero"`
// Document Filtra pelo CPF ou CNPJ completo do cliente, com ou sem pontos, barra, hífen e espaços. Comprimento máximo: 20. Exemplo: "12345678909".
Document Optional[string] `json:"document,omitzero"`
// ExternalReference Filtra pela referência atual do cliente no seu sistema. Compara o valor completo, com distinção de maiúsculas, minúsculas e acentos. Cadastros novos ou alterados podem ficar temporariamente fora dos resultados. Mantenha o valor ao navegar por cursor. Comprimento máximo: 120. Exemplo: "cliente_12345".
ExternalReference Optional[string] `json:"external_reference,omitzero"`
}
ListCustomersParams contains the fields defined by the public API.
type ListDisputesParams ¶
type ListDisputesParams struct {
// PageSize Quantidade de contestações por página. Valores inválidos usam o padrão; valores acima do máximo usam o limite. Padrão: 10. Mínimo: 1. Máximo: 100. Exemplo: 10.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor de page.next_after da resposta anterior. Preserve os filtros e a ordenação; não envie junto de before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor de page.previous_before para voltar. Preserve os filtros e a ordenação; não envie junto de after. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// Stage Etapas do caso separadas por vírgula: open, in_analysis, refund_in_analysis, closed, cancelled, rejected ou failed. Closed informa análise encerrada, sem confirmar decisão favorável ou devolução. Comprimento máximo: 256. Exemplo: "in_analysis,refund_in_analysis".
Stage Optional[string] `json:"stage,omitzero"`
// ChargeID Filtra pela cobrança vinculada, usando o identificador público completo. Um ID válido sem casos acessíveis retorna uma lista vazia. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
ChargeID Optional[string] `json:"charge_id,omitzero"`
// DisputedAmountCents Filtra pelo valor contestado exato, em centavos de real. Não representa o valor atualmente bloqueado. Mínimo: 0. Exemplo: 10000.
DisputedAmountCents Optional[int64] `json:"disputed_amount_cents,omitzero"`
// CreatedGte Inclui contestações criadas a partir deste instante, em segundos Unix UTC. O limite é inclusivo. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791878400.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Inclui contestações criadas até este instante, em segundos Unix UTC. O limite é inclusivo e deve ser igual ou posterior a created_gte. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791964800.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
// SortKey Campo usado para ordenar a lista: criação ou valor contestado. Padrão: "created_at". Exemplo: "created_at".
SortKey Optional[string] `json:"sort_key,omitzero"`
// SortOrder Ordem crescente ou decrescente do campo selecionado. Padrão: "desc". Exemplo: "desc".
SortOrder Optional[string] `json:"sort_order,omitzero"`
}
ListDisputesParams contains the fields defined by the public API.
type ListPaymentLinksParams ¶
type ListPaymentLinksParams struct {
// PageSize Quantidade de links por página. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor recebido em page.next_after. Mantenha o mesmo filtro charge_id. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor recebido em page.previous_before. Não envie junto com after. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// ChargeID Identificador da cobrança cujo link você quer consultar. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
ChargeID Optional[string] `json:"charge_id,omitzero"`
}
ListPaymentLinksParams contains the fields defined by the public API.
type ListRefundsParams ¶
type ListRefundsParams struct {
// PageSize Quantidade de estornos por página. Valores acima do máximo usam o máximo; ausência, vazio, texto, zero ou valor negativo usa o padrão. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor recebido em page.next_after para avançar nesta lista. Copie o valor completo. Não use um cursor da lista de uma cobrança nem envie junto de before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor recebido em page.previous_before para voltar nesta lista. Copie o valor completo. Não use um cursor da lista de uma cobrança nem envie junto de after. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// CreatedGte Filtra estornos solicitados a partir deste instante, inclusive, em segundos Unix UTC. Usa a data de criação da solicitação, sem depender da conclusão. Mantenha o valor ao mudar de página. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Filtra estornos solicitados até este instante, inclusive, em segundos Unix UTC. Se informar created_gte, este valor deve ser maior ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
}
ListRefundsParams contains the fields defined by the public API.
type ListStatementsParams ¶
type ListStatementsParams struct {
// PageSize Quantidade de lançamentos por página. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor recebido em page.next_after para avançar. Mantenha os mesmos filtros e a mesma ordem. Use somente after ou before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor recebido em page.previous_before para voltar. Mantenha os mesmos filtros e a mesma ordem. Use somente after ou before. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// StatementType Tipos de lançamento separados por vírgula: 1 recebimento; 2 tarifa; 3 tarifa de serviço; 4 saque; 5 devolução; 6 devolução parcial; 7 crédito por ajuste; 8 débito por ajuste; 9 bloqueio; 10 liberação. Comprimento máximo: 100. Exemplo: "1,2".
StatementType Optional[string] `json:"statement_type,omitzero"`
// ReferenceID Identificador da cobrança, contestação, saque ou ajuste relacionado ao lançamento. Use o ID completo retornado pela Raims. Comprimento máximo: 100. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
ReferenceID Optional[string] `json:"reference_id,omitzero"`
// CreatedGte Início inclusivo do período, em segundos Unix UTC. O filtro considera o instante do lançamento. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791849600.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Fim inclusivo do período, em segundos Unix UTC. O instante informado é o limite exato; frações posteriores ao segundo informado ficam fora do período. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791935999.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
// SortOrder Ordem dos lançamentos pela data: desc mostra os mais recentes primeiro; asc mostra os mais antigos primeiro. Padrão: "desc".
SortOrder Optional[string] `json:"sort_order,omitzero"`
}
ListStatementsParams contains the fields defined by the public API.
type ListWebhookDeliveriesParams ¶ added in v0.2.0
type ListWebhookDeliveriesParams struct {
// PageSize Quantidade de registros por página. A resposta informa o tamanho efetivo em page.page_size. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Para avançar, copie page.next_after da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Para voltar, copie page.previous_before da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// WebhookID Filtra as entregas de um destino, inclusive quando o cadastro já foi excluído e seu histórico ainda está disponível. Comprimento máximo: 26. Exemplo: "whk_1AbXiWSrsCBoaTg47OcMzC".
WebhookID Optional[string] `json:"webhook_id,omitzero"`
// EventType Filtra pelo código do evento recebido pelo webhook. Comprimento máximo: 100. Exemplo: "charge.paid".
EventType Optional[string] `json:"event_type,omitzero"`
// EventID Filtra as entregas de um evento pelo seu identificador. Inclui as entregas originais e os reenvios desse evento. Mantenha o valor ao navegar por cursor. Exemplo: "d36ffb51-e0c6-8a8f-904d-e426cc0b76bb".
EventID Optional[string] `json:"event_id,omitzero"`
// Status Filtra pela situação atual da entrega. Comprimento máximo: 32. Exemplo: "delivered".
Status Optional[string] `json:"status,omitzero"`
// CreatedGte Inclui entregas criadas a partir deste instante, em segundos Unix UTC. O filtro considera a criação da entrega, não a data do evento original. Mínimo: 0. Máximo: 253402300799. Exemplo: 1792281600.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Inclui entregas criadas até este instante, em segundos Unix UTC. O filtro considera a criação da entrega, não o horário da última tentativa. Mínimo: 0. Máximo: 253402300799. Exemplo: 1792368000.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
}
ListWebhookDeliveriesParams contains the fields defined by the public API.
type ListWebhookDeliveryAttemptsParams ¶ added in v0.2.0
type ListWebhookDeliveryAttemptsParams struct {
// PageSize Quantidade de registros por página. A resposta informa o tamanho efetivo em page.page_size. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Para avançar, copie page.next_after da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Para voltar, copie page.previous_before da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
}
ListWebhookDeliveryAttemptsParams contains the fields defined by the public API.
type ListWebhookEventsParams ¶ added in v0.2.0
type ListWebhookEventsParams struct {
// PageSize Quantidade de eventos por página. A resposta informa se há outra página e o cursor para consultá-la. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor de page.next_after para avançar na mesma consulta. Mantenha os filtros usados na primeira página. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor de page.previous_before para retornar na mesma consulta. Mantenha os filtros usados na primeira página. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// EventType Filtra pelo nome do evento, como charge.paid. Comprimento máximo: 100. Exemplo: "charge.paid".
EventType Optional[string] `json:"event_type,omitzero"`
// ResourceID Filtra pelo identificador público em data.id no corpo do evento. Comprimento máximo: 128. Exemplo: "ch_3AbHiWSrsZBoaTg47OcMzC".
ResourceID Optional[string] `json:"resource_id,omitzero"`
// CreatedGte Filtra eventos criados a partir deste instante, inclusive, em segundos Unix UTC. Mínimo: 0. Máximo: 253402300799. Exemplo: 1767225600.
CreatedGte Optional[int64] `json:"created_gte,omitzero"`
// CreatedLte Filtra eventos criados até este instante, inclusive, em segundos Unix UTC. Se informar created_gte, este valor deve ser maior ou igual a ele. Mínimo: 0. Máximo: 253402300799. Exemplo: 1791936000.
CreatedLte Optional[int64] `json:"created_lte,omitzero"`
}
ListWebhookEventsParams contains the fields defined by the public API.
type ListWebhooksParams ¶
type ListWebhooksParams struct {
// PageSize Quantidade de registros por página. A resposta informa o tamanho efetivo em page.page_size. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Para avançar, copie page.next_after da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Para voltar, copie page.previous_before da resposta anterior. Use apenas after ou before. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
}
ListWebhooksParams contains the fields defined by the public API.
type ListWithdrawalDestinationsParams ¶
type ListWithdrawalDestinationsParams struct {
// PageSize Quantidade de registros considerados para a página. A lista pode ter menos destinos e ainda indicar uma próxima página; continue enquanto page.has_next for true. Padrão: 10. Mínimo: 1. Máximo: 100.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor recebido em page.next_after para avançar. Copie o valor inteiro e mantenha a mesma chave de API. Não envie junto de before. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor recebido em page.previous_before para voltar. Copie o valor inteiro e mantenha a mesma chave de API. Não envie junto de after. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
}
ListWithdrawalDestinationsParams contains the fields defined by the public API.
type ListWithdrawalsParams ¶
type ListWithdrawalsParams struct {
// PageSize Quantidade de saques por página. Padrão: 10. Mínimo: 1. Máximo: 100. Exemplo: 10.
PageSize Optional[int64] `json:"page_size,omitzero"`
// After Cursor next_after retornado na página anterior. Mantenha os mesmos filtros e a mesma ordem da consulta. Comprimento máximo: 128.
After Optional[string] `json:"after,omitzero"`
// Before Cursor previous_before retornado na página seguinte. Mantenha os mesmos filtros e a mesma ordem da consulta. Comprimento máximo: 128.
Before Optional[string] `json:"before,omitzero"`
// Status Filtre por um ou mais estados separados por vírgula: PENDING, PROCESSING, COMPLETED, FAILED ou CANCELED. Comprimento máximo: 100. Exemplo: "COMPLETED".
Status Optional[string] `json:"status,omitzero"`
// RequestedGte Retorne saques solicitados a partir deste instante, inclusive. Informe segundos Unix UTC. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791878400.
RequestedGte Optional[int64] `json:"requested_gte,omitzero"`
// RequestedLte Retorne saques solicitados até este instante, inclusive. Informe segundos Unix UTC. Mínimo: 1. Máximo: 253402300799. Exemplo: 1791964800.
RequestedLte Optional[int64] `json:"requested_lte,omitzero"`
// SortOrder Ordenação pela data de solicitação: desc mostra os mais recentes primeiro; asc mostra os mais antigos primeiro. Padrão: "desc". Exemplo: "desc".
SortOrder Optional[string] `json:"sort_order,omitzero"`
}
ListWithdrawalsParams contains the fields defined by the public API.
type Optional ¶
type Optional[T any] struct { // contains filtered or unexported fields }
Optional distinguishes an omitted request field from a value or explicit null. Use Set(value) or Null[T](). The zero value omits the field.
func Set ¶
Set includes a field with the supplied value, including false, zero and empty text. A nil map or slice is encoded as null; initialize an empty map or slice to send {} or [].
func (Optional[T]) IsZero ¶
IsZero reports whether the field is omitted. It supports the JSON omitzero tag.
func (Optional[T]) MarshalJSON ¶
MarshalJSON encodes the value or null. Omission is controlled by the containing field's omitzero tag; serializing an omitted Optional on its own produces null.
func (*Optional[T]) UnmarshalJSON ¶
UnmarshalJSON records the supplied JSON value or explicit null. Invalid input leaves the existing Optional unchanged.
type PaymentLink ¶
type PaymentLink struct {
Resource `json:"-"`
// ID Identificador público do link de pagamento.
ID string `json:"id"`
// ChargeID Identificador da cobrança vinculada. Consulte a cobrança para obter seus dados financeiros.
ChargeID string `json:"charge_id"`
// URL URL do checkout dessa cobrança. Repetir a criação reutiliza o mesmo link.
URL string `json:"url"`
// SuccessRedirectURL URL de retorno após a confirmação do pagamento, ou null quando não configurada.
SuccessRedirectURL *string `json:"success_redirect_url"`
// CancelRedirectURL URL de retorno ao seu site, ou null quando não configurada. Voltar ao site não cancela a cobrança.
CancelRedirectURL *string `json:"cancel_redirect_url"`
// PaymentMethodTypes Configuração própria dos meios do link, ou null para herança. A cobrança e a disponibilidade da plataforma continuam limitando os meios aceitos.
PaymentMethodTypes *[]int64 `json:"payment_method_types"`
// CreatedAt Data de criação do link em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Data da última alteração do link ou de suas configurações em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
// IsActive Indica se o link está ativo. False significa que o checkout foi pausado. Um link ativo continua sujeito às condições da cobrança.
IsActive bool `json:"is_active"`
}
PaymentLink contains the fields defined by the public API.
func (PaymentLink) MarshalJSON ¶
func (v PaymentLink) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLink) UnmarshalJSON ¶
func (v *PaymentLink) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLink response.
type PaymentLinkCreatedWebhookEvent ¶ added in v0.2.0
type PaymentLinkCreatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data PaymentLinkCreatedWebhookEventData `json:"data"`
}
PaymentLinkCreatedWebhookEvent contains the fields defined by the public API.
func (PaymentLinkCreatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v PaymentLinkCreatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkCreatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *PaymentLinkCreatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkCreatedWebhookEvent response.
type PaymentLinkCreatedWebhookEventData ¶ added in v0.2.0
type PaymentLinkCreatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
PaymentLinkCreatedWebhookEventData contains the fields defined by the public API.
func (PaymentLinkCreatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v PaymentLinkCreatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkCreatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *PaymentLinkCreatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkCreatedWebhookEventData response.
type PaymentLinkDetails ¶
type PaymentLinkDetails struct {
Resource `json:"-"`
// ID Identificador público do link de pagamento.
ID string `json:"id"`
// ChargeID Identificador da cobrança vinculada. Consulte a cobrança para obter seus dados financeiros.
ChargeID string `json:"charge_id"`
// URL URL do checkout dessa cobrança. Repetir a criação reutiliza o mesmo link.
URL string `json:"url"`
// SuccessRedirectURL URL de retorno após a confirmação do pagamento, ou null quando não configurada.
SuccessRedirectURL *string `json:"success_redirect_url"`
// CancelRedirectURL URL de retorno ao seu site, ou null quando não configurada. Voltar ao site não cancela a cobrança.
CancelRedirectURL *string `json:"cancel_redirect_url"`
// PaymentMethodTypes Configuração própria de Pix e boleto no link. Null indica herança; uma lista vazia indica que a configuração não contém nenhum desses meios. A disponibilidade efetiva aparece em effective_payment_method_types.
PaymentMethodTypes *[]int64 `json:"payment_method_types"`
// CreatedAt Data de criação do link em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Data da última alteração do link ou de suas configurações em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
// IsPayable Indica se a cobrança ainda pode ser paga por este link. Links pausados e cobranças pagas, revogadas ou vencidas, por exemplo, retornam false. A informação vale para o instante da consulta e não confirma pagamento.
IsPayable bool `json:"is_payable"`
// EffectivePaymentMethodTypes Meios de pagamento definidos pelas configurações da cobrança, do link e da conta, entre os disponíveis na plataforma. Uma cobrança já paga ou um link pausado pode continuar mostrando Pix e boleto nessa lista. Use is_payable para saber se ainda é possível pagar pelo checkout.
EffectivePaymentMethodTypes []int64 `json:"effective_payment_method_types"`
UnavailableReason *PaymentLinkUnavailableReason `json:"unavailable_reason"`
// IsActive Indica se o link está ativo. False significa que o checkout foi pausado. Um link ativo continua sujeito às condições da cobrança.
IsActive bool `json:"is_active"`
}
PaymentLinkDetails Dados do link de pagamento de uma cobrança.
func (PaymentLinkDetails) MarshalJSON ¶
func (v PaymentLinkDetails) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkDetails) UnmarshalJSON ¶
func (v *PaymentLinkDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkDetails response.
type PaymentLinkEmailRequestAccepted ¶
type PaymentLinkEmailRequestAccepted struct {
Resource `json:"-"`
// ID Identificador público do link de pagamento.
ID string `json:"id"`
// ChargeID Identificador da cobrança vinculada ao link.
ChargeID string `json:"charge_id"`
// RecipientEmail E-mail escolhido para receber o link: o do pagador do boleto, quando registrado; na ausência dele, o da cobrança e, por último, o do cadastro atual do cliente. Um endereço inválido impede o envio.
RecipientEmail string `json:"recipient_email"`
// RetryAfterSeconds Tempo, em segundos, até permitir outra solicitação de envio para a cobrança.
RetryAfterSeconds int64 `json:"retry_after_seconds"`
// RetryAfterUntil Instante, em segundos Unix UTC, a partir do qual outra solicitação de envio pode ser feita.
RetryAfterUntil int64 `json:"retry_after_until"`
}
PaymentLinkEmailRequestAccepted contains the fields defined by the public API.
func (PaymentLinkEmailRequestAccepted) MarshalJSON ¶
func (v PaymentLinkEmailRequestAccepted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkEmailRequestAccepted) UnmarshalJSON ¶
func (v *PaymentLinkEmailRequestAccepted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkEmailRequestAccepted response.
type PaymentLinkListPage ¶
type PaymentLinkListPage struct {
Resource `json:"-"`
// PageSize Quantidade de links solicitada nesta página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há uma próxima página.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há uma página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor da próxima página, ou null.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor da página anterior, ou null.
PreviousBefore *string `json:"previous_before"`
}
PaymentLinkListPage contains the fields defined by the public API.
func (PaymentLinkListPage) MarshalJSON ¶
func (v PaymentLinkListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkListPage) UnmarshalJSON ¶
func (v *PaymentLinkListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkListPage response.
type PaymentLinkListResponse ¶
type PaymentLinkListResponse struct {
Resource `json:"-"`
// List Links presentes nesta página.
List []PaymentLink `json:"list"`
// Page Cursores para navegar entre páginas.
Page PaymentLinkListPage `json:"page"`
}
PaymentLinkListResponse contains the fields defined by the public API.
func (PaymentLinkListResponse) MarshalJSON ¶
func (v PaymentLinkListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkListResponse) NextPage ¶
func (v *PaymentLinkListResponse) NextPage(ctx context.Context) (*PaymentLinkListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*PaymentLinkListResponse) PreviousPage ¶
func (v *PaymentLinkListResponse) PreviousPage(ctx context.Context) (*PaymentLinkListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*PaymentLinkListResponse) UnmarshalJSON ¶
func (v *PaymentLinkListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkListResponse response.
type PaymentLinkUnavailableReason ¶
type PaymentLinkUnavailableReason struct {
Code string `json:"code"`
Message string `json:"message"`
}
PaymentLinkUnavailableReason Motivo que impede pagar a cobrança pelo link. O link continua disponível para consulta.
func (PaymentLinkUnavailableReason) MarshalJSON ¶
func (v PaymentLinkUnavailableReason) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkUnavailableReason) UnmarshalJSON ¶
func (v *PaymentLinkUnavailableReason) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkUnavailableReason response.
type PaymentLinkUpdatedWebhookEvent ¶ added in v0.2.0
type PaymentLinkUpdatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data PaymentLinkUpdatedWebhookEventData `json:"data"`
}
PaymentLinkUpdatedWebhookEvent contains the fields defined by the public API.
func (PaymentLinkUpdatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v PaymentLinkUpdatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkUpdatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *PaymentLinkUpdatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkUpdatedWebhookEvent response.
type PaymentLinkUpdatedWebhookEventData ¶ added in v0.2.0
type PaymentLinkUpdatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
PaymentLinkUpdatedWebhookEventData contains the fields defined by the public API.
func (PaymentLinkUpdatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v PaymentLinkUpdatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentLinkUpdatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *PaymentLinkUpdatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentLinkUpdatedWebhookEventData response.
type PaymentLinksService ¶
type PaymentLinksService struct {
// contains filtered or unexported fields
}
PaymentLinksService provides the endpoints available through Client.PaymentLinks.
func (*PaymentLinksService) Create ¶
func (s *PaymentLinksService) Create(ctx context.Context, params *CreatePaymentLinkParams, options ...RequestOption) (*PaymentLink, error)
Create Criar ou recuperar um link de pagamento
func (*PaymentLinksService) Get ¶
func (s *PaymentLinksService) Get(ctx context.Context, id string, options ...RequestOption) (*PaymentLinkDetails, error)
Get Recuperar um link de pagamento
func (*PaymentLinksService) List ¶
func (s *PaymentLinksService) List(ctx context.Context, params *ListPaymentLinksParams, options ...RequestOption) (*PaymentLinkListResponse, error)
List Listar links de pagamento
func (*PaymentLinksService) ListAll ¶
func (s *PaymentLinksService) ListAll(ctx context.Context, params *ListPaymentLinksParams, options ...RequestOption) *Iterator[PaymentLink]
ListAll lazily follows forward cursors and preserves the original filters.
func (*PaymentLinksService) SendEmail ¶
func (s *PaymentLinksService) SendEmail(ctx context.Context, id string, options ...RequestOption) (*PaymentLinkEmailRequestAccepted, error)
SendEmail Enviar link por e-mail
func (*PaymentLinksService) Update ¶
func (s *PaymentLinksService) Update(ctx context.Context, id string, params *UpdatePaymentLinkParams, options ...RequestOption) (*PaymentLink, error)
Update Atualizar um link de pagamento
type PaymentReceipt ¶
type PaymentReceipt struct {
Resource `json:"-"`
// ChargeID Identificador público da cobrança paga.
ChargeID string `json:"charge_id"`
// CustomerID Identificador público do cliente vinculado à cobrança.
CustomerID string `json:"customer_id"`
// AmountCents Valor original da cobrança paga, em centavos de real, sem descontar tarifas ou devoluções.
AmountCents int64 `json:"amount_cents"`
// PaymentMethod Meio registrado no pagamento: 1 Pix, 2 boleto, 3 cartão de crédito ou 4 cartão de débito. O código 0 indica meio não informado.
PaymentMethod int64 `json:"payment_method"`
// PaidAt Data e hora do pagamento confirmado, em segundos Unix UTC.
PaidAt int64 `json:"paid_at"`
// Customer Dados cadastrais do cliente associados à cobrança. Não comprovam a identidade bancária de quem efetuou o pagamento.
Customer ReceiptParty `json:"customer"`
// Merchant Dados cadastrais da empresa recebedora.
Merchant ReceiptParty `json:"merchant"`
// IsSandbox Indica que o pagamento pertence ao Sandbox e não movimentou dinheiro real.
IsSandbox bool `json:"is_sandbox"`
// IsFiscalDocument Sempre false. O recibo da Raims não substitui nota fiscal.
IsFiscalDocument bool `json:"is_fiscal_document"`
// EndToEndID Identificador bancário do recebimento Pix, quando disponível. Retorna null no Sandbox, nos pagamentos por boleto e quando o identificador do recebimento não está confirmado. É diferente do ID da cobrança e dos dados de emissão do Pix.
EndToEndID *string `json:"end_to_end_id"`
}
PaymentReceipt Pagamento confirmado e identificação cadastral das partes da cobrança. O valor corresponde ao recebimento original, sem descontar estornos ou tarifas.
func (PaymentReceipt) MarshalJSON ¶
func (v PaymentReceipt) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PaymentReceipt) UnmarshalJSON ¶
func (v *PaymentReceipt) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PaymentReceipt response.
type PixAvailableWebhookEvent ¶ added in v0.2.0
type PixAvailableWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data PixAvailableWebhookEventData `json:"data"`
}
PixAvailableWebhookEvent contains the fields defined by the public API.
func (PixAvailableWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v PixAvailableWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PixAvailableWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *PixAvailableWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PixAvailableWebhookEvent response.
type PixAvailableWebhookEventData ¶ added in v0.2.0
type PixAvailableWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
PixAvailableWebhookEventData contains the fields defined by the public API.
func (PixAvailableWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v PixAvailableWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PixAvailableWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *PixAvailableWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PixAvailableWebhookEventData response.
type PixIssuanceFailedWebhookEvent ¶ added in v0.2.0
type PixIssuanceFailedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data PixIssuanceFailedWebhookEventData `json:"data"`
}
PixIssuanceFailedWebhookEvent contains the fields defined by the public API.
func (PixIssuanceFailedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v PixIssuanceFailedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PixIssuanceFailedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *PixIssuanceFailedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PixIssuanceFailedWebhookEvent response.
type PixIssuanceFailedWebhookEventData ¶ added in v0.2.0
type PixIssuanceFailedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
PixIssuanceFailedWebhookEventData contains the fields defined by the public API.
func (PixIssuanceFailedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v PixIssuanceFailedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PixIssuanceFailedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *PixIssuanceFailedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PixIssuanceFailedWebhookEventData response.
type PixRefundReceivedWebhookEvent ¶ added in v0.2.0
type PixRefundReceivedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data PixRefundReceivedWebhookEventData `json:"data"`
}
PixRefundReceivedWebhookEvent contains the fields defined by the public API.
func (PixRefundReceivedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v PixRefundReceivedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PixRefundReceivedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *PixRefundReceivedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PixRefundReceivedWebhookEvent response.
type PixRefundReceivedWebhookEventData ¶ added in v0.2.0
type PixRefundReceivedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
PixRefundReceivedWebhookEventData contains the fields defined by the public API.
func (PixRefundReceivedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v PixRefundReceivedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*PixRefundReceivedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *PixRefundReceivedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public PixRefundReceivedWebhookEventData response.
type ProtocolError ¶
type ProtocolError struct {
// Reason describes the protocol mismatch without including payloads.
Reason string
// Response contains HTTP metadata when a response was received.
Response *Response
}
ProtocolError indicates an unexpected status, body, or pagination cursor.
func (*ProtocolError) Error ¶
func (e *ProtocolError) Error() string
Error returns the protocol mismatch description.
type ReceiptParty ¶
type ReceiptParty struct {
Resource `json:"-"`
// Name Nome cadastral, ou null quando não informado.
Name *string `json:"name"`
// TaxID CPF ou CNPJ cadastral, ou null quando não informado.
TaxID *string `json:"tax_id"`
}
ReceiptParty Nome e documento cadastrais associados à cobrança, sem dados de conta bancária.
func (ReceiptParty) MarshalJSON ¶
func (v ReceiptParty) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*ReceiptParty) UnmarshalJSON ¶
func (v *ReceiptParty) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public ReceiptParty response.
type Refund ¶
type Refund struct {
Resource `json:"-"`
// ID Identificador público da solicitação de estorno.
ID string `json:"id"`
// ChargeID Identificador da cobrança que recebeu o pagamento original.
ChargeID string `json:"charge_id"`
// AmountCents Valor solicitado para devolução, em centavos de real.
AmountCents int64 `json:"amount_cents"`
// Description Descrição da solicitação, ou null quando não informada.
Description *string `json:"description"`
// Status Estado atual: reserved para solicitação em preparação, accepted para pedido aceito e aguardando confirmação, completed para devolução concluída, failed para falha confirmada e unknown para resultado ainda não confirmado. Consulte a mesma solicitação enquanto não houver resultado confirmado.
Status string `json:"status"`
// CreatedAt Data da solicitação, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// CompletedAt Data da confirmação da devolução, em segundos Unix UTC, ou null.
CompletedAt *int64 `json:"completed_at"`
// FailedAt Data da falha confirmada, em segundos Unix UTC, ou null.
FailedAt *int64 `json:"failed_at"`
// FailureReason Motivo disponível quando o estado é failed, ou null nos demais estados. Uma falha sem causa registrada usa REFUND_FAILURE_REASON_UNAVAILABLE; não presuma que o pedido foi rejeitado.
FailureReason *RefundFailureReason `json:"failure_reason"`
}
Refund Solicitação de devolução Pix vinculada a uma cobrança.
func (Refund) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Refund) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Refund response.
type RefundAcceptedWebhookEvent ¶ added in v0.2.0
type RefundAcceptedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data RefundAcceptedWebhookEventData `json:"data"`
}
RefundAcceptedWebhookEvent contains the fields defined by the public API.
func (RefundAcceptedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v RefundAcceptedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundAcceptedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundAcceptedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundAcceptedWebhookEvent response.
type RefundAcceptedWebhookEventData ¶ added in v0.2.0
type RefundAcceptedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
// AmountCents is defined by the public API.
AmountCents *int64 `json:"amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
RefundAcceptedWebhookEventData contains the fields defined by the public API.
func (RefundAcceptedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v RefundAcceptedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundAcceptedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundAcceptedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundAcceptedWebhookEventData response.
type RefundCompletedWebhookEvent ¶ added in v0.2.0
type RefundCompletedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data RefundCompletedWebhookEventData `json:"data"`
}
RefundCompletedWebhookEvent contains the fields defined by the public API.
func (RefundCompletedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v RefundCompletedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundCompletedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundCompletedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundCompletedWebhookEvent response.
type RefundCompletedWebhookEventData ¶ added in v0.2.0
type RefundCompletedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
// StatementID is defined by the public API.
StatementID *string `json:"statement_id"`
// AmountCents is defined by the public API.
AmountCents *int64 `json:"amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
RefundCompletedWebhookEventData contains the fields defined by the public API.
func (RefundCompletedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v RefundCompletedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundCompletedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundCompletedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundCompletedWebhookEventData response.
type RefundEligibility ¶
type RefundEligibility struct {
Resource `json:"-"`
// ChargeID Identificador público da cobrança consultada.
ChargeID string `json:"charge_id"`
// Eligible Indica se a cobrança pode receber um pedido de devolução nas condições atuais.
Eligible bool `json:"eligible"`
// Reason Motivo que impede a devolução, ou null quando eligible for true. Quando o impedimento for o estado, a mensagem informa o estado atual da cobrança e os estados aceitos.
Reason *RefundUnavailableReason `json:"reason"`
// RefundableAmountCents Valor restante da cobrança que pode ser devolvido, em centavos de real. O máximo disponível para um pedido agora está em max_refund_amount_cents.
RefundableAmountCents int64 `json:"refundable_amount_cents"`
// PendingAmountCents Valor de solicitações que ainda aguardam resultado, em centavos de real.
PendingAmountCents int64 `json:"pending_amount_cents"`
// MaxRefundAmountCents Máximo que pode ser solicitado agora, em centavos de real, considerando o restante da cobrança e o saldo disponível. Zero quando houver impedimento. A consulta não reserva esse valor.
MaxRefundAmountCents int64 `json:"max_refund_amount_cents"`
}
RefundEligibility Disponibilidade atual para solicitar um estorno Pix.
func (RefundEligibility) MarshalJSON ¶
func (v RefundEligibility) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundEligibility) UnmarshalJSON ¶
func (v *RefundEligibility) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundEligibility response.
type RefundFailedWebhookEvent ¶ added in v0.2.0
type RefundFailedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data RefundFailedWebhookEventData `json:"data"`
}
RefundFailedWebhookEvent contains the fields defined by the public API.
func (RefundFailedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v RefundFailedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundFailedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundFailedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundFailedWebhookEvent response.
type RefundFailedWebhookEventData ¶ added in v0.2.0
type RefundFailedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
// AmountCents is defined by the public API.
AmountCents *int64 `json:"amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
// FailureReasonCode is defined by the public API.
FailureReasonCode *string `json:"failure_reason_code"`
}
RefundFailedWebhookEventData contains the fields defined by the public API.
func (RefundFailedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v RefundFailedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundFailedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundFailedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundFailedWebhookEventData response.
type RefundFailureReason ¶
type RefundFailureReason struct {
Resource `json:"-"`
// Code Código da causa confirmada. REFUND_FAILURE_REASON_UNAVAILABLE informa que a causa não está disponível.
Code string `json:"code"`
// Message Explicação em inglês e orientação para acompanhamento. Use code para tratar a causa; não dependa do texto literal.
Message string `json:"message"`
}
RefundFailureReason Causa pública de uma falha confirmada na solicitação de estorno.
func (RefundFailureReason) MarshalJSON ¶
func (v RefundFailureReason) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundFailureReason) UnmarshalJSON ¶
func (v *RefundFailureReason) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundFailureReason response.
type RefundListPage ¶
type RefundListPage struct {
Resource `json:"-"`
// PageSize Quantidade de estornos solicitada nesta página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há uma próxima página.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há uma página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor da próxima página, ou null.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor da página anterior, ou null.
PreviousBefore *string `json:"previous_before"`
}
RefundListPage Informações para navegar pela mesma listagem de estornos.
func (RefundListPage) MarshalJSON ¶
func (v RefundListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundListPage) UnmarshalJSON ¶
func (v *RefundListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundListPage response.
type RefundListResponse ¶
type RefundListResponse struct {
Resource `json:"-"`
// List Estornos presentes nesta página, dos mais recentes para os mais antigos.
List []Refund `json:"list"`
// Page Cursores para continuar a mesma listagem, com a mesma empresa, ambiente e cobrança quando informada.
Page RefundListPage `json:"page"`
}
RefundListResponse Página de solicitações de estorno no escopo consultado.
func (RefundListResponse) MarshalJSON ¶
func (v RefundListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundListResponse) NextPage ¶
func (v *RefundListResponse) NextPage(ctx context.Context) (*RefundListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*RefundListResponse) PreviousPage ¶
func (v *RefundListResponse) PreviousPage(ctx context.Context) (*RefundListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*RefundListResponse) UnmarshalJSON ¶
func (v *RefundListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundListResponse response.
type RefundReconciliationRequiredWebhookEvent ¶ added in v0.2.0
type RefundReconciliationRequiredWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data RefundReconciliationRequiredWebhookEventData `json:"data"`
}
RefundReconciliationRequiredWebhookEvent contains the fields defined by the public API.
func (RefundReconciliationRequiredWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v RefundReconciliationRequiredWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundReconciliationRequiredWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundReconciliationRequiredWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundReconciliationRequiredWebhookEvent response.
type RefundReconciliationRequiredWebhookEventData ¶ added in v0.2.0
type RefundReconciliationRequiredWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
// AmountCents is defined by the public API.
AmountCents *int64 `json:"amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
RefundReconciliationRequiredWebhookEventData contains the fields defined by the public API.
func (RefundReconciliationRequiredWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v RefundReconciliationRequiredWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundReconciliationRequiredWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundReconciliationRequiredWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundReconciliationRequiredWebhookEventData response.
type RefundRequestedWebhookEvent ¶ added in v0.2.0
type RefundRequestedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data RefundRequestedWebhookEventData `json:"data"`
}
RefundRequestedWebhookEvent contains the fields defined by the public API.
func (RefundRequestedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v RefundRequestedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundRequestedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundRequestedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundRequestedWebhookEvent response.
type RefundRequestedWebhookEventData ¶ added in v0.2.0
type RefundRequestedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// ChargeID is defined by the public API.
ChargeID *string `json:"charge_id"`
// AmountCents is defined by the public API.
AmountCents *int64 `json:"amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
}
RefundRequestedWebhookEventData contains the fields defined by the public API.
func (RefundRequestedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v RefundRequestedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundRequestedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *RefundRequestedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundRequestedWebhookEventData response.
type RefundUnavailableReason ¶
RefundUnavailableReason Condição que impede um pedido de devolução.
func (RefundUnavailableReason) MarshalJSON ¶
func (v RefundUnavailableReason) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RefundUnavailableReason) UnmarshalJSON ¶
func (v *RefundUnavailableReason) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RefundUnavailableReason response.
type RefundsService ¶
type RefundsService struct {
// contains filtered or unexported fields
}
RefundsService provides the endpoints available through Client.Refunds.
func (*RefundsService) Get ¶
func (s *RefundsService) Get(ctx context.Context, id string, options ...RequestOption) (*Refund, error)
Get Recuperar um estorno
func (*RefundsService) GetReceipt ¶
func (s *RefundsService) GetReceipt(ctx context.Context, id string, options ...RequestOption) (*FinancialDocument, error)
GetReceipt Baixar comprovante de estorno
func (*RefundsService) List ¶
func (s *RefundsService) List(ctx context.Context, params *ListRefundsParams, options ...RequestOption) (*RefundListResponse, error)
List Listar estornos
func (*RefundsService) ListAll ¶
func (s *RefundsService) ListAll(ctx context.Context, params *ListRefundsParams, options ...RequestOption) *Iterator[Refund]
ListAll lazily follows forward cursors and preserves the original filters.
type RemoveCustomersParams ¶
type RemoveCustomersParams struct {
// Identifiers IDs dos clientes que deseja remover. IDs repetidos não geram mais de uma remoção. IDs inválidos ou de clientes que a chave não pode acessar aparecem em invalid.
Identifiers Optional[[]*string] `json:"identifiers,omitzero"`
}
RemoveCustomersParams contains the fields defined by the public API.
type RequestDiagnostics ¶
type RequestDiagnostics struct {
// Method is the HTTP method of the attempt.
Method string
// Path is the endpoint template, with placeholders instead of resource IDs.
Path string
// Attempt starts at one and increases for each eligible read retry.
Attempt int
// Duration covers transport and response-body reading, before the observer runs.
Duration time.Duration
// StatusCode is zero when no HTTP response was received.
StatusCode int
// RequestID is the response correlation identifier, when available.
RequestID string
}
RequestDiagnostics contains no credentials, resource IDs, queries or payloads.
type RequestOption ¶
type RequestOption func(*requestConfig) error
RequestOption configures a single request and is validated before HTTP is sent. Collection navigation preserves the options of its original request.
func WithIdempotencyKey ¶
func WithIdempotencyKey(key string) RequestOption
WithIdempotencyKey sends a persisted key for an endpoint that accepts idempotency. The key must contain 1 to 255 visible ASCII characters without spaces. Keep the same key and parameters when repeating the same intention.
func WithRequestTimeout ¶
func WithRequestTimeout(timeout time.Duration) RequestOption
WithRequestTimeout overrides the positive timeout of each HTTP attempt for this call. It includes response-body reading. Use a context deadline to bound retries and backoff.
type ResendWebhookDeliveriesParams ¶ added in v0.2.0
type ResendWebhookDeliveriesParams struct {
// DeliveryIds Identificadores das entregas obtidos no histórico. IDs repetidos ou entregas do mesmo evento para o mesmo destino geram um único reenvio, com o resultado repetido nas posições correspondentes.
DeliveryIds Optional[[]string] `json:"delivery_ids,omitzero"`
}
ResendWebhookDeliveriesParams Entregas escolhidas para reenvio. Uma lista inválida impede o processamento do pedido.
type ResolveChargeScenarioParams ¶
type ResolveChargeScenarioParams struct {
// Action Ação a testar: pix_issuance para emissão Pix, boleto_issuance para emissão de boleto ou cancellation para cancelamento.
Action Optional[string] `json:"action,omitzero"`
// Outcome Resultado para a pendência: completed conclui a ação; failed confirma a falha.
Outcome Optional[string] `json:"outcome,omitzero"`
}
ResolveChargeScenarioParams Ação pendente e resultado da simulação.
type Resource ¶
type Resource struct {
// LastResponse contains HTTP metadata for a resource returned by a client call.
LastResponse *Response `json:"-"`
// RawJSON preserves the original bytes of this object, including future fields.
RawJSON json.RawMessage `json:"-"`
// ExtraFields contains editable future fields with bytes independent of RawJSON.
ExtraFields map[string]json.RawMessage `json:"-"`
// contains filtered or unexported fields
}
Resource retains the original fields, including future fields and explicit nulls.
type Response ¶
type Response struct {
// StatusCode is the received HTTP status; 202 indicates a pending result.
StatusCode int
// RequestID is the response correlation identifier, when available.
RequestID string
// RetryAfter is the parsed scheduling hint, capped at 24 hours.
RetryAfter time.Duration
// IdempotencyReplayed reports the API's Idempotency-Replayed header.
IdempotencyReplayed bool
}
Response contains metadata only. Status 202 indicates a pending result.
type RevokeChargeResult ¶
type RevokeChargeResult struct {
Resource `json:"-"`
// ID Identificador público da cobrança.
ID string `json:"id"`
// Status Estado atual da cobrança, considerando o vencimento.
Status int64 `json:"status"`
// Revoked Indica que a revogação foi confirmada.
Revoked bool `json:"revoked"`
// RevocationPending Indica que o cancelamento ainda aguarda confirmação.
RevocationPending bool `json:"revocation_pending"`
}
RevokeChargeResult contains the fields defined by the public API.
func (RevokeChargeResult) MarshalJSON ¶
func (v RevokeChargeResult) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*RevokeChargeResult) UnmarshalJSON ¶
func (v *RevokeChargeResult) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public RevokeChargeResult response.
type RotateWebhookSecretParams ¶
type RotateWebhookSecretParams struct {
// GracePeriodSeconds Período em que o segredo anterior pode continuar assinando envios. Zero gera um novo segredo e encerra a validade dos segredos anteriores, inclusive durante uma transição ativa. Requisições já autorizadas ou em andamento podem chegar com a assinatura anterior.
GracePeriodSeconds Optional[int64] `json:"grace_period_seconds,omitzero"`
}
RotateWebhookSecretParams Prazo de transição entre os segredos de assinatura.
type SetWebhookPauseParams ¶
type SetWebhookPauseParams struct {
// IsPaused Envie true para pausar os envios ou false para retomá-los. Repetir o mesmo valor preserva o estado e a data de pausa.
IsPaused Optional[bool] `json:"is_paused,omitzero"`
}
SetWebhookPauseParams contains the fields defined by the public API.
type SignatureError ¶
type SignatureError struct {
// contains filtered or unexported fields
}
SignatureError reports an invalid webhook signature, timestamp, or body. It does not retain the payload, signing headers, or secret.
func (*SignatureError) Error ¶
func (e *SignatureError) Error() string
Error describes the signature failure without retaining the secret or payload.
type SimulationChargesService ¶
type SimulationChargesService struct {
// contains filtered or unexported fields
}
SimulationChargesService provides the endpoints available through Client.Simulations.Charges.
func (*SimulationChargesService) CompensateBoleto ¶
func (s *SimulationChargesService) CompensateBoleto(ctx context.Context, id string, options ...RequestOption) (*ChargeBoletoCompensation, error)
CompensateBoleto Simular compensação de boleto
func (*SimulationChargesService) ConfigureScenario ¶
func (s *SimulationChargesService) ConfigureScenario(ctx context.Context, id string, params *ChargeScenarioParams, options ...RequestOption) (*ChargeScenario, error)
ConfigureScenario Preparar cenário
func (*SimulationChargesService) ConfirmPayment ¶
func (s *SimulationChargesService) ConfirmPayment(ctx context.Context, id string, options ...RequestOption) (*ChargeSimulation, error)
ConfirmPayment Confirmar pagamento
func (*SimulationChargesService) CreateRefund ¶
func (s *SimulationChargesService) CreateRefund(ctx context.Context, id string, params *CreateRefundParams, options ...RequestOption) (*Refund, error)
CreateRefund Simular estorno pendente
func (*SimulationChargesService) FailPayment ¶
func (s *SimulationChargesService) FailPayment(ctx context.Context, id string, options ...RequestOption) (*ChargeSimulation, error)
FailPayment Simular falha no pagamento
func (*SimulationChargesService) IssuePayment ¶
func (s *SimulationChargesService) IssuePayment(ctx context.Context, id string, params *IssueSimulationPaymentParams, options ...RequestOption) (*Charge, error)
IssuePayment Emitir pagamento de teste
func (*SimulationChargesService) ResolveScenario ¶
func (s *SimulationChargesService) ResolveScenario(ctx context.Context, id string, params *ResolveChargeScenarioParams, options ...RequestOption) (*ChargeScenario, error)
ResolveScenario Resolver cenário pendente
type SimulationRefundsService ¶
type SimulationRefundsService struct {
// contains filtered or unexported fields
}
SimulationRefundsService provides the endpoints available through Client.Simulations.Refunds.
func (*SimulationRefundsService) Complete ¶
func (s *SimulationRefundsService) Complete(ctx context.Context, id string, options ...RequestOption) (*Refund, error)
Complete Concluir estorno simulado
func (*SimulationRefundsService) Fail ¶
func (s *SimulationRefundsService) Fail(ctx context.Context, id string, options ...RequestOption) (*Refund, error)
Fail Simular falha no estorno
type SimulationsService ¶
type SimulationsService struct {
// Charges provides charge payment and scenario simulations.
Charges *SimulationChargesService
// Refunds provides refund completion and failure simulations.
Refunds *SimulationRefundsService
}
SimulationsService groups the endpoints that require Sandbox credentials.
type Statement ¶
type Statement struct {
Resource `json:"-"`
// ID Identificador público do lançamento, com prefixo st_.
ID string `json:"id"`
// ReferenceID Identificador do recurso relacionado, ou null quando não houver referência. Cobranças usam ch_, contestações usam dp_, saques usam wd_ e ajustes usam adj_. Referências manuais podem não ter prefixo.
ReferenceID *string `json:"reference_id"`
// ReferenceType Categoria da referência: 1 cobrança; 2 contestação; 3 saque; 4 ajuste; 5 lançamento manual. Retorna null quando não houver referência.
ReferenceType *int64 `json:"reference_type"`
// StatementType Natureza do lançamento. Recebimentos, créditos por ajuste e liberações têm valor positivo; tarifas, saques, devoluções, débitos por ajuste e bloqueios têm valor negativo.
StatementType int64 `json:"statement_type"`
// AmountCents Valor assinado do lançamento em centavos de real. Por exemplo, 10000 representa R$ 100,00 e -149 representa uma saída de R$ 1,49.
AmountCents int64 `json:"amount_cents"`
// CreatedAt Instante do lançamento em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// RefundID ID do estorno que originou o lançamento, ou null quando não houver vínculo confirmado.
RefundID *string `json:"refund_id"`
// DisputeID ID da contestação vinculada ao lançamento, ou null quando não houver vínculo confirmado. Um bloqueio sem contestação identificada mantém este campo nulo.
DisputeID *string `json:"dispute_id"`
}
Statement contains the fields defined by the public API.
func (Statement) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Statement) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Statement response.
type StatementCreatedWebhookEvent ¶ added in v0.2.0
type StatementCreatedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data StatementCreatedWebhookEventData `json:"data"`
}
StatementCreatedWebhookEvent contains the fields defined by the public API.
func (StatementCreatedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v StatementCreatedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*StatementCreatedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *StatementCreatedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public StatementCreatedWebhookEvent response.
type StatementCreatedWebhookEventData ¶ added in v0.2.0
type StatementCreatedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
// AmountCents is defined by the public API.
AmountCents *int64 `json:"amount_cents"`
// Currency is defined by the public API.
Currency *string `json:"currency"`
// StatementType is defined by the public API.
StatementType *int64 `json:"statement_type"`
// ReferenceType is defined by the public API.
ReferenceType *int64 `json:"reference_type"`
// ReferenceID is defined by the public API.
ReferenceID *string `json:"reference_id"`
}
StatementCreatedWebhookEventData contains the fields defined by the public API.
func (StatementCreatedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v StatementCreatedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*StatementCreatedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *StatementCreatedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public StatementCreatedWebhookEventData response.
type StatementListPage ¶
type StatementListPage struct {
Resource `json:"-"`
// PageSize Tamanho efetivo da página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há uma próxima página.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há uma página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para after na próxima consulta, ou null no fim da lista.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para before na consulta anterior, ou null no início da lista.
PreviousBefore *string `json:"previous_before"`
}
StatementListPage contains the fields defined by the public API.
func (StatementListPage) MarshalJSON ¶
func (v StatementListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*StatementListPage) UnmarshalJSON ¶
func (v *StatementListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public StatementListPage response.
type StatementListResponse ¶
type StatementListResponse struct {
Resource `json:"-"`
// List Lançamentos da página, na ordem solicitada.
List []Statement `json:"list"`
// Page Tamanho da página e cursores para avançar ou voltar.
Page StatementListPage `json:"page"`
}
StatementListResponse contains the fields defined by the public API.
func (StatementListResponse) MarshalJSON ¶
func (v StatementListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*StatementListResponse) NextPage ¶
func (v *StatementListResponse) NextPage(ctx context.Context) (*StatementListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*StatementListResponse) PreviousPage ¶
func (v *StatementListResponse) PreviousPage(ctx context.Context) (*StatementListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*StatementListResponse) UnmarshalJSON ¶
func (v *StatementListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public StatementListResponse response.
type StatementsService ¶
type StatementsService struct {
// contains filtered or unexported fields
}
StatementsService provides the endpoints available through Client.Statements.
func (*StatementsService) Get ¶
func (s *StatementsService) Get(ctx context.Context, id string, options ...RequestOption) (*Statement, error)
Get Recuperar um lançamento
func (*StatementsService) List ¶
func (s *StatementsService) List(ctx context.Context, params *ListStatementsParams, options ...RequestOption) (*StatementListResponse, error)
List Recuperar extrato
func (*StatementsService) ListAll ¶
func (s *StatementsService) ListAll(ctx context.Context, params *ListStatementsParams, options ...RequestOption) *Iterator[Statement]
ListAll lazily follows forward cursors and preserves the original filters.
type TedReceivedWebhookEvent ¶ added in v0.2.0
type TedReceivedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data TedReceivedWebhookEventData `json:"data"`
}
TedReceivedWebhookEvent contains the fields defined by the public API.
func (TedReceivedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v TedReceivedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*TedReceivedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *TedReceivedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public TedReceivedWebhookEvent response.
type TedReceivedWebhookEventData ¶ added in v0.2.0
type TedReceivedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
TedReceivedWebhookEventData contains the fields defined by the public API.
func (TedReceivedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v TedReceivedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*TedReceivedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *TedReceivedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public TedReceivedWebhookEventData response.
type UpdateAutomaticWithdrawalSettingsParams ¶
type UpdateAutomaticWithdrawalSettingsParams struct {
// Enabled Ativa ou desativa novas tentativas de saque. Desativar não cancela saques já solicitados.
Enabled Optional[bool] `json:"enabled,omitzero"`
// MinimumAmountCents Saldo mínimo para tentar o saque, em centavos de real. O valor retirado depende do saldo disponível e do limite Pix restante.
MinimumAmountCents Optional[int64] `json:"minimum_amount_cents,omitzero"`
// Time Horário diário no formato HH:mm, pelo fuso de São Paulo.
Time Optional[string] `json:"time,omitzero"`
}
UpdateAutomaticWithdrawalSettingsParams Alterações da configuração de saque automático. Campos omitidos são preservados; null não é aceito.
type UpdateChargeParams ¶
type UpdateChargeParams struct {
// Title Título da cobrança. Omita para manter o título atual; envie null ou texto vazio para removê-lo.
Title Optional[string] `json:"title,omitzero"`
// Description Descrição da cobrança. Omita para manter a descrição atual; envie null ou texto vazio para removê-la.
Description Optional[string] `json:"description,omitzero"`
// ExternalReference Referência do pedido ou da cobrança no seu sistema. Omita para manter o valor atual; envie null ou texto vazio para removê-lo. Pode ser repetida em outras cobranças e é independente da referência do cliente.
ExternalReference Optional[string] `json:"external_reference,omitzero"`
// Metadata Dados de integração associados ao recurso. Informe pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir ou enviar {} preserva os dados; null remove todos os pares, e null em uma chave remove somente essa chave. Texto vazio é um valor válido.
Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}
UpdateChargeParams contains the fields defined by the public API.
type UpdateCheckoutSettingsParams ¶
type UpdateCheckoutSettingsParams struct {
// SupportEmail E-mail de suporte apresentado no checkout. Omitir preserva o valor; null ou texto vazio remove o contato.
SupportEmail Optional[string] `json:"support_email,omitzero"`
// HexPrimaryColor Cor principal do checkout no formato #RRGGBB. Omitir preserva o valor; null ou texto vazio não são aceitos.
HexPrimaryColor Optional[string] `json:"hex_primary_color,omitzero"`
// HexSecondaryColor Cor de fundo do checkout no formato #RRGGBB. Omitir preserva o valor; null ou texto vazio não são aceitos.
HexSecondaryColor Optional[string] `json:"hex_secondary_color,omitzero"`
// LogoUploadID ID retornado ao preparar o envio da logo. Envie o arquivo antes de associá-lo. Omitir preserva a imagem atual; null a remove.
LogoUploadID Optional[string] `json:"logo_upload_id,omitzero"`
// FaviconUploadID ID retornado ao preparar o envio do ícone. Envie o arquivo antes de associá-lo. Omitir preserva a imagem atual; null a remove.
FaviconUploadID Optional[string] `json:"favicon_upload_id,omitzero"`
}
UpdateCheckoutSettingsParams Alterações da aparência do checkout. Campos omitidos são preservados. Os identificadores de envio de imagem aceitam null para remover a imagem.
type UpdateCustomerParams ¶
type UpdateCustomerParams struct {
// FullName Nome completo do pagador. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
FullName Optional[string] `json:"full_name,omitzero"`
// Email E-mail do pagador. Atualizar o e-mail não envia uma mensagem. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
Email Optional[string] `json:"email,omitzero"`
// DialCode Código de discagem internacional. Pode ser informado sem phone_local. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
DialCode Optional[string] `json:"dial_code,omitzero"`
// PhoneLocal Número de telefone sem o código de discagem, com ou sem pontuação. Pode ser informado sem dial_code. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
PhoneLocal Optional[string] `json:"phone_local,omitzero"`
// ZipCode CEP do endereço, com ou sem hífen. Atualizar o CEP não preenche os outros campos de endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
ZipCode Optional[string] `json:"zip_code,omitzero"`
// Street Logradouro do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
Street Optional[string] `json:"street,omitzero"`
// StreetNumber Número do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
StreetNumber Optional[string] `json:"street_number,omitzero"`
// Complement Complemento do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
Complement Optional[string] `json:"complement,omitzero"`
// Neigh Bairro do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
Neigh Optional[string] `json:"neigh,omitzero"`
// City Cidade do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
City Optional[string] `json:"city,omitzero"`
// Uf Sigla do estado, como SP. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
Uf Optional[string] `json:"uf,omitzero"`
// ExternalReference Identificador do cliente no seu sistema. Omita para manter a referência atual; envie null ou texto vazio para removê-la. Use external_reference na listagem de clientes para buscar esse valor.
ExternalReference Optional[string] `json:"external_reference,omitzero"`
// Metadata Dados de integração associados ao recurso. Informe pares de chave e texto. Chaves diferenciam maiúsculas de minúsculas. Omitir ou enviar {} preserva os dados; null remove todos os pares, e null em uma chave remove somente essa chave. Texto vazio é um valor válido.
Metadata Optional[map[string]*string] `json:"metadata,omitzero"`
}
UpdateCustomerParams Campos do perfil e dados de integração do cliente. Omita um campo para manter seu valor. Nos campos de texto, null ou texto vazio apagam o conteúdo. Em metadata, null remove todos os pares, {} preserva o mapa e null em uma chave remove somente essa chave. CPF/CNPJ e ID não podem ser alterados.
type UpdatePaymentLinkParams ¶
type UpdatePaymentLinkParams struct {
// IsActive Envie false para pausar o checkout e true para reativar a mesma URL. Omitir preserva o estado atual. A pausa não cancela Pix ou boleto emitidos nem prorroga o vencimento.
IsActive Optional[bool] `json:"is_active,omitzero"`
// SuccessRedirectURL URL HTTPS de retorno após o pagamento confirmado. Omitir, enviar null ou texto vazio preserva a URL existente. Para removê-la, use clear_success_redirect_url com true, sem informar uma URL preenchida.
SuccessRedirectURL Optional[string] `json:"success_redirect_url,omitzero"`
// CancelRedirectURL URL HTTPS para voltar ao seu site. Esse retorno não cancela a cobrança. Omitir, enviar null ou texto vazio preserva a URL existente. Para removê-la, use clear_cancel_redirect_url com true, sem informar uma URL preenchida.
CancelRedirectURL Optional[string] `json:"cancel_redirect_url,omitzero"`
// ClearSuccessRedirectURL Envie true para remover o destino de retorno após o pagamento. False ou omissão não solicita remoção. Não envie true junto de success_redirect_url preenchida.
ClearSuccessRedirectURL Optional[bool] `json:"clear_success_redirect_url,omitzero"`
// ClearCancelRedirectURL Envie true para remover o destino de voltar ao site. False ou omissão não solicita remoção. Não envie true junto de cancel_redirect_url preenchida.
ClearCancelRedirectURL Optional[bool] `json:"clear_cancel_redirect_url,omitzero"`
// PaymentMethodTypes Meios permitidos no link. Omitir preserva a configuração; null remove a configuração própria. Uma lista limita os meios do checkout e não amplia os permitidos pela cobrança.
PaymentMethodTypes Optional[[]int64] `json:"payment_method_types,omitzero"`
}
UpdatePaymentLinkParams contains the fields defined by the public API.
type UpdateWebhookParams ¶
type UpdateWebhookParams struct {
// Name Novo nome do webhook.
Name Optional[string] `json:"name,omitzero"`
// URL Nova URL HTTPS que recebe os eventos, na porta padrão 443.
URL Optional[string] `json:"url,omitzero"`
// Events Lista completa dos eventos que o destino deve receber. Ela substitui a seleção anterior.
Events Optional[[]string] `json:"events,omitzero"`
// IsActive Use true para permitir envios ou false para desativar o destino.
IsActive Optional[bool] `json:"is_active,omitzero"`
}
UpdateWebhookParams Campos do webhook a alterar. Omita os campos que deseja manter.
type ValidationError ¶
type ValidationError struct {
// Field identifies the argument or request property to correct.
Field string
// Reason describes the rejected argument without including its value.
Reason string
}
ValidationError is detected before sending a request.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error identifies the invalid argument and the required correction.
type Webhook ¶
type Webhook struct {
Resource `json:"-"`
// ID Identificador público do webhook.
ID string `json:"id"`
// Name Nome usado para identificar o destino.
Name string `json:"name"`
// URL URL HTTPS cadastrada para receber os eventos.
URL string `json:"url"`
// Events Códigos dos eventos assinados por este destino.
Events []string `json:"events"`
// IsActive Indica se o webhook está ativo para receber eventos.
IsActive bool `json:"is_active"`
// DisabledReason Motivo da desativação: manual para uma ação do cliente; continuous_failure pode aparecer em cadastros desativados anteriormente por falhas. Retorna null quando o webhook está ativo.
DisabledReason *string `json:"disabled_reason"`
// DisabledAt Instante da desativação, em segundos Unix UTC, ou null quando o webhook está ativo ou essa data não foi registrada.
DisabledAt *int64 `json:"disabled_at"`
// PreviousSecretExpiresAt Fim da validade do segredo anterior, em segundos Unix UTC, ou null quando não há transição vigente.
PreviousSecretExpiresAt *int64 `json:"previous_secret_expires_at"`
// CreatedAt Instante do cadastro, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Instante da última alteração do cadastro, em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
// IsPaused Indica se os envios aguardam a retomada. O prazo original das entregas continua correndo durante a pausa.
IsPaused bool `json:"is_paused"`
// PausedAt Início da pausa atual, em segundos Unix UTC, ou null quando os envios não estão pausados.
PausedAt *int64 `json:"paused_at"`
}
Webhook Configuração de um destino para eventos.
func (Webhook) MarshalJSON ¶
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Webhook) UnmarshalJSON ¶
UnmarshalJSON validates and reads the public Webhook response.
type WebhookAdvanceAccepted ¶ added in v0.2.0
type WebhookAdvanceAccepted struct {
Resource `json:"-"`
// DeliveryID Identificador da mesma entrega cuja tentativa foi solicitada.
DeliveryID string `json:"delivery_id"`
}
WebhookAdvanceAccepted contains the fields defined by the public API.
func (WebhookAdvanceAccepted) MarshalJSON ¶ added in v0.2.0
func (v WebhookAdvanceAccepted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookAdvanceAccepted) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookAdvanceAccepted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookAdvanceAccepted response.
type WebhookAttempt ¶ added in v0.2.0
type WebhookAttempt struct {
Resource `json:"-"`
// ID Identificador desta tentativa.
ID string `json:"id"`
// DeliveryID Entrega à qual esta tentativa pertence.
DeliveryID string `json:"delivery_id"`
// AttemptNumber Número da tentativa dentro da entrega.
AttemptNumber int64 `json:"attempt_number"`
// CreatedAt Instante de conclusão da tentativa, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// StatusCode Status HTTP recebido do receptor, ou null quando não houve resposta HTTP registrada. A ausência de resposta não comprova que o evento deixou de ser processado.
StatusCode *int64 `json:"status_code"`
// DurationMs Tempo total da tentativa, em milissegundos. Inclui a preparação do envio e a leitura da resposta; não mede somente o tempo de resposta do receptor.
DurationMs json.Number `json:"duration_ms"`
// DestinationIP IP remoto da conexão usada nesta tentativa, ou null quando não foi capturado. Não corresponde a uma nova consulta DNS do endereço cadastrado.
DestinationIP *string `json:"destination_ip"`
// ErrorCode Código do erro da tentativa, ou null quando não houve erro.
ErrorCode *string `json:"error_code"`
// EndpointURL URL usada na tentativa, ou null quando esse dado não está disponível.
EndpointURL *string `json:"endpoint_url"`
// RequestAvailable Indica se o corpo preparado para a tentativa está disponível para consulta. Não comprova seu recebimento pelo destino.
RequestAvailable bool `json:"request_available"`
// ResponseBodyAvailable Indica se um corpo de resposta foi registrado e ainda está disponível.
ResponseBodyAvailable bool `json:"response_body_available"`
// ResponseBodyTruncated Indica se o corpo da resposta foi capturado parcialmente.
ResponseBodyTruncated bool `json:"response_body_truncated"`
}
WebhookAttempt Resultado de uma chamada HTTP ao destino.
func (WebhookAttempt) MarshalJSON ¶ added in v0.2.0
func (v WebhookAttempt) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookAttempt) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookAttempt) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookAttempt response.
type WebhookAttemptDetail ¶ added in v0.2.0
type WebhookAttemptDetail struct {
Resource `json:"-"`
// RequestBody Corpo preparado para esta tentativa, ou null quando não está disponível no histórico.
RequestBody *string `json:"request_body"`
// ResponseBody Conteúdo registrado da resposta, limitado a 8 KiB em UTF-8. Uma string vazia indica corpo vazio confirmado; null indica conteúdo indisponível. Confira response_body_truncated antes de interpretar o conteúdo.
ResponseBody *string `json:"response_body"`
// ID Identificador desta tentativa.
ID string `json:"id"`
// DeliveryID Entrega à qual esta tentativa pertence.
DeliveryID string `json:"delivery_id"`
// AttemptNumber Número da tentativa dentro da entrega.
AttemptNumber int64 `json:"attempt_number"`
// CreatedAt Instante de conclusão da tentativa, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// StatusCode Status HTTP recebido do receptor, ou null quando não houve resposta HTTP registrada. A ausência de resposta não comprova que o evento deixou de ser processado.
StatusCode *int64 `json:"status_code"`
// DurationMs Tempo total da tentativa, em milissegundos. Inclui a preparação do envio e a leitura da resposta; não mede somente o tempo de resposta do receptor.
DurationMs json.Number `json:"duration_ms"`
// DestinationIP IP remoto da conexão usada nesta tentativa, ou null quando não foi capturado. Não corresponde a uma nova consulta DNS do endereço cadastrado.
DestinationIP *string `json:"destination_ip"`
// ErrorCode Código do erro da tentativa, ou null quando não houve erro.
ErrorCode *string `json:"error_code"`
// EndpointURL URL usada na tentativa, ou null quando esse dado não está disponível.
EndpointURL *string `json:"endpoint_url"`
// RequestAvailable Indica se o corpo preparado para a tentativa está disponível para consulta. Não comprova seu recebimento pelo destino.
RequestAvailable bool `json:"request_available"`
// ResponseBodyAvailable Indica se um corpo de resposta foi registrado e ainda está disponível.
ResponseBodyAvailable bool `json:"response_body_available"`
// ResponseBodyTruncated Indica se o corpo da resposta foi capturado parcialmente.
ResponseBodyTruncated bool `json:"response_body_truncated"`
}
WebhookAttemptDetail Resultado e conteúdo disponível de uma chamada HTTP.
func (WebhookAttemptDetail) MarshalJSON ¶ added in v0.2.0
func (v WebhookAttemptDetail) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookAttemptDetail) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookAttemptDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookAttemptDetail response.
type WebhookAttemptListResponse ¶ added in v0.2.0
type WebhookAttemptListResponse struct {
Resource `json:"-"`
// List Tentativas desta página.
List []WebhookAttempt `json:"list"`
// Page Informações para continuar ou voltar na consulta.
Page WebhookDeliveryPage `json:"page"`
}
WebhookAttemptListResponse Página de tentativas de uma entrega.
func (WebhookAttemptListResponse) MarshalJSON ¶ added in v0.2.0
func (v WebhookAttemptListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookAttemptListResponse) NextPage ¶ added in v0.2.0
func (v *WebhookAttemptListResponse) NextPage(ctx context.Context) (*WebhookAttemptListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*WebhookAttemptListResponse) PreviousPage ¶ added in v0.2.0
func (v *WebhookAttemptListResponse) PreviousPage(ctx context.Context) (*WebhookAttemptListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*WebhookAttemptListResponse) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookAttemptListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookAttemptListResponse response.
type WebhookBulkResendAccepted ¶ added in v0.2.0
type WebhookBulkResendAccepted struct {
Resource `json:"-"`
// Results Um resultado para cada posição da lista enviada, na mesma ordem. A recusa de um item não impede o reenvio dos demais.
Results []WebhookBulkResendItem `json:"results"`
}
WebhookBulkResendAccepted Resultados individuais dos reenvios solicitados.
func (WebhookBulkResendAccepted) MarshalJSON ¶ added in v0.2.0
func (v WebhookBulkResendAccepted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookBulkResendAccepted) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookBulkResendAccepted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookBulkResendAccepted response.
type WebhookBulkResendItem ¶ added in v0.2.0
type WebhookBulkResendItem struct {
Resource `json:"-"`
// SourceDeliveryID Identificador da entrega recebida nesta posição da lista.
SourceDeliveryID string `json:"source_delivery_id"`
// DeliveryID Identificador da nova entrega, ou null quando o item foi recusado. Consulte essa entrega para acompanhar o resultado.
DeliveryID *string `json:"delivery_id"`
// EventID Identificador do evento original preservado no reenvio, ou null quando o item foi recusado.
EventID *string `json:"event_id"`
// Error Motivo da recusa, ou null quando o reenvio foi aceito. Os códigos possíveis são NOT_FOUND, WEBHOOK_TEST_NOT_RESENDABLE, WEBHOOK_RESEND_EXPIRED, WEBHOOK_RESEND_PAYLOAD_UNAVAILABLE e WEBHOOK_RESEND_NOT_ALLOWED.
Error *Error `json:"error"`
}
WebhookBulkResendItem Reenvio aceito ou motivo da recusa para uma entrega selecionada.
func (WebhookBulkResendItem) MarshalJSON ¶ added in v0.2.0
func (v WebhookBulkResendItem) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookBulkResendItem) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookBulkResendItem) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookBulkResendItem response.
type WebhookCreated ¶
type WebhookCreated struct {
Resource `json:"-"`
// ID Identificador público do webhook.
ID string `json:"id"`
// Name Nome usado para identificar o destino.
Name string `json:"name"`
// URL URL HTTPS cadastrada para receber os eventos.
URL string `json:"url"`
// Events Códigos dos eventos assinados por este destino.
Events []string `json:"events"`
// IsActive Indica se o webhook está ativo para receber eventos.
IsActive bool `json:"is_active"`
// DisabledReason Motivo da desativação: manual para uma ação do cliente; continuous_failure pode aparecer em cadastros desativados anteriormente por falhas. Retorna null quando o webhook está ativo.
DisabledReason *string `json:"disabled_reason"`
// DisabledAt Instante da desativação, em segundos Unix UTC, ou null quando o webhook está ativo ou essa data não foi registrada.
DisabledAt *int64 `json:"disabled_at"`
// PreviousSecretExpiresAt Fim da validade do segredo anterior, em segundos Unix UTC, ou null quando não há transição vigente.
PreviousSecretExpiresAt *int64 `json:"previous_secret_expires_at"`
// CreatedAt Instante do cadastro, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// UpdatedAt Instante da última alteração do cadastro, em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
// SecretKey Segredo usado para validar a assinatura dos eventos. Guarde-o em local seguro; as consultas do cadastro não o retornam.
SecretKey string `json:"secret_key"`
// IsPaused Indica se os envios aguardam a retomada. O prazo original das entregas continua correndo durante a pausa.
IsPaused bool `json:"is_paused"`
// PausedAt Início da pausa atual, em segundos Unix UTC, ou null quando os envios não estão pausados.
PausedAt *int64 `json:"paused_at"`
}
WebhookCreated Webhook cadastrado e segredo necessário para validar suas assinaturas.
func (WebhookCreated) MarshalJSON ¶
func (v WebhookCreated) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookCreated) UnmarshalJSON ¶
func (v *WebhookCreated) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookCreated response.
type WebhookDeliveriesService ¶ added in v0.2.0
type WebhookDeliveriesService struct {
// contains filtered or unexported fields
}
WebhookDeliveriesService provides the endpoints available through Client.WebhookDeliveries.
func (*WebhookDeliveriesService) Advance ¶ added in v0.2.0
func (s *WebhookDeliveriesService) Advance(ctx context.Context, delivery_id string, options ...RequestOption) (*WebhookAdvanceAccepted, error)
Advance Antecipar próxima tentativa
func (*WebhookDeliveriesService) Get ¶ added in v0.2.0
func (s *WebhookDeliveriesService) Get(ctx context.Context, delivery_id string, options ...RequestOption) (*WebhookDelivery, error)
Get Recuperar uma entrega
func (*WebhookDeliveriesService) GetAttempt ¶ added in v0.2.0
func (s *WebhookDeliveriesService) GetAttempt(ctx context.Context, delivery_id string, attempt_id string, options ...RequestOption) (*WebhookAttemptDetail, error)
GetAttempt Recuperar uma tentativa
func (*WebhookDeliveriesService) List ¶ added in v0.2.0
func (s *WebhookDeliveriesService) List(ctx context.Context, params *ListWebhookDeliveriesParams, options ...RequestOption) (*WebhookDeliveryListResponse, error)
List Listar entregas de webhooks
func (*WebhookDeliveriesService) ListAll ¶ added in v0.2.0
func (s *WebhookDeliveriesService) ListAll(ctx context.Context, params *ListWebhookDeliveriesParams, options ...RequestOption) *Iterator[WebhookDelivery]
ListAll lazily follows forward cursors and preserves the original filters.
func (*WebhookDeliveriesService) ListAttempts ¶ added in v0.2.0
func (s *WebhookDeliveriesService) ListAttempts(ctx context.Context, delivery_id string, params *ListWebhookDeliveryAttemptsParams, options ...RequestOption) (*WebhookAttemptListResponse, error)
ListAttempts Listar as tentativas de uma entrega
func (*WebhookDeliveriesService) ListAttemptsAll ¶ added in v0.2.0
func (s *WebhookDeliveriesService) ListAttemptsAll(ctx context.Context, delivery_id string, params *ListWebhookDeliveryAttemptsParams, options ...RequestOption) *Iterator[WebhookAttempt]
ListAttemptsAll lazily follows forward cursors and preserves the original filters.
func (*WebhookDeliveriesService) Resend ¶ added in v0.2.0
func (s *WebhookDeliveriesService) Resend(ctx context.Context, delivery_id string, options ...RequestOption) (*WebhookDeliveryResendAccepted, error)
Resend Reenviar um evento
func (*WebhookDeliveriesService) ResendMany ¶ added in v0.2.0
func (s *WebhookDeliveriesService) ResendMany(ctx context.Context, params *ResendWebhookDeliveriesParams, options ...RequestOption) (*WebhookBulkResendAccepted, error)
ResendMany Reenviar várias entregas
type WebhookDelivery ¶ added in v0.2.0
type WebhookDelivery struct {
Resource `json:"-"`
// ID Identificador desta entrega.
ID string `json:"id"`
// WebhookID Identificador do destino. Permanece no histórico após a exclusão do cadastro; pode ser null quando não for possível identificá-lo.
WebhookID *string `json:"webhook_id"`
// EventID Identificador do evento no conteúdo enviado. Reenvios preservam este valor.
EventID string `json:"event_id"`
// EventType Código do evento enviado ao destino.
EventType string `json:"event_type"`
// Status Estado mais recente da entrega. delivered confirma uma resposta HTTP 2xx do receptor, sem comprovar o processamento posterior no sistema de destino.
Status string `json:"status"`
// CreatedAt Instante de criação desta entrega, em segundos Unix UTC. O prazo de 30 dias de consulta do histórico começa nessa data.
CreatedAt int64 `json:"created_at"`
// EventCreatedAt Instante do evento original, em segundos Unix UTC.
EventCreatedAt int64 `json:"event_created_at"`
// DeadlineAt Fim do prazo de tentativas desta entrega, em segundos Unix UTC.
DeadlineAt int64 `json:"deadline_at"`
// NextAttemptAt Instante previsto para a próxima tentativa, em segundos Unix UTC, ou null quando não há próxima tentativa informada.
NextAttemptAt *int64 `json:"next_attempt_at"`
// UpdatedAt Instante da última atualização do acompanhamento, em segundos Unix UTC.
UpdatedAt int64 `json:"updated_at"`
}
WebhookDelivery Acompanhamento da entrega de um evento a um destino.
func (WebhookDelivery) MarshalJSON ¶ added in v0.2.0
func (v WebhookDelivery) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookDelivery) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookDelivery) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookDelivery response.
type WebhookDeliveryListResponse ¶ added in v0.2.0
type WebhookDeliveryListResponse struct {
Resource `json:"-"`
// List Entregas desta página.
List []WebhookDelivery `json:"list"`
// Page Informações para continuar ou voltar na consulta.
Page WebhookDeliveryPage `json:"page"`
}
WebhookDeliveryListResponse Página de entregas de webhooks.
func (WebhookDeliveryListResponse) MarshalJSON ¶ added in v0.2.0
func (v WebhookDeliveryListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookDeliveryListResponse) NextPage ¶ added in v0.2.0
func (v *WebhookDeliveryListResponse) NextPage(ctx context.Context) (*WebhookDeliveryListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*WebhookDeliveryListResponse) PreviousPage ¶ added in v0.2.0
func (v *WebhookDeliveryListResponse) PreviousPage(ctx context.Context) (*WebhookDeliveryListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*WebhookDeliveryListResponse) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookDeliveryListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookDeliveryListResponse response.
type WebhookDeliveryPage ¶ added in v0.2.0
type WebhookDeliveryPage struct {
Resource `json:"-"`
// PageSize Quantidade efetiva de registros por página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há outra página para avançar.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há outra página para voltar.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para usar em after, ou null quando não há próxima página.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para usar em before, ou null quando não há página anterior.
PreviousBefore *string `json:"previous_before"`
}
WebhookDeliveryPage Paginação do histórico de webhooks.
func (WebhookDeliveryPage) MarshalJSON ¶ added in v0.2.0
func (v WebhookDeliveryPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookDeliveryPage) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookDeliveryPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookDeliveryPage response.
type WebhookDeliveryResendAccepted ¶ added in v0.2.0
type WebhookDeliveryResendAccepted struct {
Resource `json:"-"`
// DeliveryID Identificador da nova entrega. Use-o para acompanhar o reenvio.
DeliveryID string `json:"delivery_id"`
// EventID Identificador original preservado no conteúdo enviado.
EventID string `json:"event_id"`
}
WebhookDeliveryResendAccepted Pedido de reenvio aceito.
func (WebhookDeliveryResendAccepted) MarshalJSON ¶ added in v0.2.0
func (v WebhookDeliveryResendAccepted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookDeliveryResendAccepted) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookDeliveryResendAccepted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookDeliveryResendAccepted response.
type WebhookEvent ¶ added in v0.2.0
type WebhookEvent struct {
Resource `json:"-"`
// ID Identificador do evento. É preservado nos reenvios.
ID string `json:"id"`
// EventType Nome do evento que originou a notificação.
EventType string `json:"event_type"`
// CreatedAt Instante em que o evento foi criado, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// ResourceType Tipo do recurso relacionado ao evento.
ResourceType string `json:"resource_type"`
// ResourceID Identificador público do recurso relacionado ao evento.
ResourceID string `json:"resource_id"`
}
WebhookEvent contains the fields defined by the public API.
func (WebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookEvent response.
type WebhookEventDetail ¶ added in v0.2.0
type WebhookEventDetail struct {
Resource `json:"-"`
// Payload Conteúdo JSON original do evento, retornado como texto. O reenvio preserva esse conteúdo.
Payload string `json:"payload"`
// ID Identificador do evento. É preservado nos reenvios.
ID string `json:"id"`
// EventType Nome do evento que originou a notificação.
EventType string `json:"event_type"`
// CreatedAt Instante em que o evento foi criado, em segundos Unix UTC.
CreatedAt int64 `json:"created_at"`
// ResourceType Tipo do recurso relacionado ao evento.
ResourceType string `json:"resource_type"`
// ResourceID Identificador público do recurso relacionado ao evento.
ResourceID string `json:"resource_id"`
}
WebhookEventDetail contains the fields defined by the public API.
func (WebhookEventDetail) MarshalJSON ¶ added in v0.2.0
func (v WebhookEventDetail) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookEventDetail) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookEventDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookEventDetail response.
type WebhookEventListResponse ¶ added in v0.2.0
type WebhookEventListResponse struct {
Resource `json:"-"`
// List Eventos encontrados na página atual.
List []WebhookEvent `json:"list"`
// Page Cursores e indicação de páginas disponíveis.
Page WebhookDeliveryPage `json:"page"`
}
WebhookEventListResponse contains the fields defined by the public API.
func (WebhookEventListResponse) MarshalJSON ¶ added in v0.2.0
func (v WebhookEventListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookEventListResponse) NextPage ¶ added in v0.2.0
func (v *WebhookEventListResponse) NextPage(ctx context.Context) (*WebhookEventListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*WebhookEventListResponse) PreviousPage ¶ added in v0.2.0
func (v *WebhookEventListResponse) PreviousPage(ctx context.Context) (*WebhookEventListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*WebhookEventListResponse) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookEventListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookEventListResponse response.
type WebhookEventType ¶
type WebhookEventType struct {
Resource `json:"-"`
// Code Código usado no campo events do cadastro e da atualização.
Code string `json:"code"`
}
WebhookEventType Um evento disponível para assinatura.
func (WebhookEventType) MarshalJSON ¶
func (v WebhookEventType) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookEventType) UnmarshalJSON ¶
func (v *WebhookEventType) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookEventType response.
type WebhookEventTypeListResponse ¶
type WebhookEventTypeListResponse struct {
Resource `json:"-"`
// List Catálogo de eventos disponíveis.
List []WebhookEventType `json:"list"`
}
WebhookEventTypeListResponse Eventos disponíveis para novas assinaturas.
func (WebhookEventTypeListResponse) MarshalJSON ¶
func (v WebhookEventTypeListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookEventTypeListResponse) UnmarshalJSON ¶
func (v *WebhookEventTypeListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookEventTypeListResponse response.
type WebhookEventTypesService ¶
type WebhookEventTypesService struct {
// contains filtered or unexported fields
}
WebhookEventTypesService provides the endpoints available through Client.WebhookEventTypes.
func (*WebhookEventTypesService) List ¶
func (s *WebhookEventTypesService) List(ctx context.Context, options ...RequestOption) (*WebhookEventTypeListResponse, error)
List Listar os eventos disponíveis
type WebhookEventsService ¶ added in v0.2.0
type WebhookEventsService struct {
// contains filtered or unexported fields
}
WebhookEventsService provides the endpoints available through Client.WebhookEvents.
func (*WebhookEventsService) Deliver ¶ added in v0.2.0
func (s *WebhookEventsService) Deliver(ctx context.Context, event_id string, params *DeliverWebhookEventParams, options ...RequestOption) (*WebhookDeliveryResendAccepted, error)
Deliver Enviar um evento para um webhook
func (*WebhookEventsService) Get ¶ added in v0.2.0
func (s *WebhookEventsService) Get(ctx context.Context, event_id string, options ...RequestOption) (*WebhookEventDetail, error)
Get Recuperar um evento de webhook
func (*WebhookEventsService) List ¶ added in v0.2.0
func (s *WebhookEventsService) List(ctx context.Context, params *ListWebhookEventsParams, options ...RequestOption) (*WebhookEventListResponse, error)
List Listar eventos de webhook
func (*WebhookEventsService) ListAll ¶ added in v0.2.0
func (s *WebhookEventsService) ListAll(ctx context.Context, params *ListWebhookEventsParams, options ...RequestOption) *Iterator[WebhookEvent]
ListAll lazily follows forward cursors and preserves the original filters.
type WebhookHealth ¶
type WebhookHealth struct {
Resource `json:"-"`
// WebhookID Identificador do webhook consultado.
WebhookID string `json:"webhook_id"`
// Status Situação conhecida do destino: unknown quando faltam dados, healthy após sucesso, failing durante uma sequência de falhas ou disabled quando está desativado.
Status string `json:"status"`
// FirstFailureAt Início da sequência atual de falhas, em segundos Unix UTC, ou null quando não há sequência de falhas informada.
FirstFailureAt *int64 `json:"first_failure_at"`
// LastFailureAt Última falha da sequência atual, em segundos Unix UTC, ou null quando não há sequência de falhas informada.
LastFailureAt *int64 `json:"last_failure_at"`
// LastSuccessAt Último sucesso conhecido para a configuração atual, em segundos Unix UTC, ou null quando esse dado não está disponível.
LastSuccessAt *int64 `json:"last_success_at"`
// FailureDurationSeconds Tempo desde a primeira falha da sequência atual até esta consulta, em segundos. Retorna null quando o estado não é failing ou não há dados suficientes.
FailureDurationSeconds *int64 `json:"failure_duration_seconds"`
// ObservedAt Instante de atualização dos dados apresentados, em segundos Unix UTC, ou null quando não há informação disponível.
ObservedAt *int64 `json:"observed_at"`
}
WebhookHealth Situação conhecida das entregas de um webhook.
func (WebhookHealth) MarshalJSON ¶
func (v WebhookHealth) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookHealth) UnmarshalJSON ¶
func (v *WebhookHealth) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookHealth response.
type WebhookListPage ¶
type WebhookListPage struct {
Resource `json:"-"`
// PageSize Quantidade efetiva de registros por página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há outra página para avançar.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há outra página para voltar.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para usar em after, ou null quando não há próxima página.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para usar em before, ou null quando não há página anterior.
PreviousBefore *string `json:"previous_before"`
}
WebhookListPage Paginação dos webhooks.
func (WebhookListPage) MarshalJSON ¶
func (v WebhookListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookListPage) UnmarshalJSON ¶
func (v *WebhookListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookListPage response.
type WebhookListResponse ¶
type WebhookListResponse struct {
Resource `json:"-"`
// List Webhooks desta página.
List []Webhook `json:"list"`
// Page Informações para continuar ou voltar na listagem.
Page WebhookListPage `json:"page"`
}
WebhookListResponse Página de webhooks cadastrados.
func (WebhookListResponse) MarshalJSON ¶
func (v WebhookListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookListResponse) NextPage ¶
func (v *WebhookListResponse) NextPage(ctx context.Context) (*WebhookListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*WebhookListResponse) PreviousPage ¶
func (v *WebhookListResponse) PreviousPage(ctx context.Context) (*WebhookListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*WebhookListResponse) UnmarshalJSON ¶
func (v *WebhookListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookListResponse response.
type WebhookPause ¶
type WebhookPause struct {
Resource `json:"-"`
// ID Identificador do webhook.
ID string `json:"id"`
// IsPaused Indica se os envios aguardam a retomada. O prazo original das entregas continua correndo durante a pausa.
IsPaused bool `json:"is_paused"`
// PausedAt Início da pausa atual, em segundos Unix UTC, ou null quando os envios não estão pausados.
PausedAt *int64 `json:"paused_at"`
}
WebhookPause contains the fields defined by the public API.
func (WebhookPause) MarshalJSON ¶
func (v WebhookPause) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookPause) UnmarshalJSON ¶
func (v *WebhookPause) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookPause response.
type WebhookSecretRotation ¶
type WebhookSecretRotation struct {
Resource `json:"-"`
// ID Identificador público do webhook.
ID string `json:"id"`
// SecretKey Segredo usado para validar a assinatura dos eventos. Guarde-o em local seguro; as consultas do cadastro não o retornam.
SecretKey string `json:"secret_key"`
// PreviousSecretExpiresAt Fim da validade do segredo anterior, em segundos Unix UTC, ou null quando não há transição vigente.
PreviousSecretExpiresAt *int64 `json:"previous_secret_expires_at"`
}
WebhookSecretRotation Novo segredo de assinatura e validade do segredo anterior.
func (WebhookSecretRotation) MarshalJSON ¶
func (v WebhookSecretRotation) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookSecretRotation) UnmarshalJSON ¶
func (v *WebhookSecretRotation) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookSecretRotation response.
type WebhookTestAccepted ¶
type WebhookTestAccepted struct {
Resource `json:"-"`
// EventID Identificador do evento técnico solicitado.
EventID string `json:"event_id"`
// DeliveryID Identificador da entrega para acompanhar o resultado.
DeliveryID string `json:"delivery_id"`
}
WebhookTestAccepted Pedido de teste aceito para um único destino.
func (WebhookTestAccepted) MarshalJSON ¶
func (v WebhookTestAccepted) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookTestAccepted) UnmarshalJSON ¶
func (v *WebhookTestAccepted) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookTestAccepted response.
type WebhookTestWebhookEvent ¶ added in v0.2.0
type WebhookTestWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WebhookTestWebhookEventData `json:"data"`
}
WebhookTestWebhookEvent contains the fields defined by the public API.
func (WebhookTestWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WebhookTestWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookTestWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookTestWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookTestWebhookEvent response.
type WebhookTestWebhookEventData ¶ added in v0.2.0
type WebhookTestWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
}
WebhookTestWebhookEventData contains the fields defined by the public API.
func (WebhookTestWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WebhookTestWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WebhookTestWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WebhookTestWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WebhookTestWebhookEventData response.
type WebhooksService ¶
type WebhooksService struct {
// contains filtered or unexported fields
}
WebhooksService provides the endpoints available through Client.Webhooks.
func (*WebhooksService) Create ¶
func (s *WebhooksService) Create(ctx context.Context, params *CreateWebhookParams, options ...RequestOption) (*WebhookCreated, error)
Create Criar um webhook
func (*WebhooksService) Delete ¶
func (s *WebhooksService) Delete(ctx context.Context, webhook_id string, options ...RequestOption) (*Response, error)
Delete Excluir um webhook
func (*WebhooksService) Get ¶
func (s *WebhooksService) Get(ctx context.Context, webhook_id string, options ...RequestOption) (*Webhook, error)
Get Recuperar um webhook
func (*WebhooksService) GetHealth ¶
func (s *WebhooksService) GetHealth(ctx context.Context, webhook_id string, options ...RequestOption) (*WebhookHealth, error)
GetHealth Consultar as falhas de um webhook
func (*WebhooksService) List ¶
func (s *WebhooksService) List(ctx context.Context, params *ListWebhooksParams, options ...RequestOption) (*WebhookListResponse, error)
List Listar webhooks
func (*WebhooksService) ListAll ¶
func (s *WebhooksService) ListAll(ctx context.Context, params *ListWebhooksParams, options ...RequestOption) *Iterator[Webhook]
ListAll lazily follows forward cursors and preserves the original filters.
func (*WebhooksService) RotateSecret ¶
func (s *WebhooksService) RotateSecret(ctx context.Context, webhook_id string, params *RotateWebhookSecretParams, options ...RequestOption) (*WebhookSecretRotation, error)
RotateSecret Rotacionar o segredo de assinatura
func (*WebhooksService) SetPause ¶
func (s *WebhooksService) SetPause(ctx context.Context, webhook_id string, params *SetWebhookPauseParams, options ...RequestOption) (*WebhookPause, error)
SetPause Pausar ou retomar envios
func (*WebhooksService) Test ¶
func (s *WebhooksService) Test(ctx context.Context, webhook_id string, options ...RequestOption) (*WebhookTestAccepted, error)
Test Enviar um evento de teste
func (*WebhooksService) Update ¶
func (s *WebhooksService) Update(ctx context.Context, webhook_id string, params *UpdateWebhookParams, options ...RequestOption) (*Webhook, error)
Update Atualizar um webhook
type Withdrawal ¶
type Withdrawal struct {
Resource `json:"-"`
// ID Identificador público do saque, com prefixo wd_. Também pode aparecer como reference_id no extrato.
ID string `json:"id"`
// AmountCents Valor solicitado para saque, em centavos de real, incluindo a tarifa. Um saque pendente, com falha ou cancelado não confirma a transferência desse valor.
AmountCents int64 `json:"amount_cents"`
// FeeAmountCents Tarifa do saque, em centavos de real. A tarifa é cobrada quando o saque é concluído; falha ou cancelamento não confirma cobrança.
FeeAmountCents int64 `json:"fee_amount_cents"`
// NetAmountCents Valor destinado à conta de destino, em centavos de real: amount_cents menos fee_amount_cents. Consulte status para saber se a transferência foi concluída.
NetAmountCents int64 `json:"net_amount_cents"`
// Status Estado atual do saque. PENDING: aguardando processamento; PROCESSING: em processamento; COMPLETED: concluído; FAILED: falhou; CANCELED: cancelado; UNKNOWN: estado sem classificação disponível. Apenas COMPLETED confirma a conclusão.
Status string `json:"status"`
// FailureReason Motivo conhecido da falha, ou null quando o saque não está em FAILED. Um motivo indisponível não deve ser interpretado como autorização para repetir o saque.
FailureReason *WithdrawalFailureReason `json:"failure_reason"`
// BankAccount Conta de destino registrada em um saque bancário, ou null quando não se aplica. O número da conta é apresentado parcialmente.
BankAccount *WithdrawalBankAccount `json:"bank_account"`
// PixDestination Destino Pix registrado para o saque, ou null quando não há dados disponíveis. A chave é apresentada parcialmente.
PixDestination *WithdrawalPixDestination `json:"pix_destination"`
// RequestedAt Instante da solicitação, em segundos Unix UTC.
RequestedAt int64 `json:"requested_at"`
// CompletedAt Instante da conclusão, em segundos Unix UTC, ou null quando não houve conclusão.
CompletedAt *int64 `json:"completed_at"`
// FailedAt Instante da falha, em segundos Unix UTC, ou null quando não houve falha.
FailedAt *int64 `json:"failed_at"`
// CanceledAt Instante do cancelamento, em segundos Unix UTC, ou null quando não houve cancelamento.
CanceledAt *int64 `json:"canceled_at"`
}
Withdrawal contains the fields defined by the public API.
func (Withdrawal) MarshalJSON ¶
func (v Withdrawal) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*Withdrawal) UnmarshalJSON ¶
func (v *Withdrawal) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public Withdrawal response.
type WithdrawalAcceptedWebhookEvent ¶ added in v0.2.0
type WithdrawalAcceptedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WithdrawalAcceptedWebhookEventData `json:"data"`
}
WithdrawalAcceptedWebhookEvent contains the fields defined by the public API.
func (WithdrawalAcceptedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalAcceptedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalAcceptedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalAcceptedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalAcceptedWebhookEvent response.
type WithdrawalAcceptedWebhookEventData ¶ added in v0.2.0
type WithdrawalAcceptedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
WithdrawalAcceptedWebhookEventData contains the fields defined by the public API.
func (WithdrawalAcceptedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalAcceptedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalAcceptedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalAcceptedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalAcceptedWebhookEventData response.
type WithdrawalAutomaticSettingsChangedWebhookEvent ¶ added in v0.2.0
type WithdrawalAutomaticSettingsChangedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WithdrawalAutomaticSettingsChangedWebhookEventData `json:"data"`
}
WithdrawalAutomaticSettingsChangedWebhookEvent contains the fields defined by the public API.
func (WithdrawalAutomaticSettingsChangedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalAutomaticSettingsChangedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalAutomaticSettingsChangedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalAutomaticSettingsChangedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalAutomaticSettingsChangedWebhookEvent response.
type WithdrawalAutomaticSettingsChangedWebhookEventData ¶ added in v0.2.0
type WithdrawalAutomaticSettingsChangedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
WithdrawalAutomaticSettingsChangedWebhookEventData contains the fields defined by the public API.
func (WithdrawalAutomaticSettingsChangedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalAutomaticSettingsChangedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalAutomaticSettingsChangedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalAutomaticSettingsChangedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalAutomaticSettingsChangedWebhookEventData response.
type WithdrawalBankAccount ¶
type WithdrawalBankAccount struct {
Resource `json:"-"`
// BankCode Código do banco de destino registrado no saque.
BankCode string `json:"bank_code"`
// Branch Agência registrada no saque, com dígito quando informado, ou null.
Branch *string `json:"branch"`
// AccountNumberMasked Número parcialmente oculto da conta de destino, com dígito quando informado, ou null.
AccountNumberMasked *string `json:"account_number_masked"`
}
WithdrawalBankAccount contains the fields defined by the public API.
func (WithdrawalBankAccount) MarshalJSON ¶
func (v WithdrawalBankAccount) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalBankAccount) UnmarshalJSON ¶
func (v *WithdrawalBankAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalBankAccount response.
type WithdrawalCompletedWebhookEvent ¶ added in v0.2.0
type WithdrawalCompletedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WithdrawalCompletedWebhookEventData `json:"data"`
}
WithdrawalCompletedWebhookEvent contains the fields defined by the public API.
func (WithdrawalCompletedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalCompletedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalCompletedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalCompletedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalCompletedWebhookEvent response.
type WithdrawalCompletedWebhookEventData ¶ added in v0.2.0
type WithdrawalCompletedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
WithdrawalCompletedWebhookEventData contains the fields defined by the public API.
func (WithdrawalCompletedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalCompletedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalCompletedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalCompletedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalCompletedWebhookEventData response.
type WithdrawalDestination ¶
type WithdrawalDestination struct {
Resource `json:"-"`
// ID Identificador público do destino, com prefixo wdst_. Use-o para consultar este destino; ele não identifica uma solicitação de saque.
ID string `json:"id"`
// KeyType Tipo da chave Pix: CNPJ, chave aleatória (EVP), telefone (PHONE) ou e-mail (EMAIL).
KeyType string `json:"key_type"`
// KeyMasked Chave Pix parcialmente ocultada. A consulta não retorna o valor completo.
KeyMasked string `json:"key_masked"`
// HolderName Nome do titular associado ao destino verificado da empresa.
HolderName string `json:"holder_name"`
// BankIspb ISPB da instituição do destino. Preserve os zeros à esquerda.
BankIspb string `json:"bank_ispb"`
// IsDefault Informa se este é o destino padrão atual para solicitar saques.
IsDefault bool `json:"is_default"`
// VerifiedAt Data da verificação do destino, em segundos Unix UTC.
VerifiedAt int64 `json:"verified_at"`
}
WithdrawalDestination Destino Pix verificado da própria empresa, disponível para consulta em Produção.
func (WithdrawalDestination) MarshalJSON ¶
func (v WithdrawalDestination) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalDestination) UnmarshalJSON ¶
func (v *WithdrawalDestination) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalDestination response.
type WithdrawalDestinationChangedWebhookEvent ¶ added in v0.2.0
type WithdrawalDestinationChangedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WithdrawalDestinationChangedWebhookEventData `json:"data"`
}
WithdrawalDestinationChangedWebhookEvent contains the fields defined by the public API.
func (WithdrawalDestinationChangedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalDestinationChangedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalDestinationChangedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalDestinationChangedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalDestinationChangedWebhookEvent response.
type WithdrawalDestinationChangedWebhookEventData ¶ added in v0.2.0
type WithdrawalDestinationChangedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
WithdrawalDestinationChangedWebhookEventData contains the fields defined by the public API.
func (WithdrawalDestinationChangedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalDestinationChangedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalDestinationChangedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalDestinationChangedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalDestinationChangedWebhookEventData response.
type WithdrawalDestinationListPage ¶
type WithdrawalDestinationListPage struct {
Resource `json:"-"`
// PageSize Tamanho considerado para esta página. Não representa necessariamente a quantidade de destinos em list.
PageSize int64 `json:"page_size"`
// HasNext Informa se existe uma próxima página. Continue mesmo quando list estiver vazia.
HasNext bool `json:"has_next"`
// HasPrevious Informa se existe uma página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para copiar em after na próxima consulta, ou null quando não houver próxima página.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para copiar em before na consulta anterior, ou null quando não houver página anterior.
PreviousBefore *string `json:"previous_before"`
}
WithdrawalDestinationListPage Cursores da listagem de destinos. A presença de uma próxima página independe da quantidade de destinos retornados em list.
func (WithdrawalDestinationListPage) MarshalJSON ¶
func (v WithdrawalDestinationListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalDestinationListPage) UnmarshalJSON ¶
func (v *WithdrawalDestinationListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalDestinationListPage response.
type WithdrawalDestinationListResponse ¶
type WithdrawalDestinationListResponse struct {
Resource `json:"-"`
// List Destinos próprios disponíveis nesta página. Pode estar vazia mesmo quando page.has_next for true.
List []WithdrawalDestination `json:"list"`
// Page Dados de navegação da listagem. Continue enquanto has_next for true.
Page WithdrawalDestinationListPage `json:"page"`
}
WithdrawalDestinationListResponse Página de destinos próprios e dados para continuar a consulta.
func (WithdrawalDestinationListResponse) MarshalJSON ¶
func (v WithdrawalDestinationListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalDestinationListResponse) NextPage ¶
func (v *WithdrawalDestinationListResponse) NextPage(ctx context.Context) (*WithdrawalDestinationListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*WithdrawalDestinationListResponse) PreviousPage ¶
func (v *WithdrawalDestinationListResponse) PreviousPage(ctx context.Context) (*WithdrawalDestinationListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*WithdrawalDestinationListResponse) UnmarshalJSON ¶
func (v *WithdrawalDestinationListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalDestinationListResponse response.
type WithdrawalDestinationsService ¶
type WithdrawalDestinationsService struct {
// contains filtered or unexported fields
}
WithdrawalDestinationsService provides the endpoints available through Client.WithdrawalDestinations.
func (*WithdrawalDestinationsService) Get ¶
func (s *WithdrawalDestinationsService) Get(ctx context.Context, id string, options ...RequestOption) (*WithdrawalDestination, error)
Get Recuperar um destino de saque
func (*WithdrawalDestinationsService) List ¶
func (s *WithdrawalDestinationsService) List(ctx context.Context, params *ListWithdrawalDestinationsParams, options ...RequestOption) (*WithdrawalDestinationListResponse, error)
List Listar destinos de saque
func (*WithdrawalDestinationsService) ListAll ¶
func (s *WithdrawalDestinationsService) ListAll(ctx context.Context, params *ListWithdrawalDestinationsParams, options ...RequestOption) *Iterator[WithdrawalDestination]
ListAll lazily follows forward cursors and preserves the original filters.
type WithdrawalFailedWebhookEvent ¶ added in v0.2.0
type WithdrawalFailedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WithdrawalFailedWebhookEventData `json:"data"`
}
WithdrawalFailedWebhookEvent contains the fields defined by the public API.
func (WithdrawalFailedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalFailedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalFailedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalFailedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalFailedWebhookEvent response.
type WithdrawalFailedWebhookEventData ¶ added in v0.2.0
type WithdrawalFailedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
WithdrawalFailedWebhookEventData contains the fields defined by the public API.
func (WithdrawalFailedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalFailedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalFailedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalFailedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalFailedWebhookEventData response.
type WithdrawalFailureReason ¶
type WithdrawalFailureReason struct {
Resource `json:"-"`
// Code Motivo registrado para a falha. Consulte os códigos e a orientação de tratamento em [Falhas de saque](/tipos-e-identificadores/financeiro#motivos-de-falha-do-saque).
Code string `json:"code"`
// Message Explicação da falha em inglês. O texto ajuda no diagnóstico; a integração deve usar code.
Message string `json:"message"`
}
WithdrawalFailureReason contains the fields defined by the public API.
func (WithdrawalFailureReason) MarshalJSON ¶
func (v WithdrawalFailureReason) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalFailureReason) UnmarshalJSON ¶
func (v *WithdrawalFailureReason) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalFailureReason response.
type WithdrawalLimits ¶
type WithdrawalLimits struct {
Resource `json:"-"`
// MinimumAmountCents Valor mínimo permitido por solicitação, em centavos de real.
MinimumAmountCents int64 `json:"minimum_amount_cents"`
// FeeThresholdAmountCents Valor solicitado a partir do qual a tarifa de saque é zero, em centavos de real.
FeeThresholdAmountCents int64 `json:"fee_threshold_amount_cents"`
// FeeBelowThresholdCents Tarifa descontada do valor solicitado quando ele fica abaixo de fee_threshold_amount_cents, em centavos de real.
FeeBelowThresholdCents int64 `json:"fee_below_threshold_cents"`
// AvailableAmountCents Saldo disponível para retirada, em centavos de real. A solicitação também precisa respeitar os limites e a tarifa aplicáveis.
AvailableAmountCents int64 `json:"available_amount_cents"`
// DestinationConfigured Indica se há destino Pix próprio cadastrado para o saque. No Sandbox, retorna false.
DestinationConfigured bool `json:"destination_configured"`
// Limits Limites Pix e consumo do período atual para o contexto do destino padrão, interno ou externo. Retorna null quando o contexto não puder ser identificado ou no Sandbox.
Limits *WithdrawalPeriodLimits `json:"limits"`
}
WithdrawalLimits Condições atuais para planejar a retirada. Valores monetários usam centavos de real. O aceite do saque depende da conferência das condições no momento da solicitação.
func (WithdrawalLimits) MarshalJSON ¶
func (v WithdrawalLimits) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalLimits) UnmarshalJSON ¶
func (v *WithdrawalLimits) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalLimits response.
type WithdrawalListPage ¶
type WithdrawalListPage struct {
Resource `json:"-"`
// PageSize Tamanho efetivo da página.
PageSize int64 `json:"page_size"`
// HasNext Indica se há uma próxima página.
HasNext bool `json:"has_next"`
// HasPrevious Indica se há uma página anterior.
HasPrevious bool `json:"has_previous"`
// NextAfter Cursor para a próxima página, ou null.
NextAfter *string `json:"next_after"`
// PreviousBefore Cursor para a página anterior, ou null.
PreviousBefore *string `json:"previous_before"`
}
WithdrawalListPage contains the fields defined by the public API.
func (WithdrawalListPage) MarshalJSON ¶
func (v WithdrawalListPage) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalListPage) UnmarshalJSON ¶
func (v *WithdrawalListPage) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalListPage response.
type WithdrawalListResponse ¶
type WithdrawalListResponse struct {
Resource `json:"-"`
// List Saques da página, na ordem solicitada.
List []Withdrawal `json:"list"`
// Page Tamanho da página e cursores para avançar ou voltar.
Page WithdrawalListPage `json:"page"`
}
WithdrawalListResponse contains the fields defined by the public API.
func (WithdrawalListResponse) MarshalJSON ¶
func (v WithdrawalListResponse) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalListResponse) NextPage ¶
func (v *WithdrawalListResponse) NextPage(ctx context.Context) (*WithdrawalListResponse, error)
NextPage loads the next page with the original filters and request options. It returns nil when there is no continuation. The context controls the new request.
func (*WithdrawalListResponse) PreviousPage ¶
func (v *WithdrawalListResponse) PreviousPage(ctx context.Context) (*WithdrawalListResponse, error)
PreviousPage loads the previous page with the original filters and request options. It returns nil when there is no previous page. The context controls the new request.
func (*WithdrawalListResponse) UnmarshalJSON ¶
func (v *WithdrawalListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalListResponse response.
type WithdrawalPeriodLimits ¶
type WithdrawalPeriodLimits struct {
Resource `json:"-"`
// DayLimitCents Limite de saques por dia civil, em centavos de real. A nova cota é liberada às 00:01, no horário de São Paulo.
DayLimitCents int64 `json:"day_limit_cents"`
// NightLimitCents Limite noturno de saques, em centavos de real. O consumo acumula das 20:00 às 06:00 do dia seguinte, inclusive na virada do dia.
NightLimitCents int64 `json:"night_limit_cents"`
// PeriodLimitCents Limite aplicável ao período indicado por period, em centavos de real.
PeriodLimitCents int64 `json:"period_limit_cents"`
// PeriodUsedCents Valor que já compromete o limite do período, em centavos de real. Inclui saques ainda em processamento.
PeriodUsedCents int64 `json:"period_used_cents"`
// PeriodRemainingCents Valor restante no limite do período, em centavos de real. Não representa o saldo da conta.
PeriodRemainingCents int64 `json:"period_remaining_cents"`
// RequestMaximumAmountCents Teto informado para uma solicitação, em centavos de real, considerando os limites de saque. O saldo disponível e a tarifa também restringem o valor que pode ser solicitado.
RequestMaximumAmountCents int64 `json:"request_maximum_amount_cents"`
// Period Período vigente: day durante o período diurno ou night das 20:00 às 06:00, no horário de São Paulo.
Period string `json:"period"`
// PeriodEndsAt Próxima virada dos limites, em segundos Unix UTC. Consulte novamente após esse instante para conferir as condições atualizadas.
PeriodEndsAt int64 `json:"period_ends_at"`
}
WithdrawalPeriodLimits Limites e consumo de saque no período atual, pelo horário de São Paulo. Durante a noite, o saque precisa caber no restante diário e no noturno.
func (WithdrawalPeriodLimits) MarshalJSON ¶
func (v WithdrawalPeriodLimits) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalPeriodLimits) UnmarshalJSON ¶
func (v *WithdrawalPeriodLimits) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalPeriodLimits response.
type WithdrawalPixDestination ¶
type WithdrawalPixDestination struct {
Resource `json:"-"`
// KeyType Tipo da chave usada no saque: CNPJ, EVP (aleatória), PHONE (telefone) ou EMAIL.
KeyType string `json:"key_type"`
// KeyMasked Chave Pix parcialmente oculta.
KeyMasked string `json:"key_masked"`
// HolderName Nome do titular do destino registrado no saque.
HolderName string `json:"holder_name"`
// BankIspb ISPB da instituição de destino.
BankIspb string `json:"bank_ispb"`
}
WithdrawalPixDestination contains the fields defined by the public API.
func (WithdrawalPixDestination) MarshalJSON ¶
func (v WithdrawalPixDestination) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalPixDestination) UnmarshalJSON ¶
func (v *WithdrawalPixDestination) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalPixDestination response.
type WithdrawalRequestedWebhookEvent ¶ added in v0.2.0
type WithdrawalRequestedWebhookEvent struct {
Resource `json:"-"`
// ID is defined by the public API.
ID string `json:"id"`
// Type is defined by the public API.
Type string `json:"type"`
// CreatedAt is defined by the public API.
CreatedAt string `json:"created_at"`
// Environment is defined by the public API.
Environment string `json:"environment"`
// Data is defined by the public API.
Data WithdrawalRequestedWebhookEventData `json:"data"`
}
WithdrawalRequestedWebhookEvent contains the fields defined by the public API.
func (WithdrawalRequestedWebhookEvent) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalRequestedWebhookEvent) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalRequestedWebhookEvent) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalRequestedWebhookEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalRequestedWebhookEvent response.
type WithdrawalRequestedWebhookEventData ¶ added in v0.2.0
type WithdrawalRequestedWebhookEventData struct {
Resource `json:"-"`
// Object is defined by the public API.
Object string `json:"object"`
// ID is defined by the public API.
ID string `json:"id"`
// PaymentMethod is defined by the public API.
PaymentMethod *string `json:"payment_method"`
}
WithdrawalRequestedWebhookEventData contains the fields defined by the public API.
func (WithdrawalRequestedWebhookEventData) MarshalJSON ¶ added in v0.2.0
func (v WithdrawalRequestedWebhookEventData) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalRequestedWebhookEventData) UnmarshalJSON ¶ added in v0.2.0
func (v *WithdrawalRequestedWebhookEventData) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalRequestedWebhookEventData response.
type WithdrawalSummary ¶
type WithdrawalSummary struct {
Resource `json:"-"`
// ProcessingCount Quantidade de saques com situação PENDING ou PROCESSING.
ProcessingCount int64 `json:"processing_count"`
// ProcessingAmountCents Valor total solicitado nesses saques, incluindo a tarifa, em centavos de real. Não some este valor ao saldo disponível.
ProcessingAmountCents int64 `json:"processing_amount_cents"`
}
WithdrawalSummary Resumo atual dos saques pendentes ou em processamento da empresa.
func (WithdrawalSummary) MarshalJSON ¶
func (v WithdrawalSummary) MarshalJSON() ([]byte, error)
MarshalJSON encodes typed fields and future fields, preserving received field presence.
func (*WithdrawalSummary) UnmarshalJSON ¶
func (v *WithdrawalSummary) UnmarshalJSON(data []byte) error
UnmarshalJSON validates and reads the public WithdrawalSummary response.
type WithdrawalsService ¶
type WithdrawalsService struct {
// contains filtered or unexported fields
}
WithdrawalsService provides the endpoints available through Client.Withdrawals.
func (*WithdrawalsService) Create ¶
func (s *WithdrawalsService) Create(ctx context.Context, params *CreateWithdrawalParams, options ...RequestOption) (*Withdrawal, error)
Create Solicitar saque
func (*WithdrawalsService) Get ¶
func (s *WithdrawalsService) Get(ctx context.Context, id string, options ...RequestOption) (*Withdrawal, error)
Get Recuperar um saque
func (*WithdrawalsService) GetAutomaticSettings ¶
func (s *WithdrawalsService) GetAutomaticSettings(ctx context.Context, options ...RequestOption) (*AutomaticWithdrawalSettings, error)
GetAutomaticSettings Consultar saque automático
func (*WithdrawalsService) GetLimits ¶
func (s *WithdrawalsService) GetLimits(ctx context.Context, options ...RequestOption) (*WithdrawalLimits, error)
GetLimits Consultar condições de saque
func (*WithdrawalsService) GetSummary ¶
func (s *WithdrawalsService) GetSummary(ctx context.Context, options ...RequestOption) (*WithdrawalSummary, error)
GetSummary Consultar saques em processamento
func (*WithdrawalsService) List ¶
func (s *WithdrawalsService) List(ctx context.Context, params *ListWithdrawalsParams, options ...RequestOption) (*WithdrawalListResponse, error)
List Listar saques
func (*WithdrawalsService) ListAll ¶
func (s *WithdrawalsService) ListAll(ctx context.Context, params *ListWithdrawalsParams, options ...RequestOption) *Iterator[Withdrawal]
ListAll lazily follows forward cursors and preserves the original filters.
func (*WithdrawalsService) UpdateAutomaticSettings ¶
func (s *WithdrawalsService) UpdateAutomaticSettings(ctx context.Context, params *UpdateAutomaticWithdrawalSettingsParams, options ...RequestOption) (*AutomaticWithdrawalSettings, error)
UpdateAutomaticSettings Atualizar saque automático