Documentation
¶
Overview ¶
Package smspva provides a client for the SMSPVA Activation V2, Rental and Private Email APIs. It preserves the documented wire methods and responses. Requests use contexts and do not retry automatically. Reference lists are live.
Code generated from sdk/contracts.json. DO NOT EDIT.
Index ¶
- func IsNoStock(r Response) bool
- func IsPending(r Response) bool
- func Ptr[T any](value T) *T
- type APIError
- type Activation
- func (r *Activation) BlockNumber(ctx context.Context, params ActivationBlockNumberParams, ...) (Response, error)
- func (r *Activation) CancelOrder(ctx context.Context, params ActivationCancelOrderParams, ...) (Response, error)
- func (r *Activation) ClearSms(ctx context.Context, params ActivationClearSmsParams, options ...RequestOption) (Response, error)
- func (r *Activation) GetAllNumberCounts(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Activation) GetAllServicePrices(ctx context.Context, params ActivationGetAllServicePricesParams, ...) (Response, error)
- func (r *Activation) GetBalance(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Activation) GetConversions(ctx context.Context, params ActivationGetConversionsParams, ...) (Response, error)
- func (r *Activation) GetCountryNumberCounts(ctx context.Context, params ActivationGetCountryNumberCountsParams, ...) (Response, error)
- func (r *Activation) GetCountryOperatorPrices(ctx context.Context, params ActivationGetCountryOperatorPricesParams, ...) (Response, error)
- func (r *Activation) GetMessageTypeSettings(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Activation) GetNumber(ctx context.Context, params ActivationGetNumberParams, ...) (Response, error)
- func (r *Activation) GetNumberByOperator(ctx context.Context, params ActivationGetNumberByOperatorParams, ...) (Response, error)
- func (r *Activation) GetNumberStatus(ctx context.Context, params ActivationGetNumberStatusParams, ...) (Response, error)
- func (r *Activation) GetOperators(ctx context.Context, params ActivationGetOperatorsParams, ...) (Response, error)
- func (r *Activation) GetOrders(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Activation) GetServicePrice(ctx context.Context, params ActivationGetServicePriceParams, ...) (Response, error)
- func (r *Activation) GetServicePrices(ctx context.Context, params ActivationGetServicePricesParams, ...) (Response, error)
- func (r *Activation) GetUserInfo(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Activation) ReceiveSms(ctx context.Context, params ActivationReceiveSmsParams, ...) (Response, error)
- func (r *Activation) StopSms(ctx context.Context, params ActivationStopSmsParams, options ...RequestOption) (Response, error)
- func (r *Activation) WaitForSMS(ctx context.Context, options WaitForSMSOptions) (Response, error)
- type ActivationBlockNumberParams
- type ActivationCancelOrderParams
- type ActivationClearSmsParams
- type ActivationGetAllServicePricesParams
- type ActivationGetConversionsParams
- type ActivationGetCountryNumberCountsParams
- type ActivationGetCountryOperatorPricesParams
- type ActivationGetNumberByOperatorParams
- type ActivationGetNumberParams
- type ActivationGetNumberStatusParams
- type ActivationGetOperatorsParams
- type ActivationGetServicePriceParams
- type ActivationGetServicePricesParams
- type ActivationReceiveSmsParams
- type ActivationStopSmsParams
- type Client
- type Email
- func (r *Email) BuyAlias(ctx context.Context, params EmailBuyAliasParams, options ...RequestOption) (Response, error)
- func (r *Email) CalcRestoreOrder(ctx context.Context, params EmailCalcRestoreOrderParams, ...) (Response, error)
- func (r *Email) CancelOrder(ctx context.Context, params EmailCancelOrderParams, options ...RequestOption) (Response, error)
- func (r *Email) CreateOrder(ctx context.Context, params EmailCreateOrderParams, options ...RequestOption) (Response, error)
- func (r *Email) GetArchivedOrders(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Email) GetCount(ctx context.Context, params EmailGetCountParams, options ...RequestOption) (Response, error)
- func (r *Email) GetData(ctx context.Context, params EmailGetDataParams, options ...RequestOption) (Response, error)
- func (r *Email) GetMailBody(ctx context.Context, params EmailGetMailBodyParams, options ...RequestOption) (Response, error)
- func (r *Email) GetMails(ctx context.Context, params EmailGetMailsParams, options ...RequestOption) (Response, error)
- func (r *Email) GetMailsByAlias(ctx context.Context, params EmailGetMailsByAliasParams, ...) (Response, error)
- func (r *Email) GetOrders(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Email) GetProviders(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Email) ProlongOrder(ctx context.Context, params EmailProlongOrderParams, options ...RequestOption) (Response, error)
- func (r *Email) RestoreOrder(ctx context.Context, params EmailRestoreOrderParams, options ...RequestOption) (Response, error)
- type EmailBuyAliasParams
- type EmailCalcRestoreOrderParams
- type EmailCancelOrderParams
- type EmailCreateOrderParams
- type EmailGetCountParams
- type EmailGetDataParams
- type EmailGetMailBodyParams
- type EmailGetMailsByAliasParams
- type EmailGetMailsParams
- type EmailProlongOrderParams
- type EmailRestoreOrderParams
- type Options
- type PollingTimeoutError
- type ProtocolError
- type Rental
- func (r *Rental) Activate(ctx context.Context, params RentalActivateParams, options ...RequestOption) (Response, error)
- func (r *Rental) AddServiceToOrder(ctx context.Context, params RentalAddServiceToOrderParams, ...) (Response, error)
- func (r *Rental) Create(ctx context.Context, params RentalCreateParams, options ...RequestOption) (Response, error)
- func (r *Rental) CreateMulti(ctx context.Context, params RentalCreateMultiParams, options ...RequestOption) (Response, error)
- func (r *Rental) DeleteOrder(ctx context.Context, params RentalDeleteOrderParams, options ...RequestOption) (Response, error)
- func (r *Rental) GetCanadaPaypalDays(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Rental) GetCount(ctx context.Context, params RentalGetCountParams, options ...RequestOption) (Response, error)
- func (r *Rental) GetCountWithProviders(ctx context.Context, params RentalGetCountWithProvidersParams, ...) (Response, error)
- func (r *Rental) GetCountries(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Rental) GetCountriesByService(ctx context.Context, params RentalGetCountriesByServiceParams, ...) (Response, error)
- func (r *Rental) GetData(ctx context.Context, params RentalGetDataParams, options ...RequestOption) (Response, error)
- func (r *Rental) GetDataWithProviders(ctx context.Context, params RentalGetDataWithProvidersParams, ...) (Response, error)
- func (r *Rental) GetDefaultServices(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Rental) GetHistory(ctx context.Context, params RentalGetHistoryParams, options ...RequestOption) (Response, error)
- func (r *Rental) GetMinimumPaypalDays(ctx context.Context, params RentalGetMinimumPaypalDaysParams, ...) (Response, error)
- func (r *Rental) GetMultiServiceCount(ctx context.Context, params RentalGetMultiServiceCountParams, ...) (Response, error)
- func (r *Rental) GetOrders(ctx context.Context, options ...RequestOption) (Response, error)
- func (r *Rental) GetRestoreCost(ctx context.Context, params RentalGetRestoreCostParams, ...) (Response, error)
- func (r *Rental) GetSms(ctx context.Context, params RentalGetSmsParams, options ...RequestOption) (Response, error)
- func (r *Rental) Prolong(ctx context.Context, params RentalProlongParams, options ...RequestOption) (Response, error)
- func (r *Rental) ProlongByDays(ctx context.Context, params RentalProlongByDaysParams, ...) (Response, error)
- func (r *Rental) Restore(ctx context.Context, params RentalRestoreParams, options ...RequestOption) (Response, error)
- type RentalActivateParams
- type RentalAddServiceToOrderParams
- type RentalCreateMultiParams
- type RentalCreateParams
- type RentalDeleteOrderParams
- type RentalGetCountParams
- type RentalGetCountWithProvidersParams
- type RentalGetCountriesByServiceParams
- type RentalGetDataParams
- type RentalGetDataWithProvidersParams
- type RentalGetHistoryParams
- type RentalGetMinimumPaypalDaysParams
- type RentalGetMultiServiceCountParams
- type RentalGetRestoreCostParams
- type RentalGetSmsParams
- type RentalProlongByDaysParams
- type RentalProlongParams
- type RentalRestoreParams
- type RequestOption
- type Response
- type TransportError
- type ValidationError
- type WaitForSMSOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
type Activation ¶
type Activation struct {
// contains filtered or unexported fields
}
func (*Activation) BlockNumber ¶
func (r *Activation) BlockNumber(ctx context.Context, params ActivationBlockNumberParams, options ...RequestOption) (Response, error)
BlockNumber calls PUT /activation/blocknumber/{orderid}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) CancelOrder ¶
func (r *Activation) CancelOrder(ctx context.Context, params ActivationCancelOrderParams, options ...RequestOption) (Response, error)
CancelOrder calls PUT /activation/cancelorder/{orderid}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) ClearSms ¶
func (r *Activation) ClearSms(ctx context.Context, params ActivationClearSmsParams, options ...RequestOption) (Response, error)
ClearSms calls PUT /activation/clearsms/{orderid}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) GetAllNumberCounts ¶
func (r *Activation) GetAllNumberCounts(ctx context.Context, options ...RequestOption) (Response, error)
GetAllNumberCounts calls GET /activation/countnumbers.
func (*Activation) GetAllServicePrices ¶
func (r *Activation) GetAllServicePrices(ctx context.Context, params ActivationGetAllServicePricesParams, options ...RequestOption) (Response, error)
GetAllServicePrices calls GET /activation/servicesprices.
func (*Activation) GetBalance ¶
func (r *Activation) GetBalance(ctx context.Context, options ...RequestOption) (Response, error)
GetBalance calls GET /activation/balance.
func (*Activation) GetConversions ¶
func (r *Activation) GetConversions(ctx context.Context, params ActivationGetConversionsParams, options ...RequestOption) (Response, error)
GetConversions calls GET /activation/conversions/{service}.
func (*Activation) GetCountryNumberCounts ¶
func (r *Activation) GetCountryNumberCounts(ctx context.Context, params ActivationGetCountryNumberCountsParams, options ...RequestOption) (Response, error)
GetCountryNumberCounts calls GET /activation/countnumbers/{country}.
func (*Activation) GetCountryOperatorPrices ¶
func (r *Activation) GetCountryOperatorPrices(ctx context.Context, params ActivationGetCountryOperatorPricesParams, options ...RequestOption) (Response, error)
GetCountryOperatorPrices calls GET /activation/serviceprice/{country}.
func (*Activation) GetMessageTypeSettings ¶
func (r *Activation) GetMessageTypeSettings(ctx context.Context, options ...RequestOption) (Response, error)
GetMessageTypeSettings calls GET /activation/countryservicesettings.
func (*Activation) GetNumber ¶
func (r *Activation) GetNumber(ctx context.Context, params ActivationGetNumberParams, options ...RequestOption) (Response, error)
GetNumber calls GET /activation/number/{country}/{service}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) GetNumberByOperator ¶
func (r *Activation) GetNumberByOperator(ctx context.Context, params ActivationGetNumberByOperatorParams, options ...RequestOption) (Response, error)
GetNumberByOperator calls GET /activation/number/{country}/{service}/{operator}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) GetNumberStatus ¶
func (r *Activation) GetNumberStatus(ctx context.Context, params ActivationGetNumberStatusParams, options ...RequestOption) (Response, error)
GetNumberStatus calls GET /activation/numberstatus/{number}/{service}.
func (*Activation) GetOperators ¶
func (r *Activation) GetOperators(ctx context.Context, params ActivationGetOperatorsParams, options ...RequestOption) (Response, error)
GetOperators calls GET /activation/operators/{country}.
func (*Activation) GetOrders ¶
func (r *Activation) GetOrders(ctx context.Context, options ...RequestOption) (Response, error)
GetOrders calls GET /activation/orders.
func (*Activation) GetServicePrice ¶
func (r *Activation) GetServicePrice(ctx context.Context, params ActivationGetServicePriceParams, options ...RequestOption) (Response, error)
GetServicePrice calls GET /activation/serviceprice/{country}/{service}.
func (*Activation) GetServicePrices ¶
func (r *Activation) GetServicePrices(ctx context.Context, params ActivationGetServicePricesParams, options ...RequestOption) (Response, error)
GetServicePrices calls GET /activation/serviceprices/{service}.
func (*Activation) GetUserInfo ¶
func (r *Activation) GetUserInfo(ctx context.Context, options ...RequestOption) (Response, error)
GetUserInfo calls GET /activation/userinfo.
func (*Activation) ReceiveSms ¶
func (r *Activation) ReceiveSms(ctx context.Context, params ActivationReceiveSmsParams, options ...RequestOption) (Response, error)
ReceiveSms calls GET /activation/sms/{orderid}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) StopSms ¶
func (r *Activation) StopSms(ctx context.Context, params ActivationStopSmsParams, options ...RequestOption) (Response, error)
StopSms calls PUT /activation/stopsms/{orderid}. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Activation) WaitForSMS ¶
func (r *Activation) WaitForSMS(ctx context.Context, options WaitForSMSOptions) (Response, error)
WaitForSMS polls an existing activation. A newly received SMS may charge the account. It never purchases, retries failed requests, or cancels an order.
type ActivationBlockNumberParams ¶
type ActivationBlockNumberParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type ActivationCancelOrderParams ¶
type ActivationCancelOrderParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type ActivationClearSmsParams ¶
type ActivationClearSmsParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type ActivationGetAllServicePricesParams ¶
type ActivationGetAllServicePricesParams struct {
Voice *int64 "json:\"voice,omitempty\"" // Optional.
}
type ActivationGetConversionsParams ¶
type ActivationGetConversionsParams struct {
Service *string "json:\"service,omitempty\"" // Required.
}
type ActivationGetCountryNumberCountsParams ¶
type ActivationGetCountryNumberCountsParams struct {
Country *string "json:\"country,omitempty\"" // Required.
}
type ActivationGetOperatorsParams ¶
type ActivationGetOperatorsParams struct {
Country *string "json:\"country,omitempty\"" // Required.
}
type ActivationStopSmsParams ¶
type ActivationStopSmsParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type Client ¶
type Client struct {
Activation *Activation
Rental *Rental
Email *Email
// contains filtered or unexported fields
}
func (*Client) CloseIdleConnections ¶
func (c *Client) CloseIdleConnections()
type Email ¶
type Email struct {
// contains filtered or unexported fields
}
func (*Email) BuyAlias ¶
func (r *Email) BuyAlias(ctx context.Context, params EmailBuyAliasParams, options ...RequestOption) (Response, error)
BuyAlias calls GET /api/rent_email.php?method=buy_alias. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Email) CalcRestoreOrder ¶
func (r *Email) CalcRestoreOrder(ctx context.Context, params EmailCalcRestoreOrderParams, options ...RequestOption) (Response, error)
CalcRestoreOrder calls GET /api/rent_email.php?method=calc_restore_order.
func (*Email) CancelOrder ¶
func (r *Email) CancelOrder(ctx context.Context, params EmailCancelOrderParams, options ...RequestOption) (Response, error)
CancelOrder calls GET /api/rent_email.php?method=cancel_order. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Email) CreateOrder ¶
func (r *Email) CreateOrder(ctx context.Context, params EmailCreateOrderParams, options ...RequestOption) (Response, error)
CreateOrder calls GET /api/rent_email.php?method=create_order. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Email) GetArchivedOrders ¶
GetArchivedOrders calls GET /api/rent_email.php?method=get_archived_orders.
func (*Email) GetCount ¶
func (r *Email) GetCount(ctx context.Context, params EmailGetCountParams, options ...RequestOption) (Response, error)
GetCount calls GET /api/rent_email.php?method=get_count.
func (*Email) GetData ¶
func (r *Email) GetData(ctx context.Context, params EmailGetDataParams, options ...RequestOption) (Response, error)
GetData calls GET /api/rent_email.php?method=get_data.
func (*Email) GetMailBody ¶
func (r *Email) GetMailBody(ctx context.Context, params EmailGetMailBodyParams, options ...RequestOption) (Response, error)
GetMailBody calls GET /api/rent_email.php?method=get_mail_body.
func (*Email) GetMails ¶
func (r *Email) GetMails(ctx context.Context, params EmailGetMailsParams, options ...RequestOption) (Response, error)
GetMails calls GET /api/rent_email.php?method=get_mails.
func (*Email) GetMailsByAlias ¶
func (r *Email) GetMailsByAlias(ctx context.Context, params EmailGetMailsByAliasParams, options ...RequestOption) (Response, error)
GetMailsByAlias calls GET /api/rent_email.php?method=get_mails_by_alias.
func (*Email) GetProviders ¶
GetProviders calls GET /api/rent_email.php?method=get_providers.
func (*Email) ProlongOrder ¶
func (r *Email) ProlongOrder(ctx context.Context, params EmailProlongOrderParams, options ...RequestOption) (Response, error)
ProlongOrder calls GET /api/rent_email.php?method=prolong_order. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Email) RestoreOrder ¶
func (r *Email) RestoreOrder(ctx context.Context, params EmailRestoreOrderParams, options ...RequestOption) (Response, error)
RestoreOrder calls GET /api/rent_email.php?method=restore_order. This operation changes state or may charge the account. It is never retried by the SDK.
type EmailBuyAliasParams ¶
type EmailCalcRestoreOrderParams ¶
type EmailCalcRestoreOrderParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type EmailCancelOrderParams ¶
type EmailCancelOrderParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type EmailCreateOrderParams ¶
type EmailGetCountParams ¶
type EmailGetCountParams struct {
Pcode *string "json:\"pcode,omitempty\"" // Optional.
}
type EmailGetDataParams ¶
type EmailGetDataParams struct {
Pcode *string "json:\"pcode,omitempty\"" // Optional.
}
type EmailGetMailBodyParams ¶
type EmailGetMailsParams ¶
type EmailProlongOrderParams ¶
type EmailRestoreOrderParams ¶
type EmailRestoreOrderParams struct {
OrderID *int64 "json:\"orderid,omitempty\"" // Required.
}
type Options ¶
type Options struct {
APIKey string
Timeout time.Duration
ActivationBaseURL, RentalBaseURL, EmailBaseURL string
Transport http.RoundTripper
}
Options configures one account. Transport is optional; custom transports must not retry paid GETs.
type PollingTimeoutError ¶
type PollingTimeoutError struct{}
func (*PollingTimeoutError) Error ¶
func (e *PollingTimeoutError) Error() string
type ProtocolError ¶
func (*ProtocolError) Error ¶
func (e *ProtocolError) Error() string
type Rental ¶
type Rental struct {
// contains filtered or unexported fields
}
func (*Rental) Activate ¶
func (r *Rental) Activate(ctx context.Context, params RentalActivateParams, options ...RequestOption) (Response, error)
Activate calls GET /api/rent.php?method=activate. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) AddServiceToOrder ¶
func (r *Rental) AddServiceToOrder(ctx context.Context, params RentalAddServiceToOrderParams, options ...RequestOption) (Response, error)
AddServiceToOrder calls GET /api/rent.php?method=add_service_to_order. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) Create ¶
func (r *Rental) Create(ctx context.Context, params RentalCreateParams, options ...RequestOption) (Response, error)
Create calls GET /api/rent.php?method=create. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) CreateMulti ¶
func (r *Rental) CreateMulti(ctx context.Context, params RentalCreateMultiParams, options ...RequestOption) (Response, error)
CreateMulti calls GET /api/rent.php?method=create_multi. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) DeleteOrder ¶
func (r *Rental) DeleteOrder(ctx context.Context, params RentalDeleteOrderParams, options ...RequestOption) (Response, error)
DeleteOrder calls GET /api/rent.php?method=delete. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) GetCanadaPaypalDays ¶
func (r *Rental) GetCanadaPaypalDays(ctx context.Context, options ...RequestOption) (Response, error)
GetCanadaPaypalDays calls GET /api/rent.php?method=get_days_canada_paypal.
func (*Rental) GetCount ¶
func (r *Rental) GetCount(ctx context.Context, params RentalGetCountParams, options ...RequestOption) (Response, error)
GetCount calls GET /api/rent.php?method=getcount.
func (*Rental) GetCountWithProviders ¶
func (r *Rental) GetCountWithProviders(ctx context.Context, params RentalGetCountWithProvidersParams, options ...RequestOption) (Response, error)
GetCountWithProviders calls GET /api/rent.php?method=getCountWithProviders.
func (*Rental) GetCountries ¶
GetCountries calls GET /api/rent.php?method=getcountries.
func (*Rental) GetCountriesByService ¶
func (r *Rental) GetCountriesByService(ctx context.Context, params RentalGetCountriesByServiceParams, options ...RequestOption) (Response, error)
GetCountriesByService calls GET /api/rent.php?method=get_country_by_service.
func (*Rental) GetData ¶
func (r *Rental) GetData(ctx context.Context, params RentalGetDataParams, options ...RequestOption) (Response, error)
GetData calls GET /api/rent.php?method=getdata.
func (*Rental) GetDataWithProviders ¶
func (r *Rental) GetDataWithProviders(ctx context.Context, params RentalGetDataWithProvidersParams, options ...RequestOption) (Response, error)
GetDataWithProviders calls GET /api/rent.php?method=getdataWithProviders.
func (*Rental) GetDefaultServices ¶
func (r *Rental) GetDefaultServices(ctx context.Context, options ...RequestOption) (Response, error)
GetDefaultServices calls GET /api/rent.php?method=get_default_services.
func (*Rental) GetHistory ¶
func (r *Rental) GetHistory(ctx context.Context, params RentalGetHistoryParams, options ...RequestOption) (Response, error)
GetHistory calls GET /api/rent.php?method=get_rent_history.
func (*Rental) GetMinimumPaypalDays ¶
func (r *Rental) GetMinimumPaypalDays(ctx context.Context, params RentalGetMinimumPaypalDaysParams, options ...RequestOption) (Response, error)
GetMinimumPaypalDays calls GET /api/rent.php?method=get_min_paypal_days.
func (*Rental) GetMultiServiceCount ¶
func (r *Rental) GetMultiServiceCount(ctx context.Context, params RentalGetMultiServiceCountParams, options ...RequestOption) (Response, error)
GetMultiServiceCount calls GET /api/rent.php?method=get_count_multi.
func (*Rental) GetRestoreCost ¶
func (r *Rental) GetRestoreCost(ctx context.Context, params RentalGetRestoreCostParams, options ...RequestOption) (Response, error)
GetRestoreCost calls GET /api/rent.php?method=restore_user_precalc.
func (*Rental) GetSms ¶
func (r *Rental) GetSms(ctx context.Context, params RentalGetSmsParams, options ...RequestOption) (Response, error)
GetSms calls GET /api/rent.php?method=sms.
func (*Rental) Prolong ¶
func (r *Rental) Prolong(ctx context.Context, params RentalProlongParams, options ...RequestOption) (Response, error)
Prolong calls GET /api/rent.php?method=prolong. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) ProlongByDays ¶
func (r *Rental) ProlongByDays(ctx context.Context, params RentalProlongByDaysParams, options ...RequestOption) (Response, error)
ProlongByDays calls GET /api/rent.php?method=prolong_max. This operation changes state or may charge the account. It is never retried by the SDK.
func (*Rental) Restore ¶
func (r *Rental) Restore(ctx context.Context, params RentalRestoreParams, options ...RequestOption) (Response, error)
Restore calls GET /api/rent.php?method=restore_user. This operation changes state or may charge the account. It is never retried by the SDK.
type RentalActivateParams ¶
type RentalActivateParams struct {
ID *int64 "json:\"id,omitempty\"" // Required.
}
type RentalCreateMultiParams ¶
type RentalCreateMultiParams struct {
Dtype *string "json:\"dtype,omitempty\"" // Required.
Dcount *int64 "json:\"dcount,omitempty\"" // Required.
Country *string "json:\"country,omitempty\"" // Required.
Services *string "json:\"services,omitempty\"" // Required.
Provider *string "json:\"provider,omitempty\"" // Optional.
PartnerKey *string "json:\"partner_key,omitempty\"" // Optional.
}
type RentalCreateParams ¶
type RentalCreateParams struct {
Dtype *string "json:\"dtype,omitempty\"" // Required.
Dcount *int64 "json:\"dcount,omitempty\"" // Required.
Country *string "json:\"country,omitempty\"" // Required.
Service *string "json:\"service,omitempty\"" // Required.
Provider *string "json:\"provider,omitempty\"" // Optional.
PartnerKey *string "json:\"partner_key,omitempty\"" // Optional.
}
type RentalDeleteOrderParams ¶
type RentalDeleteOrderParams struct {
ID *int64 "json:\"id,omitempty\"" // Required.
}
type RentalGetCountParams ¶
type RentalGetDataParams ¶
type RentalGetHistoryParams ¶
type RentalGetRestoreCostParams ¶
type RentalGetRestoreCostParams struct {
ID *int64 "json:\"id,omitempty\"" // Required.
}
type RentalGetSmsParams ¶
type RentalGetSmsParams struct {
ID *int64 "json:\"id,omitempty\"" // Required.
}
type RentalProlongParams ¶
type RentalRestoreParams ¶
type RentalRestoreParams struct {
ID *int64 "json:\"id,omitempty\"" // Required.
}
type RequestOption ¶
type RequestOption func(*requestOptions) error
func WithTimeout ¶
func WithTimeout(timeout time.Duration) RequestOption
func WithoutAPIKey ¶
func WithoutAPIKey() RequestOption
type Response ¶
type Response struct {
HTTPStatus int
Body json.RawMessage
}
Response retains the original JSON bytes. Decode into a caller-owned typed value when needed.
func (Response) MarshalJSON ¶
type TransportError ¶
type TransportError struct {
Family, Operation, Kind string
OutcomeUnknown bool
// contains filtered or unexported fields
}
func (*TransportError) Error ¶
func (e *TransportError) Error() string
func (*TransportError) Unwrap ¶
func (e *TransportError) Unwrap() error
Only context sentinel errors are unwrapped; raw transport URLs and credentials are not exposed.
type ValidationError ¶
type ValidationError struct{ Message string }
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string