Skip to content

Commit

Permalink
Properties update for Metadata, Purpose and Profile (#108)
Browse files Browse the repository at this point in the history
* Update card metadata response properties

* Update purpose types

* Update profile class with holding currencies
  • Loading branch information
armando-rodriguez-cko authored Apr 9, 2024
1 parent abf1294 commit 6aba3bf
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 16 deletions.
7 changes: 4 additions & 3 deletions accounts/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ type (
}

Profile struct {
Urls []string `json:"urls,omitempty"`
Mccs []string `json:"mccs,omitempty"`
DefaultHoldingCurrency common.Currency `json:"default_holding_currency,omitempty"`
Urls []string `json:"urls,omitempty"`
Mccs []string `json:"mccs,omitempty"`
DefaultHoldingCurrency common.Currency `json:"default_holding_currency,omitempty"`
HoldingCurrencies []common.Currency `json:"holding_currencies,omitempty"`
}

Company struct {
Expand Down
2 changes: 2 additions & 0 deletions common/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ const (

// Accounts
BankVerification Purpose = "bank_verification"
Identification Purpose = "identification"
IdentityVerification Purpose = "identity_verification"
CompanyVerification Purpose = "company_verification"
FinancialVerification Purpose = "financial_verification"
TaxVerification Purpose = "tax_verification"
)

type (
Expand Down
55 changes: 42 additions & 13 deletions metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ const (
type SchemeLocalType string

const (
Accel SchemeLocalType = "accel"
CartesBancaires SchemeLocalType = "cartes_bancaires"
Mada SchemeLocalType = "mada"
Omannet SchemeLocalType = "Omannet"
Nyce SchemeLocalType = "nyce"
Omannet SchemeLocalType = "omannet"
Pulse SchemeLocalType = "pulse"
Star SchemeLocalType = "star"
Upi SchemeLocalType = "upi"
)

type PayoutsTransactionsType string
Expand Down Expand Up @@ -51,18 +56,42 @@ type (
CrossBorderMoneyTransfer PayoutsTransactionsType `json:"cross_border_money_transfer,omitempty"`
}

PinlessDebitSchemeMetadata struct {
NetworkId string `json:"network_id,omitempty"`
NetworkDescription string `json:"network_description,omitempty"`
BillPayIndicator bool `json:"bill_pay_indicator,omitempty"`
EcommerceIndicator bool `json:"ecommerce_indicator,omitempty"`
InterchangeFeeIndicator string `json:"interchange_fee_indicator,omitempty"`
MoneyTransferIndicator bool `json:"money_transfer_indicator,omitempty"`
TokenIndicator bool `json:"token_indicator,omitempty"`
}

SchemeMetadata struct {
Accel *PinlessDebitSchemeMetadata `json:"accel,omitempty"`
Pulse *PinlessDebitSchemeMetadata `json:"pulse,omitempty"`
Nyce *PinlessDebitSchemeMetadata `json:"nyce,omitempty"`
Star *PinlessDebitSchemeMetadata `json:"star,omitempty"`
}

CardMetadataResponse struct {
HttpMetadata common.HttpMetadata `json:"http_metadata,omitempty"`
Bin string `json:"bin,omitempty"`
Scheme string `json:"scheme,omitempty"`
SchemeLocal SchemeLocalType `json:"scheme_local,omitempty"`
CardType common.CardType `json:"card_type,omitempty"`
CardCategory common.CardCategory `json:"card_category,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"`
CardPayouts *CardMetadataPayouts `json:"card_payouts,omitempty"`
HttpMetadata common.HttpMetadata `json:"http_metadata,omitempty"`
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"`
}
)

0 comments on commit 6aba3bf

Please sign in to comment.