iris

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovePayoutReq

type ApprovePayoutReq struct {
	ReferenceNo []string `json:"reference_nos"`
	OTP         string   `json:"otp"`
}

ApprovePayoutReq : Represent Approve Payout payload Iris

type ApprovePayoutResponse

type ApprovePayoutResponse struct {
	Status       string   `json:"status"`
	ErrorMessage string   `json:"error_message"`
	Errors       []string `json:"errors"`
}

ApprovePayoutResponse : Represent Approve payout response payload

type BalanceResponse

type BalanceResponse struct {
	Balance string `json:"balance"`
}

BalanceResponse : Represent balance detail response payload

type BankAccountDetailErrorResponse

type BankAccountDetailErrorResponse struct {
	Account []string `json:"account"`
	Bank    []string `json:"bank"`
}

BankAccountDetailErrorResponse : Represent Bank account detail error payload

type BankAccountDetailResponse

type BankAccountDetailResponse struct {
	AccountName  string                          `json:"account_name"`
	AccountNo    string                          `json:"account_no"`
	BankName     string                          `json:"bank_name"`
	ErrorMessage string                          `json:"error_message"`
	Errors       *BankAccountDetailErrorResponse `json:"errors"`
}

BankAccountDetailResponse : Represent Bank account detail payload

type BankAccountResponse

type BankAccountResponse struct {
	BankAccountID string `json:"bank_account_id"`
	BankName      string `json:"bank_name"`
	AccountName   string `json:"account_name"`
	AccountNumber string `json:"account_number"`
	Status        string `json:"status"`
}

type Beneficiaries

type Beneficiaries struct {
	Name      string `json:"name"`
	Account   string `json:"account"`
	Bank      string `json:"bank"`
	AliasName string `json:"alias_name"`
	Email     string `json:"email"`
}

Beneficiaries : Iris Beneficiaries request (create, update, list) https://iris-docs.midtrans.com/#create-beneficiaries https://iris-docs.midtrans.com/#update-beneficiaries https://iris-docs.midtrans.com/#list-beneficiaries

type BeneficiariesResponse

type BeneficiariesResponse struct {
	Status     string   `json:"status"`
	StatusCode string   `json:"status_code"`
	Errors     []string `json:"errors"`
}

BeneficiariesResponse : Represent Beneficiaries response payload

type BeneficiaryBankResponse

type BeneficiaryBankResponse struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

BeneficiaryBankResponse : Represent Beneficiary bank response payload

type BeneficiaryBanksResponse

type BeneficiaryBanksResponse struct {
	BeneficiaryBanks []BeneficiaryBankResponse `json:"beneficiary_banks"`
	StatusCode       string                    `json:"status_code"`
}

BeneficiaryBanksResponse : Show list of supported banks in IRIS. https://iris-docs.midtrans.com/#list-banks

type Client

type Client struct {
	IrisApiKey *string
	Env        midtrans.EnvironmentType
	HttpClient midtrans.HttpClient
	Options    *midtrans.ConfigOptions
}

Client : Iris Client struct

func (Client) ApprovePayout

func (c Client) ApprovePayout(req ApprovePayoutReq) (*ApprovePayoutResponse, *midtrans.Error)

ApprovePayout : this method for Apporver to approve multiple payout request. https://iris-docs.midtrans.com/#approve-payouts

func (Client) CreateBeneficiaries

func (c Client) CreateBeneficiaries(req Beneficiaries) (*BeneficiariesResponse, *midtrans.Error)

CreateBeneficiaries : to perform create a new beneficiary information for quick access on the payout page in Iris Portal. https://iris-docs.midtrans.com/#create-beneficiaries

func (Client) CreatePayout

func (c Client) CreatePayout(req CreatePayoutReq) (*CreatePayoutResponse, *midtrans.Error)

CreatePayout : This method for Creator to create a payout. It can be used for single payout and also multiple payouts. https://iris-docs.midtrans.com/#create-payouts

func (Client) GetBalance

func (c Client) GetBalance() (*BalanceResponse, *midtrans.Error)

GetBalance : For Aggregator Partner, you need to top up to Iris’ bank account. Every partner have their own balance in Iris’ bank account. Use this API is to get current balance information. https://iris-docs.midtrans.com/#check-balance-aggregator

func (Client) GetBeneficiaries

func (c Client) GetBeneficiaries() ([]Beneficiaries, *midtrans.Error)

GetBeneficiaries : This method to fetch list of all beneficiaries saved in Iris Portal. https://iris-docs.midtrans.com/#list-beneficiaries

func (Client) GetBeneficiaryBanks

func (c Client) GetBeneficiaryBanks() (*ListBeneficiaryBankResponse, *midtrans.Error)

GetBeneficiaryBanks : Show list of supported banks in IRIS. https://iris-docs.midtrans.com/#list-banks

func (Client) GetFacilitatorBalance

func (c Client) GetFacilitatorBalance(accountId string) (*BalanceResponse, *midtrans.Error)

GetFacilitatorBalance : For Facilitator Partner, use this API is to get current balance information of your registered bank account. https://iris-docs.midtrans.com/#bank-accounts-facilitator

func (Client) GetListBankAccount

func (c Client) GetListBankAccount() ([]BankAccountResponse, *midtrans.Error)

GetListBankAccount : Show list of registered bank accounts for facilitator partner https://iris-docs.midtrans.com/#bank-accounts-facilitator

func (Client) GetPayoutDetails

