Documentation ¶
Index ¶
- func CreateFixedPaymentCode(data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func CreateFixedPaymentCodeWithContext(ctx context.Context, data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func GetFixedPaymentCode(data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func GetFixedPaymentCodeWithContext(ctx context.Context, data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func GetPaymentByFixedPaymentCode(data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
- func GetPaymentByFixedPaymentCodeWithContext(ctx context.Context, data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
- func UpdateFixedPaymentCode(data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func UpdateFixedPaymentCodeWithContext(ctx context.Context, data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- type Client
- func (c *Client) CreateFixedPaymentCode(data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func (c *Client) CreateFixedPaymentCodeWithContext(ctx context.Context, data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func (c *Client) GetFixedPaymentCode(data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func (c *Client) GetFixedPaymentCodeWithContext(ctx context.Context, data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func (c *Client) GetPaymentByFixedPaymentCode(data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
- func (c *Client) GetPaymentByFixedPaymentCodeWithContext(ctx context.Context, data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
- func (c *Client) UpdateFixedPaymentCode(data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- func (c *Client) UpdateFixedPaymentCodeWithContext(ctx context.Context, data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
- type CreateFixedPaymentCodeParams
- type GetFixedPaymentCodeParams
- type GetPaymentByFixedPaymentCodeParams
- type UpdateFixedPaymentCodeParams
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFixedPaymentCode ¶
func CreateFixedPaymentCode(data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
CreateFixedPaymentCode creates new retail outlet fixed payment code
Example ¶
xendit.Opt.SecretKey = "examplesecretkey" data := retailoutlet.CreateFixedPaymentCodeParams{ ExternalID: "retailoutlet-external-id", RetailOutletName: xendit.RetailOutletNameAlfamart, Name: "Michael Jackson", ExpectedAmount: 200000, } resp, err := retailoutlet.CreateFixedPaymentCode(&data) if err != nil { log.Fatal(err.ErrorCode) } fmt.Printf("created retail outlet fixed payment code: %+v\n", resp)
Output:
func CreateFixedPaymentCodeWithContext ¶
func CreateFixedPaymentCodeWithContext(ctx context.Context, data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
CreateFixedPaymentCodeWithContext creates new retail outlet fixed payment code with context
func GetFixedPaymentCode ¶
func GetFixedPaymentCode(data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
GetFixedPaymentCode gets one retail outlet fixed payment code
Example ¶
xendit.Opt.SecretKey = "examplesecretkey" getFixedPaymentCodeData := retailoutlet.GetFixedPaymentCodeParams{ FixedPaymentCodeID: "123", } resp, err := retailoutlet.GetFixedPaymentCode(&getFixedPaymentCodeData) if err != nil { log.Fatal(err.ErrorCode) } fmt.Printf("retrieved retail outlet fixed payment code: %+v\n", resp)
Output:
func GetFixedPaymentCodeWithContext ¶
func GetFixedPaymentCodeWithContext(ctx context.Context, data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
GetFixedPaymentCodeWithContext gets one retail outlet fixed payment code with context
func GetPaymentByFixedPaymentCode ¶
func GetPaymentByFixedPaymentCode(data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
GetPaymentByFixedPaymentCode gets one retail outlet fixed payment code
Example ¶
xendit.Opt.SecretKey = "examplesecretkey" getPaymentByFixedPaymentCodeData := retailoutlet.GetPaymentByFixedPaymentCodeParams{ FixedPaymentCodeID: "123", } resp, err := retailoutlet.GetPaymentByFixedPaymentCode(&getPaymentByFixedPaymentCodeData) if err != nil { log.Fatal(err.ErrorCode) } fmt.Printf("retrieved retail outlet list payment by fixed payment code %+v\n", resp)
Output:
func GetPaymentByFixedPaymentCodeWithContext ¶
func GetPaymentByFixedPaymentCodeWithContext(ctx context.Context, data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
GetPaymentByFixedPaymentCodeWithContext gets one retail outlet fixed payment code with context
func UpdateFixedPaymentCode ¶
func UpdateFixedPaymentCode(data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
UpdateFixedPaymentCode updates a retail outlet fixed payment code
Example ¶
xendit.Opt.SecretKey = "examplesecretkey" expirationDate := time.Now().AddDate(0, 0, 1) updateFixedPaymentCodeData := retailoutlet.UpdateFixedPaymentCodeParams{ FixedPaymentCodeID: "123", Name: "Billy Jackson", ExpectedAmount: 2000000, ExpirationDate: &expirationDate, } resp, err := retailoutlet.UpdateFixedPaymentCode(&updateFixedPaymentCodeData) if err != nil { log.Fatal(err.ErrorCode) } fmt.Printf("updated retail outlet fixed payment code: %+v\n", resp)
Output:
func UpdateFixedPaymentCodeWithContext ¶
func UpdateFixedPaymentCodeWithContext(ctx context.Context, data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
UpdateFixedPaymentCodeWithContext updates a retail outlet fixed payment code with context
Types ¶
type Client ¶
type Client struct { Opt *xendit.Option APIRequester xendit.APIRequester }
Client is the client used to invoke invoice API.
func (*Client) CreateFixedPaymentCode ¶
func (c *Client) CreateFixedPaymentCode(data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
CreateFixedPaymentCode creates new retail outlet fixed payment code
func (*Client) CreateFixedPaymentCodeWithContext ¶
func (c *Client) CreateFixedPaymentCodeWithContext(ctx context.Context, data *CreateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
CreateFixedPaymentCodeWithContext creates new retail outlet fixed payment code with context
func (*Client) GetFixedPaymentCode ¶
func (c *Client) GetFixedPaymentCode(data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
GetFixedPaymentCode gets one retail outlet fixed payment code
func (*Client) GetFixedPaymentCodeWithContext ¶
func (c *Client) GetFixedPaymentCodeWithContext(ctx context.Context, data *GetFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
GetFixedPaymentCodeWithContext gets one retail outlet fixed payment code with context
func (*Client) GetPaymentByFixedPaymentCode ¶
func (c *Client) GetPaymentByFixedPaymentCode(data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
GetPaymentByFixedPaymentCode gets list retail outlet fixed payment code
func (*Client) GetPaymentByFixedPaymentCodeWithContext ¶
func (c *Client) GetPaymentByFixedPaymentCodeWithContext(ctx context.Context, data *GetPaymentByFixedPaymentCodeParams) (*xendit.RetailOutletPayments, *xendit.Error)
GetPaymentByFixedPaymentCodeWithContext gets list retail outlet fixed payment code with context
func (*Client) UpdateFixedPaymentCode ¶
func (c *Client) UpdateFixedPaymentCode(data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
UpdateFixedPaymentCode updates a retail outlet fixed payment code
func (*Client) UpdateFixedPaymentCodeWithContext ¶
func (c *Client) UpdateFixedPaymentCodeWithContext(ctx context.Context, data *UpdateFixedPaymentCodeParams) (*xendit.RetailOutlet, *xendit.Error)
UpdateFixedPaymentCodeWithContext updates a retail outlet fixed payment code with context
type CreateFixedPaymentCodeParams ¶
type CreateFixedPaymentCodeParams struct { ForUserID string `json:"-"` ExternalID string `json:"external_id" validate:"required"` RetailOutletName xendit.RetailOutletNameEnum `json:"retail_outlet_name" validate:"required"` Name string `json:"name" validate:"required"` ExpectedAmount float64 `json:"expected_amount" validate:"required"` PaymentCode string `json:"payment_code,omitempty"` ExpirationDate *time.Time `json:"expiration_date,omitempty"` IsSingleUse *bool `json:"is_single_use,omitempty"` }
CreateFixedPaymentCodeParams contains parameters for CreateFixedPaymentCode
type GetFixedPaymentCodeParams ¶
type GetFixedPaymentCodeParams struct { ForUserID string `json:"-"` FixedPaymentCodeID string `json:"fixed_payment_code_id" validate:"required"` }
GetFixedPaymentCodeParams contains parameters for GetFixedPaymentCode
type GetPaymentByFixedPaymentCodeParams ¶
type GetPaymentByFixedPaymentCodeParams struct { ForUserID string `json:"-"` FixedPaymentCodeID string `json:"fixed_payment_code_id" validate:"required"` }
GetPaymentByFixedPaymentCodeParams contains parameters for GetFixedPaymentCode
type UpdateFixedPaymentCodeParams ¶
type UpdateFixedPaymentCodeParams struct { ForUserID string `json:"-"` FixedPaymentCodeID string `json:"-" validate:"required"` Name string `json:"name,omitempty"` ExpectedAmount float64 `json:"expected_amount,omitempty"` ExpirationDate *time.Time `json:"expiration_date,omitempty"` }
UpdateFixedPaymentCodeParams contains parameters for UpdateFixedPaymentCode