diff --git a/common/common.go b/common/common.go index f03780c..6a7f193 100644 --- a/common/common.go +++ b/common/common.go @@ -51,15 +51,10 @@ const ( type ChallengeIndicator string const ( - ChallengeRequested ChallengeIndicator = "challenge_requested" - ChallengeRequestedMandate ChallengeIndicator = "challenge_requested_mandate" - ChallengeIndicatorDataShare ChallengeIndicator = "data_share" - ChallengeIndicatorLowValue ChallengeIndicator = "low_value" - NoChallengeRequested ChallengeIndicator = "no_challenge_requested" - NoPreference ChallengeIndicator = "no_preference" - ChallengeIndicatorTransactionRiskAssessment ChallengeIndicator = "transaction_risk_assessment" - ChallengeIndicatorTrustedListing ChallengeIndicator = "trusted_listing" - ChallengeIndicatorTrustedListingPrompt ChallengeIndicator = "trusted_listing_prompt" + ChallengeRequested ChallengeIndicator = "challenge_requested" + ChallengeRequestedMandate ChallengeIndicator = "challenge_requested_mandate" + NoChallengeRequested ChallengeIndicator = "no_challenge_requested" + NoPreference ChallengeIndicator = "no_preference" ) type DocumentType string @@ -105,6 +100,7 @@ const ( ThreeDsOutage Exemption = "3ds_outage" TransactionRiskAssessment Exemption = "transaction_risk_assessment" TrustedListing Exemption = "trusted_listing" + TrustedListingPrompt Exemption = "trusted_listing_prompt" ) type ThreeDsMethodCompletion string diff --git a/metadata/metadata.go b/metadata/metadata.go index 0026a0b..96391e8 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -67,10 +67,23 @@ type ( } SchemeMetadata struct { - Accel *PinlessDebitSchemeMetadata `json:"accel,omitempty"` - Pulse *PinlessDebitSchemeMetadata `json:"pulse,omitempty"` - Nyce *PinlessDebitSchemeMetadata `json:"nyce,omitempty"` - Star *PinlessDebitSchemeMetadata `json:"star,omitempty"` + Accel []PinlessDebitSchemeMetadata `json:"accel,omitempty"` + Pulse []PinlessDebitSchemeMetadata `json:"pulse,omitempty"` + Nyce []PinlessDebitSchemeMetadata `json:"nyce,omitempty"` + Star []PinlessDebitSchemeMetadata `json:"star,omitempty"` + } + + PullFunds struct { + CrossBorder bool `json:"cross_border,omitempty"` + Domestic bool `json:"domestic,omitempty"` + } + + AftIndicator struct { + PullFunds *PullFunds `json:"pull_funds,omitempty"` + } + + AccountFundingTransaction struct { + AftIndicator *AftIndicator `json:"aft_indicator,omitempty"` } CardMetadataResponse struct { @@ -78,20 +91,21 @@ type ( Bin string `json:"bin,omitempty"` Scheme string `json:"scheme,omitempty"` // Deprecated: This property will be removed in the future, and should not be used. Use LocalSchemes instead. - SchemeLocal SchemeLocalType `json:"scheme_local,omitempty"` - LocalSchemes []SchemeLocalType `json:"local_schemes,omitempty"` - CardType common.CardType `json:"card_type,omitempty"` - CardCategory common.CardCategory `json:"card_category,omitempty"` - Currency common.Currency `json:"currency,omitempty"` - Issuer string `json:"issuer,omitempty"` - IssuerCountry common.Country `json:"issuer_country,omitempty"` - IssuerCountryName string `json:"issuer_country_name,omitempty"` - ProductId string `json:"product_id,omitempty"` - ProductType string `json:"product_type,omitempty"` - SubproductId string `json:"subproduct_id,omitempty"` - RegulatedIndicator bool `json:"regulated_indicator,omitempty"` - RegulatedType string `json:"regulated_type,omitempty"` - CardPayouts *CardMetadataPayouts `json:"card_payouts,omitempty"` - SchemeMetadata *SchemeMetadata `json:"scheme_metadata,omitempty"` + SchemeLocal SchemeLocalType `json:"scheme_local,omitempty"` + LocalSchemes []SchemeLocalType `json:"local_schemes,omitempty"` + CardType common.CardType `json:"card_type,omitempty"` + CardCategory common.CardCategory `json:"card_category,omitempty"` + Currency common.Currency `json:"currency,omitempty"` + Issuer string `json:"issuer,omitempty"` + IssuerCountry common.Country `json:"issuer_country,omitempty"` + IssuerCountryName string `json:"issuer_country_name,omitempty"` + ProductId string `json:"product_id,omitempty"` + ProductType string `json:"product_type,omitempty"` + SubproductId string `json:"subproduct_id,omitempty"` + RegulatedIndicator bool `json:"regulated_indicator,omitempty"` + RegulatedType string `json:"regulated_type,omitempty"` + CardPayouts *CardMetadataPayouts `json:"card_payouts,omitempty"` + SchemeMetadata *SchemeMetadata `json:"scheme_metadata,omitempty"` + AccountFundingTransaction *AccountFundingTransaction `json:"account_funding_transaction,omitempty"` } ) diff --git a/payments/links/links.go b/payments/links/links.go index 8809f70..a749fc4 100644 --- a/payments/links/links.go +++ b/payments/links/links.go @@ -1,6 +1,7 @@ package links import ( + "github.com/checkout/checkout-sdk-go/payments/nas" "time" "github.com/checkout/checkout-sdk-go/common" @@ -19,28 +20,32 @@ const ( type ( PaymentLinkRequest struct { - Amount int `json:"amount,omitempty"` - Currency common.Currency `json:"currency,omitempty"` - PaymentType payments.PaymentType `json:"payment_type,omitempty,omitempty"` - PaymentIp string `json:"payment_ip,omitempty"` - BillingDescriptor *payments.BillingDescriptor `json:"billing_descriptor,omitempty"` - Reference string `json:"reference,omitempty"` - Description string `json:"description,omitempty"` - ExpiresIn int `json:"expires_in,omitempty"` - Customer *common.CustomerRequest `json:"customer,omitempty"` - Shipping *payments.ShippingDetails `json:"shipping,omitempty"` - Billing *payments.BillingInformation `json:"billing,omitempty"` - Recipient *payments.PaymentRecipient `json:"recipient,omitempty"` - Processing *payments.ProcessingSettings `json:"processing,omitempty"` - AllowPaymentMethods []payments.SourceType `json:"allow_payment_methods,omitempty"` - Products []payments.Product `json:"products,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - ThreeDs *payments.ThreeDsRequest `json:"3ds,omitempty"` - Risk *payments.RiskRequest `json:"risk,omitempty"` - ReturnUrl string `json:"return_url,omitempty"` - Locale string `json:"locale,omitempty"` - Capture bool `json:"capture,omitempty"` - CaptureOn *time.Time `json:"capture_on,omitempty"` + Amount int `json:"amount,omitempty"` + Currency common.Currency `json:"currency,omitempty"` + PaymentType payments.PaymentType `json:"payment_type,omitempty,omitempty"` + PaymentIp string `json:"payment_ip,omitempty"` + BillingDescriptor *payments.BillingDescriptor `json:"billing_descriptor,omitempty"` + Reference string `json:"reference,omitempty"` + Description string `json:"description,omitempty"` + DisplayName string `json:"display_name,omitempty"` + ExpiresIn int `json:"expires_in,omitempty"` + Customer *common.CustomerRequest `json:"customer,omitempty"` + Shipping *payments.ShippingDetails `json:"shipping,omitempty"` + Billing *payments.BillingInformation `json:"billing,omitempty"` + Recipient *payments.PaymentRecipient `json:"recipient,omitempty"` + Processing *payments.ProcessingSettings `json:"processing,omitempty"` + AllowPaymentMethods []payments.SourceType `json:"allow_payment_methods,omitempty"` + DisabledPaymentMethods []payments.SourceType `json:"disabled_payment_methods,omitempty"` + Products []payments.Product `json:"products,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + ThreeDs *payments.ThreeDsRequest `json:"3ds,omitempty"` + Risk *payments.RiskRequest `json:"risk,omitempty"` + CustomerRetry *payments.PaymentRetryRequest `json:"customer_retry,omitempty"` + Sender *nas.Sender `json:"sender,omitempty"` + ReturnUrl string `json:"return_url,omitempty"` + Locale string `json:"locale,omitempty"` + Capture bool `json:"capture,omitempty"` + CaptureOn *time.Time `json:"capture_on,omitempty"` //Not available on previous ProcessingChannelId string `json:"processing_channel_id,omitempty"` AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"`