Skip to content

Commit

Permalink
Merge pull request #131 from luno/update-beneficiary-endpoints
Browse files Browse the repository at this point in the history
Update beneficiary endpoints
  • Loading branch information
pkachelhoffer authored May 13, 2024
2 parents 8ef1882 + c3ba1e7 commit 29268c8
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 16 deletions.
82 changes: 75 additions & 7 deletions api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 42 additions & 9 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,27 @@ type AccountBalance struct {
Unconfirmed decimal.Decimal `json:"unconfirmed"`
}

type AccountType string

const (
AccountTypeCurrentcheque AccountType = "Current/Cheque"
AccountTypeSavings AccountType = "Savings"
AccountTypeTransmission AccountType = "Transmission"
)

type AddressMeta struct {
Label string `json:"label"`
Value string `json:"value"`
}

type BankAccountType string

const (
BankAccountTypeCurrentcheque BankAccountType = "Current/Cheque"
BankAccountTypeSavings BankAccountType = "Savings"
BankAccountTypeTransmission BankAccountType = "Transmission"
)

type Candle struct {
// Closing price
Close decimal.Decimal `json:"close"`
Expand Down Expand Up @@ -566,15 +582,32 @@ type Withdrawal struct {
}

type beneficiary struct {
BankAccountBranch string `json:"bank_account_branch"`
BankAccountNumber string `json:"bank_account_number"`
BankAccountType string `json:"bank_account_type"`
BankCountry string `json:"bank_country"`
BankName string `json:"bank_name"`
BankRecipient string `json:"bank_recipient"`
CreatedAt int64 `json:"created_at"`
Id string `json:"id"`
SupportsFastWithdrawals bool `json:"supports_fast_withdrawals"`
// Bank branch code
BankAccountBranch string `json:"bank_account_branch"`

// Beneficiary bank account number
BankAccountNumber string `json:"bank_account_number"`

// Bank account type
BankAccountType BankAccountType `json:"bank_account_type"`

// Bank country of origin
BankCountry string `json:"bank_country"`

// Bank SWIFT code
BankName string `json:"bank_name"`

// The owner of the recipient account
BankRecipient string `json:"bank_recipient"`

// Time of beneficiary creation
CreatedAt int64 `json:"created_at"`

// Unique id referencing beneficiary
Id string `json:"id"`

// If the bank account supports fast withdrawals
SupportsFastWithdrawals bool `json:"supports_fast_withdrawals"`
}

// vi: ft=go

0 comments on commit 29268c8

Please sign in to comment.