func (c Client) GetPayoutDetails(referenceNo string) (*PayoutDetailResponse, *midtrans.Error)

GetPayoutDetails : Get details of a single payout. https://iris-docs.midtrans.com/#get-payout-details

func (Client) GetTopUpChannels

func (c Client) GetTopUpChannels() ([]TopUpAccountResponse, *midtrans.Error)

GetTopUpChannels : Provide top up information channel for Aggregator Partner https://iris-docs.midtrans.com/#top-up-channel-information-aggregator

func (Client) GetTransactionHistory

func (c Client) GetTransactionHistory(fromDate string, toDate string) ([]TransactionHistoryResponse, *midtrans.Error)

GetTransactionHistory : Returns all the payout details for specific dates (https://iris-docs.midtrans.com/#payout-history)

func (*Client) New

func (c *Client) New(irisApiKey string, env midtrans.EnvironmentType)

New : this function will always be called when the Iris is initiated

func (Client) RejectPayout

func (c Client) RejectPayout(req RejectPayoutReq) (*RejectPayoutResponse, *midtrans.Error)

RejectPayout : This method for Apporver to reject multiple payout request. https://iris-docs.midtrans.com/#reject-payouts

func (Client) UpdateBeneficiaries

func (c Client) UpdateBeneficiaries(aliasName string, req Beneficiaries) (*BeneficiariesResponse, *midtrans.Error)

UpdateBeneficiaries : to update an existing beneficiary identified by its alias_name. https://iris-docs.midtrans.com/#update-beneficiaries

func (Client) ValidateBankAccount

func (c Client) ValidateBankAccount(bankName string, accountNo string) (*BankAccountDetailResponse, *midtrans.Error)

ValidateBankAccount : Check if an account is valid, if valid return account information. (https://iris-docs.midtrans.com/#validate-bank-account)

type CreatePayoutDetailReq

type CreatePayoutDetailReq struct {
	BeneficiaryName    string `json:"beneficiary_name"`
	BeneficiaryAccount string `json:"beneficiary_account"`
	BeneficiaryBank    string `json:"beneficiary_bank"`
	BeneficiaryEmail   string `json:"beneficiary_email"`
	Amount             string `json:"amount"`
	Notes              string `json:"notes"`
}

CreatePayoutDetailReq : Represent Create Payout detail payload Iris

type CreatePayoutDetailResponse

type CreatePayoutDetailResponse struct {
	Status      string `json:"status"`
	ReferenceNo string `json:"reference_no"`
}

CreatePayoutDetailResponse : Represent Create payout detail response payload

type CreatePayoutReq

type CreatePayoutReq struct {
	Payouts []CreatePayoutDetailReq `json:"payouts"`
}

CreatePayoutReq : Represent Create Payout request payload Iris

type CreatePayoutResponse

type CreatePayoutResponse struct {
	Payouts      []CreatePayoutDetailResponse `json:"payouts"`
	ErrorMessage string                       `json:"error_message"`
	Errors       interface{}                  `json:"errors"`
}

CreatePayoutResponse : Represent Create payout response payload

type ListBeneficiaryBankResponse

type ListBeneficiaryBankResponse struct {
	BeneficiaryBanks []struct {
		Code        string   `json:"code"`
		Name        string   `json:"name"`
		RoutingCode []string `json:"routing_code"`
	} `json:"beneficiary_banks"`
}

type PayoutDetailResponse

type PayoutDetailResponse struct {
	Amount             string    `json:"amount"`
	BeneficiaryName    string    `json:"beneficiary_name"`
	BeneficiaryAccount string    `json:"beneficiary_account"`
	Bank               string    `json:"bank"`
	ReferenceNo        string    `json:"reference_no"`
	Notes              string    `json:"notes"`
	BeneficiaryEmail   string    `json:"beneficiary_email"`
	Status             string    `json:"status"`
	CreatedBy          string    `json:"created_by"`
	CreatedAt          time.Time `json:"created_at"`
	UpdatedAt          time.Time `json:"updated_at"`
	ErrorMessage       string    `json:"error_message"`
	Errors             string    `json:"errors"`
}

PayoutDetailResponse : Represent Payout detail response payload

type RejectPayoutReq

type RejectPayoutReq struct {
	ReferenceNo  []string `json:"reference_nos"`
	RejectReason string   `json:"reject_reason"`
}

RejectPayoutReq : Represent Reject Payout payload Iris

type RejectPayoutResponse

type RejectPayoutResponse struct {
	Status       string   `json:"status"`
	ErrorMessage string   `json:"error_message"`
	Errors       []string `json:"errors"`
}

RejectPayoutResponse : Represent Reject payout response payload

type ResponseWithMap

type ResponseWithMap map[string]interface{}

type TopUpAccountResponse

type TopUpAccountResponse struct {
	ID                   int    `json:"id"`
	VirtualAccountType   string `json:"virtual_account_type"`
	VirtualAccountNumber string `json:"virtual_account_number"`
}

type TransactionHistoryResponse

type TransactionHistoryResponse struct {
	Account            string    `json:"account"`
	Type               string    `json:"type"`
	Amount             string    `json:"amount"`
	Status             string    `json:"status"`
	CreatedAt          time.Time `json:"created_at"`
	ReferenceNo        string    `json:"reference_no"`
	BeneficiaryName    string    `json:"beneficiary_name"`
	BeneficiaryAccount string    `json:"beneficiary_account"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL