Documentation ¶
Index ¶
- type CSVDecimals
- type CSVStrings
- type Client
- func (c *Client) MSISDNInfo(destinationMSISDN string, currency string, deliveredAmountInfo string) (*MSISDNInfo, error)
- func (c *Client) Ping() error
- func (c *Client) ReserveID() (int, error)
- func (c *Client) SetAPIURL(url string)
- func (c *Client) Topup(reservedID int, msisdn string, destinationMSISDN string, product string, ...) (*Topup, error)
- type MSISDNInfo
- type Response
- type Topup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVDecimals ¶
CSVDecimals is a list of decimals which can be automatically unmarshalled from a CSV list
func (*CSVDecimals) UnmarshalJSON ¶
func (l *CSVDecimals) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals this list from a CSV string
type CSVStrings ¶
type CSVStrings []string
CSVStrings is a list of strings which can be automatically unmarshalled from a CSV list
func (*CSVStrings) UnmarshalJSON ¶
func (l *CSVStrings) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals this list from a CSV string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a TransferTo client see https://shop.transferto.com/shop/v3/doc/TransferTo_API.pdf for API docs
func NewTransferToClient ¶
func NewTransferToClient(login string, token string, httpClient *utils.HTTPClient) *Client
NewTransferToClient creates a new TransferTo client
func (*Client) MSISDNInfo ¶
func (c *Client) MSISDNInfo(destinationMSISDN string, currency string, deliveredAmountInfo string) (*MSISDNInfo, error)
MSISDNInfo fetches information about the given MSISDN
type MSISDNInfo ¶
type MSISDNInfo struct { Country string `json:"country"` CountryID int `json:"country_id,string"` Operator string `json:"operator"` OperatorID int `json:"operator_id,string"` ConnectionStatus int `json:"connection_status,string"` DestinationCurrency string `json:"destination_currency"` ProductList CSVStrings `json:"product_list"` ServiceFeeList CSVDecimals `json:"service_fee_list"` SKUIDList CSVStrings `json:"skuid_list"` LocalInfoValueList CSVDecimals `json:"local_info_value_list"` // if operator supports open-range transfers... OpenRange bool `json:"open_range"` SKUID string `json:"skuid"` OpenRangeMinimumAmountLocalCurrency decimal.Decimal `json:"open_range_minimum_amount_local_currency"` OpenRangeMaximumAmountLocalCurrency decimal.Decimal `json:"open_range_maximum_amount_local_currency"` OpenRangeIncrementLocalCurrency decimal.Decimal `json:"open_range_increment_local_currency"` // contains filtered or unexported fields }
MSISDNInfo is a response to a msisdn_info request
type Topup ¶
type Topup struct { DestinationCurrency string `json:"destination_currency"` OriginatingCurrency string `json:"originating_currency"` ProductRequested decimal.Decimal `json:"product_requested"` ActualProductSent decimal.Decimal `json:"actual_product_sent"` SMSSent string `json:"sms_sent"` SMS string `json:"sms"` WholesalePrice decimal.Decimal `json:"wholesale_price"` ServiceFee decimal.Decimal `json:"service_fee"` RetailPrice decimal.Decimal `json:"retail_price"` LocalInfoAmount decimal.Decimal `json:"local_info_amount"` LocalInfoValue decimal.Decimal `json:"local_info_value"` Balance decimal.Decimal `json:"balance"` // contains filtered or unexported fields }
Topup is a response to a topup request
Click to show internal directories.
Click to hide internal directories.