customercredit

package
v0.0.0-...-1fd1e9e Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryCreditOpts

type QueryCreditOpts struct {
	//Customer ID
	CustomerId string `q:"customer_id" required:"true"`
}

func (QueryCreditOpts) ToQueryCreditMap

func (opts QueryCreditOpts) ToQueryCreditMap() (string, error)

type QueryCreditOptsBuilder

type QueryCreditOptsBuilder interface {
	ToQueryCreditMap() (string, error)
}

type QueryCreditResp

type QueryCreditResp struct {
	//Error Code
	ErrorCode string `json:"error_code"`

	//Description
	ErrorMsg string `json:"error_msg"`

	//Credit limit
	CreditAmount float64 `json:"creditAmount,omitempty"`

	//Used credit
	UsedAmount *float64 `json:"usedAmount,omitempty"`

	//Unit
	MeasureId *int `json:"measureId,omitempty"`

	//Currency
	Currency string `json:"currency"`
}

type QueryCreditResult

type QueryCreditResult struct {
	gophercloud.Result
}

func QueryCredit

*

  • You can use REST APIs to query customers' credit limits on your sales platform.
  • This API can be invoked only by the partner account AK/SK or token.

func (QueryCreditResult) Extract

func (r QueryCreditResult) Extract() (*QueryCreditResp, error)

type SetCreditError

type SetCreditError struct {
	BasicError    errorObj      `json:"error"`
	InternalError []internalErr `json:"internalError"`
}

func (SetCreditError) Error

func (e SetCreditError) Error() string

Error,Implement the Error() interface.

func (SetCreditError) ErrorCode

func (e SetCreditError) ErrorCode() string

ErrorCode,Error code converted to string type.

func (SetCreditError) Message

func (e SetCreditError) Message() string

Message,Return error message.

type SetCreditOpts

type SetCreditOpts struct {
	//客户ID。
	CustomerId string `json:"customerId" required:"true"`

	//调整的目标金额。
	AdjustmentAmount float64 `json:"adjustmentAmount" required:"true"`

	//金额单位。
	MeasureId *int `json:"measureId" required:"true"`
}

func (SetCreditOpts) ToSetCreditMap

func (opts SetCreditOpts) ToSetCreditMap() (map[string]interface{}, error)

type SetCreditOptsBuilder

type SetCreditOptsBuilder interface {
	ToSetCreditMap() (map[string]interface{}, error)
}

type SetCreditResp

type SetCreditResp struct {
	//Error Code
	ErrorCode string `json:"error_code"`

	//Description
	ErrorMsg string `json:"error_msg"`
}

type SetCreditResult

type SetCreditResult struct {
	gophercloud.Result
}

func SetCredit

* * You can use REST APIs to configure customers' credit limits on your sales platform. * This API can be invoked only by the partner account AK/SK or token.

func (SetCreditResult) Extract

func (r SetCreditResult) Extract() (*SetCreditResp, error)

Jump to

Keyboard shortcuts

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