Documentation ¶
Index ¶
- Constants
- func CalculateSignature(signingSecret string, data string) (sha string, err error)
- func CalculateWebhookSignatureMiddleware(signingSecret string, next http.Handler) http.Handler
- func ConvertToStruct[T any](from interface{}) (to T, err error)
- func NewCancelAnOrderRequest(server string, orderId string) (*http.Request, error)
- func NewCreateACheckoutSessionForATokenRequest(server string, body CreateACheckoutSessionForATokenJSONRequestBody) (*http.Request, error)
- func NewCreateACheckoutSessionRequest(server string, body CreateACheckoutSessionJSONRequestBody) (*http.Request, error)
- func NewCreateACheckoutSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateACouponRequest(server string, body CreateACouponJSONRequestBody) (*http.Request, error)
- func NewCreateACouponRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAPaymentRequest(server string, body CreateAPaymentJSONRequestBody) (*http.Request, error)
- func NewCreateAPaymentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAPromotionCodeRequest(server string, body CreateAPromotionCodeJSONRequestBody) (*http.Request, error)
- func NewCreateAPromotionCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateARefundRequest(server string, body CreateARefundJSONRequestBody) (*http.Request, error)
- func NewCreateARefundRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAWebhookEndpointRequest(server string, body CreateAWebhookEndpointJSONRequestBody) (*http.Request, error)
- func NewCreateAWebhookEndpointRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateAnOrderUsingATokenRequest(server string, body CreateAnOrderUsingATokenJSONRequestBody) (*http.Request, error)
- func NewCreateAnOrderUsingATokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteATokenRequest(server string, tokenId string) (*http.Request, error)
- func NewDeleteAWebhookEndpointRequest(server string, webhookEndpointId string) (*http.Request, error)
- func NewDisableATokenRequest(server string, tokenId string) (*http.Request, error)
- func NewEnableATokenRequest(server string, tokenId string) (*http.Request, error)
- func NewListAllCheckoutSessionsRequest(server string, params *ListAllCheckoutSessionsParams) (*http.Request, error)
- func NewListAllCouponsRequest(server string, params *ListAllCouponsParams) (*http.Request, error)
- func NewListAllOrdersRequest(server string, params *ListAllOrdersParams) (*http.Request, error)
- func NewListAllPaymentsRequest(server string, params *ListAllPaymentsParams) (*http.Request, error)
- func NewListAllPromotionCodesRequest(server string, params *ListAllPromotionCodesParams) (*http.Request, error)
- func NewListAllRefundsRequest(server string, params *ListAllRefundsParams) (*http.Request, error)
- func NewListAllTokensRequest(server string, params *ListAllTokensParams) (*http.Request, error)
- func NewListAllWebhookEndpointsRequest(server string, params *ListAllWebhookEndpointsParams) (*http.Request, error)
- func NewRetrieveACheckoutSessionRequest(server string, checkoutSessionId string, ...) (*http.Request, error)
- func NewRetrieveACouponRequest(server string, couponId string) (*http.Request, error)
- func NewRetrieveAPaymentRequest(server string, paymentId string, params *RetrieveAPaymentParams) (*http.Request, error)
- func NewRetrieveAPromotionCodeRequest(server string, promotionCodeId string) (*http.Request, error)
- func NewRetrieveARefundRequest(server string, refundId string, params *RetrieveARefundParams) (*http.Request, error)
- func NewRetrieveATokenRequest(server string, tokenId string) (*http.Request, error)
- func NewRetrieveAWebhookEndpointRequest(server string, webhookEndpointId string) (*http.Request, error)
- func NewRetrieveAnOrderRequest(server string, orderId string, params *RetrieveAnOrderParams) (*http.Request, error)
- func NewUpdateACouponRequest(server string, couponId string, body UpdateACouponJSONRequestBody) (*http.Request, error)
- func NewUpdateACouponRequestWithBody(server string, couponId string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateAPaymentRequest(server string, paymentId string, body UpdateAPaymentJSONRequestBody) (*http.Request, error)
- func NewUpdateAPaymentRequestWithBody(server string, paymentId string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateAPromotionCodeRequest(server string, promotionCodeId string, ...) (*http.Request, error)
- func NewUpdateAPromotionCodeRequestWithBody(server string, promotionCodeId string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateARefundRequest(server string, refundId string, body UpdateARefundJSONRequestBody) (*http.Request, error)
- func NewUpdateARefundRequestWithBody(server string, refundId string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateAWebhookEndpointRequest(server string, webhookEndpointId string, ...) (*http.Request, error)
- func NewUpdateAWebhookEndpointRequestWithBody(server string, webhookEndpointId string, contentType string, body io.Reader) (*http.Request, error)
- func Ptr[T any](v T) *T
- func VerifyWebhookSignature(signingSecret string, data string, signature string) bool
- type Address
- type AddressCountry
- type AddressType
- type CancelAnOrderResponse
- type CancelUrl
- type CanceledOrder
- type CaptureMethod
- type CheckoutSessioUrl
- type CheckoutSession
- type CheckoutSessionCreate
- type CheckoutSessionExpanded
- type CheckoutSessionForATokenCreate
- type CheckoutSessionId
- type CheckoutSessionOptions
- type Client
- func (c *Client) CancelAnOrder(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateACheckoutSession(ctx context.Context, body CreateACheckoutSessionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateACheckoutSessionForAToken(ctx context.Context, body CreateACheckoutSessionForATokenJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateACheckoutSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateACoupon(ctx context.Context, body CreateACouponJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateACouponWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAPayment(ctx context.Context, body CreateAPaymentJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAPaymentWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAPromotionCode(ctx context.Context, body CreateAPromotionCodeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAPromotionCodeWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateARefund(ctx context.Context, body CreateARefundJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateARefundWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAWebhookEndpoint(ctx context.Context, body CreateAWebhookEndpointJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAWebhookEndpointWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateAnOrderUsingAToken(ctx context.Context, body CreateAnOrderUsingATokenJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateAnOrderUsingATokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAWebhookEndpoint(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DisableAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) EnableAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListAllCheckoutSessions(ctx context.Context, params *ListAllCheckoutSessionsParams, ...) (*http.Response, error)
- func (c *Client) ListAllCoupons(ctx context.Context, params *ListAllCouponsParams, ...) (*http.Response, error)
- func (c *Client) ListAllOrders(ctx context.Context, params *ListAllOrdersParams, ...) (*http.Response, error)
- func (c *Client) ListAllPayments(ctx context.Context, params *ListAllPaymentsParams, ...) (*http.Response, error)
- func (c *Client) ListAllPromotionCodes(ctx context.Context, params *ListAllPromotionCodesParams, ...) (*http.Response, error)
- func (c *Client) ListAllRefunds(ctx context.Context, params *ListAllRefundsParams, ...) (*http.Response, error)
- func (c *Client) ListAllTokens(ctx context.Context, params *ListAllTokensParams, ...) (*http.Response, error)
- func (c *Client) ListAllWebhookEndpoints(ctx context.Context, params *ListAllWebhookEndpointsParams, ...) (*http.Response, error)
- func (c *Client) RetrieveACheckoutSession(ctx context.Context, checkoutSessionId string, ...) (*http.Response, error)
- func (c *Client) RetrieveACoupon(ctx context.Context, couponId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetrieveAPayment(ctx context.Context, paymentId string, params *RetrieveAPaymentParams, ...) (*http.Response, error)
- func (c *Client) RetrieveAPromotionCode(ctx context.Context, promotionCodeId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetrieveARefund(ctx context.Context, refundId string, params *RetrieveARefundParams, ...) (*http.Response, error)
- func (c *Client) RetrieveAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetrieveAWebhookEndpoint(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RetrieveAnOrder(ctx context.Context, orderId string, params *RetrieveAnOrderParams, ...) (*http.Response, error)
- func (c *Client) UpdateACoupon(ctx context.Context, couponId string, body UpdateACouponJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateACouponWithBody(ctx context.Context, couponId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateAPayment(ctx context.Context, paymentId string, body UpdateAPaymentJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateAPaymentWithBody(ctx context.Context, paymentId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateAPromotionCode(ctx context.Context, promotionCodeId string, ...) (*http.Response, error)
- func (c *Client) UpdateAPromotionCodeWithBody(ctx context.Context, promotionCodeId string, contentType string, ...) (*http.Response, error)
- func (c *Client) UpdateARefund(ctx context.Context, refundId string, body UpdateARefundJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateARefundWithBody(ctx context.Context, refundId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateAWebhookEndpoint(ctx context.Context, webhookEndpointId string, ...) (*http.Response, error)
- func (c *Client) UpdateAWebhookEndpointWithBody(ctx context.Context, webhookEndpointId string, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CancelAnOrderWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*CancelAnOrderResponse, error)
- func (c *ClientWithResponses) CreateACheckoutSessionForATokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateACheckoutSessionResponse, error)
- func (c *ClientWithResponses) CreateACheckoutSessionForATokenWithResponse(ctx context.Context, body CreateACheckoutSessionForATokenJSONRequestBody, ...) (*CreateACheckoutSessionResponse, error)
- func (c *ClientWithResponses) CreateACheckoutSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateACheckoutSessionResponse, error)
- func (c *ClientWithResponses) CreateACheckoutSessionWithResponse(ctx context.Context, body CreateACheckoutSessionJSONRequestBody, ...) (*CreateACheckoutSessionResponse, error)
- func (c *ClientWithResponses) CreateACouponWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateACouponResponse, error)
- func (c *ClientWithResponses) CreateACouponWithResponse(ctx context.Context, body CreateACouponJSONRequestBody, ...) (*CreateACouponResponse, error)
- func (c *ClientWithResponses) CreateAPaymentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAPaymentResponse, error)
- func (c *ClientWithResponses) CreateAPaymentWithResponse(ctx context.Context, body CreateAPaymentJSONRequestBody, ...) (*CreateAPaymentResponse, error)
- func (c *ClientWithResponses) CreateAPromotionCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAPromotionCodeResponse, error)
- func (c *ClientWithResponses) CreateAPromotionCodeWithResponse(ctx context.Context, body CreateAPromotionCodeJSONRequestBody, ...) (*CreateAPromotionCodeResponse, error)
- func (c *ClientWithResponses) CreateARefundWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateARefundResponse, error)
- func (c *ClientWithResponses) CreateARefundWithResponse(ctx context.Context, body CreateARefundJSONRequestBody, ...) (*CreateARefundResponse, error)
- func (c *ClientWithResponses) CreateAWebhookEndpointWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAWebhookEndpointResponse, error)
- func (c *ClientWithResponses) CreateAWebhookEndpointWithResponse(ctx context.Context, body CreateAWebhookEndpointJSONRequestBody, ...) (*CreateAWebhookEndpointResponse, error)
- func (c *ClientWithResponses) CreateAnOrderUsingATokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateAnOrderUsingATokenResponse, error)
- func (c *ClientWithResponses) CreateAnOrderUsingATokenWithResponse(ctx context.Context, body CreateAnOrderUsingATokenJSONRequestBody, ...) (*CreateAnOrderUsingATokenResponse, error)
- func (c *ClientWithResponses) DeleteATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*DeleteATokenResponse, error)
- func (c *ClientWithResponses) DeleteAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*DeleteAWebhookEndpointResponse, error)
- func (c *ClientWithResponses) DisableATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*DisableATokenResponse, error)
- func (c *ClientWithResponses) EnableATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*EnableATokenResponse, error)
- func (c *ClientWithResponses) ListAllCheckoutSessionsWithResponse(ctx context.Context, params *ListAllCheckoutSessionsParams, ...) (*ListAllCheckoutSessionsResponse, error)
- func (c *ClientWithResponses) ListAllCouponsWithResponse(ctx context.Context, params *ListAllCouponsParams, ...) (*ListAllCouponsResponse, error)
- func (c *ClientWithResponses) ListAllOrdersWithResponse(ctx context.Context, params *ListAllOrdersParams, ...) (*ListAllOrdersResponse, error)
- func (c *ClientWithResponses) ListAllPaymentsWithResponse(ctx context.Context, params *ListAllPaymentsParams, ...) (*ListAllPaymentsResponse, error)
- func (c *ClientWithResponses) ListAllPromotionCodesWithResponse(ctx context.Context, params *ListAllPromotionCodesParams, ...) (*ListAllPromotionCodesResponse, error)
- func (c *ClientWithResponses) ListAllRefundsWithResponse(ctx context.Context, params *ListAllRefundsParams, ...) (*ListAllRefundsResponse, error)
- func (c *ClientWithResponses) ListAllTokensWithResponse(ctx context.Context, params *ListAllTokensParams, ...) (*ListAllTokensResponse, error)
- func (c *ClientWithResponses) ListAllWebhookEndpointsWithResponse(ctx context.Context, params *ListAllWebhookEndpointsParams, ...) (*ListAllWebhookEndpointsResponse, error)
- func (c *ClientWithResponses) RetrieveACheckoutSessionWithResponse(ctx context.Context, checkoutSessionId string, ...) (*RetrieveACheckoutSessionResponse, error)
- func (c *ClientWithResponses) RetrieveACouponWithResponse(ctx context.Context, couponId string, reqEditors ...RequestEditorFn) (*RetrieveACouponResponse, error)
- func (c *ClientWithResponses) RetrieveAPaymentWithResponse(ctx context.Context, paymentId string, params *RetrieveAPaymentParams, ...) (*RetrieveAPaymentResponse, error)
- func (c *ClientWithResponses) RetrieveAPromotionCodeWithResponse(ctx context.Context, promotionCodeId string, reqEditors ...RequestEditorFn) (*RetrieveAPromotionCodeResponse, error)
- func (c *ClientWithResponses) RetrieveARefundWithResponse(ctx context.Context, refundId string, params *RetrieveARefundParams, ...) (*RetrieveARefundResponse, error)
- func (c *ClientWithResponses) RetrieveATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*RetrieveATokenResponse, error)
- func (c *ClientWithResponses) RetrieveAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*RetrieveAWebhookEndpointResponse, error)
- func (c *ClientWithResponses) RetrieveAnOrderWithResponse(ctx context.Context, orderId string, params *RetrieveAnOrderParams, ...) (*RetrieveAnOrderResponse, error)
- func (c *ClientWithResponses) UpdateACouponWithBodyWithResponse(ctx context.Context, couponId string, contentType string, body io.Reader, ...) (*UpdateACouponResponse, error)
- func (c *ClientWithResponses) UpdateACouponWithResponse(ctx context.Context, couponId string, body UpdateACouponJSONRequestBody, ...) (*UpdateACouponResponse, error)
- func (c *ClientWithResponses) UpdateAPaymentWithBodyWithResponse(ctx context.Context, paymentId string, contentType string, body io.Reader, ...) (*UpdateAPaymentResponse, error)
- func (c *ClientWithResponses) UpdateAPaymentWithResponse(ctx context.Context, paymentId string, body UpdateAPaymentJSONRequestBody, ...) (*UpdateAPaymentResponse, error)
- func (c *ClientWithResponses) UpdateAPromotionCodeWithBodyWithResponse(ctx context.Context, promotionCodeId string, contentType string, ...) (*UpdateAPromotionCodeResponse, error)
- func (c *ClientWithResponses) UpdateAPromotionCodeWithResponse(ctx context.Context, promotionCodeId string, ...) (*UpdateAPromotionCodeResponse, error)
- func (c *ClientWithResponses) UpdateARefundWithBodyWithResponse(ctx context.Context, refundId string, contentType string, body io.Reader, ...) (*UpdateARefundResponse, error)
- func (c *ClientWithResponses) UpdateARefundWithResponse(ctx context.Context, refundId string, body UpdateARefundJSONRequestBody, ...) (*UpdateARefundResponse, error)
- func (c *ClientWithResponses) UpdateAWebhookEndpointWithBodyWithResponse(ctx context.Context, webhookEndpointId string, contentType string, ...) (*UpdateAWebhookEndpointResponse, error)
- func (c *ClientWithResponses) UpdateAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, ...) (*UpdateAWebhookEndpointResponse, error)
- type ClientWithResponsesInterface
- type CollectionObject
- type Coupon
- type CouponCreate
- type CouponId
- type CouponUpdate
- type Coupons
- type CreateACheckoutSessionForATokenJSONRequestBody
- type CreateACheckoutSessionJSONRequestBody
- type CreateACheckoutSessionResponse
- type CreateACouponJSONRequestBody
- type CreateACouponResponse
- type CreateAPaymentJSONRequestBody
- type CreateAPaymentResponse
- type CreateAPromotionCodeJSONRequestBody
- type CreateAPromotionCodeResponse
- type CreateARefundJSONBodyReason
- type CreateARefundJSONRequestBody
- type CreateARefundResponse
- type CreateAWebhookEndpointJSONRequestBody
- type CreateAWebhookEndpointResponse
- type CreateAnOrderUsingATokenJSONRequestBody
- type CreateAnOrderUsingATokenResponse
- type CreatedAt
- type Currency
- type CustomerInfo
- type CustomerInfoLegalGender
- type DeleteATokenResponse
- type DeleteAWebhookEndpointResponse
- type DisableATokenResponse
- type Discount
- type DiscountAmount
- type DiscountId
- type DiscountType
- type EnableATokenResponse
- type EventSubscription
- type Expand
- type ExpandableCheckoutSession
- type ExpandableCheckoutSessions
- type ExpandableOrder
- type ExpandableOrders
- type ExpandablePayments
- type ExpandableRefund
- type ExpandableRefunds
- type HttpRequestDoer
- type ImageUrl
- type Item
- type LineItemExpanded
- type LineItemId
- type LineItemKind
- type ListAllCheckoutSessionsParams
- type ListAllCheckoutSessionsParamsExpand
- type ListAllCheckoutSessionsResponse
- type ListAllCouponsParams
- type ListAllCouponsResponse
- type ListAllOrdersParams
- type ListAllOrdersParamsExpand
- type ListAllOrdersResponse
- type ListAllPaymentsParams
- type ListAllPaymentsParamsExpand
- type ListAllPaymentsResponse
- type ListAllPromotionCodesParams
- type ListAllPromotionCodesResponse
- type ListAllRefundsParams
- type ListAllRefundsParamsExpand
- type ListAllRefundsResponse
- type ListAllTokensParams
- type ListAllTokensResponse
- type ListAllWebhookEndpointsParams
- type ListAllWebhookEndpointsResponse
- type Locale
- type MaxResults
- type Metadata
- type MinimalPayment
- type MinimalRefund
- type Mode
- type N401
- type N404ErrorCode
- type N404StatusCode
- type N409ErrorCode
- type N409StatusCode
- type NextPageToken
- type Order
- type OrderAmount
- type OrderCreate
- type OrderExpanded
- type OrderId
- type OrderOptions
- type OrderStatus
- type PageToken
- type Payment
- type PaymentCreate
- type PaymentCreateCancelRemainder
- type PaymentExpanded
- type PaymentExpandedStatus
- type PaymentId
- type PaymentOptions
- type PaymentStatus
- type PaymentUpdate
- type PriceExpanded
- type PriceId
- type Product
- type ProductCategory
- type ProductId
- type ProductUrl
- type PromotionCode
- type PromotionCodeCreate
- type PromotionCodeId
- type PromotionCodeUpdate
- type PromotionCodes
- type Refund
- type RefundCreate
- type RefundExpanded
- type RefundExpandedReason
- type RefundExpandedStatus
- type RefundId
- type RefundOptions
- type RefundReason
- type RefundStatus
- type RefundUpdate
- type RequestEditorFn
- type Results
- type RetrieveACheckoutSessionParams
- type RetrieveACheckoutSessionParamsExpand
- type RetrieveACheckoutSessionResponse
- type RetrieveACouponResponse
- type RetrieveAPaymentParams
- type RetrieveAPaymentParamsExpand
- type RetrieveAPaymentResponse
- type RetrieveAPromotionCodeResponse
- type RetrieveARefundParams
- type RetrieveARefundParamsExpand
- type RetrieveARefundResponse
- type RetrieveATokenResponse
- type RetrieveAWebhookEndpointResponse
- type RetrieveAnOrderParams
- type RetrieveAnOrderParamsExpand
- type RetrieveAnOrderResponse
- type ShippingInfo
- type SuccessUrl
- type TestFlag
- type Token
- type TokenId
- type TokenStatus
- type UpdateACouponJSONRequestBody
- type UpdateACouponResponse
- type UpdateAPaymentJSONRequestBody
- type UpdateAPaymentResponse
- type UpdateAPromotionCodeJSONRequestBody
- type UpdateAPromotionCodeResponse
- type UpdateARefundJSONRequestBody
- type UpdateARefundResponse
- type UpdateAWebhookEndpointJSONRequestBody
- type UpdateAWebhookEndpointResponse
- type UpdatedAt
- type WebhookEndpoint
- type WebhookEndpointCreate
- type WebhookEndpointId
- type WebhookEndpointNotFound
- type WebhookEndpointUpdate
- type WebhookEndpoints
Constants ¶
const ( DEFAULT_RETRY_WAIT_MIN = 1 * time.Second DEFAULT_RETRY_WAIT_MAX = 5 * time.Second DEFAULT_RETRY_MAX = 3 )
const (
ApiEndpoint = "https://api.smartpay.co"
)
const Version = "v0.3.0"
Version is the current smartpay sdk-go version.
Variables ¶
This section is empty.
Functions ¶
func CalculateSignature ¶ added in v0.0.3
func CalculateWebhookSignatureMiddleware ¶ added in v0.0.3
CalculateWebhookSignatureMiddleware return a middleware that adds Calculated-Signature to request header
func ConvertToStruct ¶
func NewCancelAnOrderRequest ¶
NewCancelAnOrderRequest generates requests for CancelAnOrder
func NewCreateACheckoutSessionForATokenRequest ¶ added in v0.2.0
func NewCreateACheckoutSessionForATokenRequest(server string, body CreateACheckoutSessionForATokenJSONRequestBody) (*http.Request, error)
NewCreateACheckoutSessionForATokenRequest calls the generic CreateACheckoutSession builder with application/json body
func NewCreateACheckoutSessionRequest ¶
func NewCreateACheckoutSessionRequest(server string, body CreateACheckoutSessionJSONRequestBody) (*http.Request, error)
NewCreateACheckoutSessionRequest calls the generic CreateACheckoutSession builder with application/json body
func NewCreateACheckoutSessionRequestWithBody ¶
func NewCreateACheckoutSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateACheckoutSessionRequestWithBody generates requests for CreateACheckoutSession with any type of body
func NewCreateACouponRequest ¶
func NewCreateACouponRequest(server string, body CreateACouponJSONRequestBody) (*http.Request, error)
NewCreateACouponRequest calls the generic CreateACoupon builder with application/json body
func NewCreateACouponRequestWithBody ¶
func NewCreateACouponRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateACouponRequestWithBody generates requests for CreateACoupon with any type of body
func NewCreateAPaymentRequest ¶
func NewCreateAPaymentRequest(server string, body CreateAPaymentJSONRequestBody) (*http.Request, error)
NewCreateAPaymentRequest calls the generic CreateAPayment builder with application/json body
func NewCreateAPaymentRequestWithBody ¶
func NewCreateAPaymentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAPaymentRequestWithBody generates requests for CreateAPayment with any type of body
func NewCreateAPromotionCodeRequest ¶
func NewCreateAPromotionCodeRequest(server string, body CreateAPromotionCodeJSONRequestBody) (*http.Request, error)
NewCreateAPromotionCodeRequest calls the generic CreateAPromotionCode builder with application/json body
func NewCreateAPromotionCodeRequestWithBody ¶
func NewCreateAPromotionCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAPromotionCodeRequestWithBody generates requests for CreateAPromotionCode with any type of body
func NewCreateARefundRequest ¶
func NewCreateARefundRequest(server string, body CreateARefundJSONRequestBody) (*http.Request, error)
NewCreateARefundRequest calls the generic CreateARefund builder with application/json body
func NewCreateARefundRequestWithBody ¶
func NewCreateARefundRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateARefundRequestWithBody generates requests for CreateARefund with any type of body
func NewCreateAWebhookEndpointRequest ¶ added in v0.0.2
func NewCreateAWebhookEndpointRequest(server string, body CreateAWebhookEndpointJSONRequestBody) (*http.Request, error)
NewCreateAWebhookEndpointRequest calls the generic CreateAWebhookEndpoint builder with application/json body
func NewCreateAWebhookEndpointRequestWithBody ¶ added in v0.0.2
func NewCreateAWebhookEndpointRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAWebhookEndpointRequestWithBody generates requests for CreateAWebhookEndpoint with any type of body
func NewCreateAnOrderUsingATokenRequest ¶ added in v0.2.0
func NewCreateAnOrderUsingATokenRequest(server string, body CreateAnOrderUsingATokenJSONRequestBody) (*http.Request, error)
NewCreateAnOrderUsingATokenRequest calls the generic CreateAnOrderUsingAToken builder with application/json body
func NewCreateAnOrderUsingATokenRequestWithBody ¶ added in v0.2.0
func NewCreateAnOrderUsingATokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateAnOrderUsingATokenRequestWithBody generates requests for CreateAnOrderUsingAToken with any type of body
func NewDeleteATokenRequest ¶ added in v0.2.0
NewDeleteATokenRequest generates requests for DeleteAToken
func NewDeleteAWebhookEndpointRequest ¶ added in v0.0.3
func NewDeleteAWebhookEndpointRequest(server string, webhookEndpointId string) (*http.Request, error)
NewDeleteAWebhookEndpointRequest generates requests for DeleteAWebhookEndpoint
func NewDisableATokenRequest ¶ added in v0.2.0
NewDisableATokenRequest generates requests for DisableAToken
func NewEnableATokenRequest ¶ added in v0.2.0
NewEnableATokenRequest generates requests for EnableAToken
func NewListAllCheckoutSessionsRequest ¶
func NewListAllCheckoutSessionsRequest(server string, params *ListAllCheckoutSessionsParams) (*http.Request, error)
NewListAllCheckoutSessionsRequest generates requests for ListAllCheckoutSessions
func NewListAllCouponsRequest ¶
func NewListAllCouponsRequest(server string, params *ListAllCouponsParams) (*http.Request, error)
NewListAllCouponsRequest generates requests for ListAllCoupons
func NewListAllOrdersRequest ¶
func NewListAllOrdersRequest(server string, params *ListAllOrdersParams) (*http.Request, error)
NewListAllOrdersRequest generates requests for ListAllOrders
func NewListAllPaymentsRequest ¶
func NewListAllPaymentsRequest(server string, params *ListAllPaymentsParams) (*http.Request, error)
NewListAllPaymentsRequest generates requests for ListAllPayments
func NewListAllPromotionCodesRequest ¶
func NewListAllPromotionCodesRequest(server string, params *ListAllPromotionCodesParams) (*http.Request, error)
NewListAllPromotionCodesRequest generates requests for ListAllPromotionCodes
func NewListAllRefundsRequest ¶
func NewListAllRefundsRequest(server string, params *ListAllRefundsParams) (*http.Request, error)
NewListAllRefundsRequest generates requests for ListAllRefunds
func NewListAllTokensRequest ¶ added in v0.2.0
func NewListAllTokensRequest(server string, params *ListAllTokensParams) (*http.Request, error)
NewListAllTokensRequest generates requests for ListAllTokens
func NewListAllWebhookEndpointsRequest ¶ added in v0.0.2
func NewListAllWebhookEndpointsRequest(server string, params *ListAllWebhookEndpointsParams) (*http.Request, error)
NewListAllWebhookEndpointsRequest generates requests for ListAllWebhookEndpoints
func NewRetrieveACheckoutSessionRequest ¶
func NewRetrieveACheckoutSessionRequest(server string, checkoutSessionId string, params *RetrieveACheckoutSessionParams) (*http.Request, error)
NewRetrieveACheckoutSessionRequest generates requests for RetrieveACheckoutSession
func NewRetrieveACouponRequest ¶
NewRetrieveACouponRequest generates requests for RetrieveACoupon
func NewRetrieveAPaymentRequest ¶
func NewRetrieveAPaymentRequest(server string, paymentId string, params *RetrieveAPaymentParams) (*http.Request, error)
NewRetrieveAPaymentRequest generates requests for RetrieveAnOrder
func NewRetrieveAPromotionCodeRequest ¶
NewRetrieveAPromotionCodeRequest generates requests for RetrieveAPromotionCode
func NewRetrieveARefundRequest ¶
func NewRetrieveARefundRequest(server string, refundId string, params *RetrieveARefundParams) (*http.Request, error)
NewRetrieveARefundRequest generates requests for RetrieveARefund
func NewRetrieveATokenRequest ¶ added in v0.2.0
NewRetrieveATokenRequest generates requests for RetrieveAToken
func NewRetrieveAWebhookEndpointRequest ¶ added in v0.0.2
func NewRetrieveAWebhookEndpointRequest(server string, webhookEndpointId string) (*http.Request, error)
NewRetrieveAWebhookEndpointRequest generates requests for RetrieveAWebhookEndpoint
func NewRetrieveAnOrderRequest ¶
func NewRetrieveAnOrderRequest(server string, orderId string, params *RetrieveAnOrderParams) (*http.Request, error)
NewRetrieveAnOrderRequest generates requests for RetrieveAnOrder
func NewUpdateACouponRequest ¶
func NewUpdateACouponRequest(server string, couponId string, body UpdateACouponJSONRequestBody) (*http.Request, error)
NewUpdateACouponRequest calls the generic UpdateACoupon builder with application/json body
func NewUpdateACouponRequestWithBody ¶
func NewUpdateACouponRequestWithBody(server string, couponId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateACouponRequestWithBody generates requests for UpdateACoupon with any type of body
func NewUpdateAPaymentRequest ¶
func NewUpdateAPaymentRequest(server string, paymentId string, body UpdateAPaymentJSONRequestBody) (*http.Request, error)
NewUpdateAPaymentRequest calls the generic UpdateAPayment builder with application/json body
func NewUpdateAPaymentRequestWithBody ¶
func NewUpdateAPaymentRequestWithBody(server string, paymentId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAPaymentRequestWithBody generates requests for UpdateAPayment with any type of body
func NewUpdateAPromotionCodeRequest ¶
func NewUpdateAPromotionCodeRequest(server string, promotionCodeId string, body UpdateAPromotionCodeJSONRequestBody) (*http.Request, error)
NewUpdateAPromotionCodeRequest calls the generic UpdateAPromotionCode builder with application/json body
func NewUpdateAPromotionCodeRequestWithBody ¶
func NewUpdateAPromotionCodeRequestWithBody(server string, promotionCodeId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAPromotionCodeRequestWithBody generates requests for UpdateAPromotionCode with any type of body
func NewUpdateARefundRequest ¶
func NewUpdateARefundRequest(server string, refundId string, body UpdateARefundJSONRequestBody) (*http.Request, error)
NewUpdateARefundRequest calls the generic UpdateARefund builder with application/json body
func NewUpdateARefundRequestWithBody ¶
func NewUpdateARefundRequestWithBody(server string, refundId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateARefundRequestWithBody generates requests for UpdateARefund with any type of body
func NewUpdateAWebhookEndpointRequest ¶ added in v0.0.2
func NewUpdateAWebhookEndpointRequest(server string, webhookEndpointId string, body UpdateAWebhookEndpointJSONRequestBody) (*http.Request, error)
NewUpdateAWebhookEndpointRequest calls the generic UpdateAWebhookEndpoint builder with application/json body
func NewUpdateAWebhookEndpointRequestWithBody ¶ added in v0.0.2
func NewUpdateAWebhookEndpointRequestWithBody(server string, webhookEndpointId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAWebhookEndpointRequestWithBody generates requests for UpdateAWebhookEndpoint with any type of body
Types ¶
type Address ¶
type Address struct { // The province, state, prefecture, county, etc. of a location. In Japan it refers to the prefecture (e.g. 東京都). AdministrativeArea *string `json:"administrativeArea,omitempty"` // The country as represented by the two-letter ISO 3166-1 code. Country AddressCountry `json:"country"` // Street address. Line1 string `json:"line1"` // Building name and room number. Line2 *string `json:"line2,omitempty"` Line3 *string `json:"line3,omitempty"` Line4 *string `json:"line4,omitempty"` Line5 *string `json:"line5,omitempty"` // The city or town of a location, with a maximum of 80 characters (e.g. 目黒区). Locality string `json:"locality"` // The Postal Code. PostalCode string `json:"postalCode"` SubLocality *string `json:"subLocality,omitempty"` }
Address
type AddressCountry ¶
type AddressCountry string
The country as represented by the two-letter ISO 3166-1 code.
const (
AddressCountryJP AddressCountry = "JP"
)
Defines values for AddressCountry.
type AddressType ¶
type AddressType string
Address Type
const ( AddressTypeGift AddressType = "gift" AddressTypeHome AddressType = "home" AddressTypeLocker AddressType = "locker" AddressTypeOffice AddressType = "office" AddressTypeStore AddressType = "store" )
Defines values for AddressType.
type CancelAnOrderResponse ¶
type CancelAnOrderResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Order JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } JSON409 *struct { Details []interface{} `json:"details"` ErrorCode N409ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N409StatusCode `json:"statusCode"` } }
func ParseCancelAnOrderResponse ¶
func ParseCancelAnOrderResponse(rsp *http.Response) (*CancelAnOrderResponse, error)
ParseCancelAnOrderResponse parses an HTTP response from a CancelAnOrderWithResponse call
func (CancelAnOrderResponse) Status ¶
func (r CancelAnOrderResponse) Status() string
Status returns HTTPResponse.Status
func (CancelAnOrderResponse) StatusCode ¶
func (r CancelAnOrderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CancelUrl ¶
type CancelUrl string
The URL the customer will be redirected to if the Checkout Session hasn't completed successfully. This means the Checkout failed, or the customer decided to cancel it.
type CaptureMethod ¶
type CaptureMethod string
CaptureMethod defines model for captureMethod.
const ( CaptureMethodAutomatic CaptureMethod = "automatic" CaptureMethodManual CaptureMethod = "manual" )
Defines values for CaptureMethod.
type CheckoutSessioUrl ¶
type CheckoutSessioUrl string
The URL to launch Smartpay checkout for this checkout session. Redirect your customer to this URL to complete the purchase.
func (*CheckoutSessioUrl) WithPromotionCode ¶
func (checkoutSessionUrl *CheckoutSessioUrl) WithPromotionCode(promotionCode string) (checkoutSessionUrlWithPromotionCode string, err error)
type CheckoutSession ¶
type CheckoutSession struct { // The URL the customer will be redirected to if the Checkout Session hasn't completed successfully. This means the Checkout failed, or the customer decided to cancel it. CancelUrl *CancelUrl `json:"cancelUrl,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have. CustomerInfo *CustomerInfo `json:"customerInfo,omitempty"` // The unique identifier for the Checkout Session object. Id *CheckoutSessionId `json:"id,omitempty"` // Locale Locale *Locale `json:"locale,omitempty"` // A string representing the object’s type. The value is always `checkoutSession` for Checkout Session objects. Object *string `json:"object,omitempty"` // The unique identifier for the Payment object. Order *OrderId `json:"order,omitempty"` // The unique identifier for the Token object. Token *TokenId `json:"token,omitempty"` // The URL the customer will be redirected to if the Checkout Session completed successfully. This means the Checkout succeeded, i.e. the customer authorized the order. SuccessUrl *SuccessUrl `json:"successUrl,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` // The URL to launch Smartpay checkout for this checkout session. Redirect your customer to this URL to complete the purchase. Url *CheckoutSessioUrl `json:"url,omitempty"` }
Checkout Session
type CheckoutSessionCreate ¶
type CheckoutSessionCreate struct { // The amount intended to be collected through this order. A positive integer in the smallest currency unit. Amount OrderAmount `json:"amount"` // The URL the customer will be redirected to if the Checkout Session hasn't completed successfully. This means the Checkout failed, or the customer decided to cancel it. CancelUrl CancelUrl `json:"cancelUrl"` CaptureMethod *CaptureMethod `json:"captureMethod,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency Currency `json:"currency"` // Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have. CustomerInfo CustomerInfo `json:"customerInfo"` // An arbitrary - ideally descriptive - long form explanation of the Order, meant to be displayed to the customer. Description *string `json:"description,omitempty"` // The line items the customer wishes to order. Items []Item `json:"items"` // Locale Locale *Locale `json:"locale,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A - ideally unique - string to reference the Order in your system (e.g. an order ID, etc.). Reference *string `json:"reference,omitempty"` // Shipping Information ShippingInfo ShippingInfo `json:"shippingInfo"` // The URL the customer will be redirected to if the Checkout Session completed successfully. This means the Checkout succeeded, i.e. the customer authorized the order. SuccessUrl SuccessUrl `json:"successUrl"` }
CheckoutSessionCreate defines model for checkout-session_create.
type CheckoutSessionExpanded ¶
type CheckoutSessionExpanded struct { // The URL the customer will be redirected to if the Checkout Session hasn't completed successfully. This means the Checkout failed, or the customer decided to cancel it. CancelUrl *CancelUrl `json:"cancelUrl,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have. CustomerInfo *CustomerInfo `json:"customerInfo,omitempty"` // The unique identifier for the Checkout Session object. Id *CheckoutSessionId `json:"id,omitempty"` // Locale Locale *Locale `json:"locale,omitempty"` // A string representing the object’s type. The value is always `checkoutSession` for Checkout Session objects. Object *string `json:"object,omitempty"` // Expanded Order Order *OrderExpanded `json:"order,omitempty"` // A Payment token Token *Token `json:"token,omitempty"` // The URL the customer will be redirected to if the Checkout Session completed successfully. This means the Checkout succeeded, i.e. the customer authorized the order. SuccessUrl *SuccessUrl `json:"successUrl,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` // The URL to launch Smartpay checkout for this checkout session. Redirect your customer to this URL to complete the purchase. Url *CheckoutSessioUrl `json:"url,omitempty"` }
Expanded Checkout Session
type CheckoutSessionForATokenCreate ¶ added in v0.2.0
type CheckoutSessionForATokenCreate struct { Mode Mode `json:"mode"` // The URL the customer will be redirected to if the Checkout Session hasn't completed successfully. This means the Checkout failed, or the customer decided to cancel it. CancelUrl CancelUrl `json:"cancelUrl"` // Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have. CustomerInfo CustomerInfo `json:"customerInfo"` // Locale Locale *Locale `json:"locale,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A - ideally unique - string to reference the Order in your system (e.g. an order ID, etc.). Reference *string `json:"reference,omitempty"` // The URL the customer will be redirected to if the Checkout Session completed successfully. This means the Checkout succeeded, i.e. the customer authorized the order. SuccessUrl SuccessUrl `json:"successUrl"` }
CheckoutSessionForATokenCreate defines model for checkout-session_create.
type CheckoutSessionId ¶
type CheckoutSessionId string
The unique identifier for the Checkout Session object.
type CheckoutSessionOptions ¶
type CheckoutSessionOptions interface{}
CheckoutSessionOptions defines model for checkoutSessionOptions.
type Client ¶
type Client struct { // SmartPay API endpoint Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn // contains filtered or unexported fields }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(secretKey string, publicKey string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CancelAnOrder ¶
func (*Client) CreateACheckoutSession ¶
func (c *Client) CreateACheckoutSession(ctx context.Context, body CreateACheckoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateACheckoutSessionForAToken ¶ added in v0.2.0
func (c *Client) CreateACheckoutSessionForAToken(ctx context.Context, body CreateACheckoutSessionForATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateACheckoutSessionWithBody ¶
func (*Client) CreateACoupon ¶
func (c *Client) CreateACoupon(ctx context.Context, body CreateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateACouponWithBody ¶
func (*Client) CreateAPayment ¶
func (c *Client) CreateAPayment(ctx context.Context, body CreateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAPaymentWithBody ¶
func (*Client) CreateAPromotionCode ¶
func (c *Client) CreateAPromotionCode(ctx context.Context, body CreateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAPromotionCodeWithBody ¶
func (*Client) CreateARefund ¶
func (c *Client) CreateARefund(ctx context.Context, body CreateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateARefundWithBody ¶
func (*Client) CreateAWebhookEndpoint ¶ added in v0.0.2
func (c *Client) CreateAWebhookEndpoint(ctx context.Context, body CreateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAWebhookEndpointWithBody ¶ added in v0.0.2
func (*Client) CreateAnOrderUsingAToken ¶ added in v0.2.0
func (c *Client) CreateAnOrderUsingAToken(ctx context.Context, body CreateAnOrderUsingATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAnOrderUsingATokenWithBody ¶ added in v0.2.0
func (*Client) DeleteAToken ¶ added in v0.2.0
func (*Client) DeleteAWebhookEndpoint ¶ added in v0.0.3
func (*Client) DisableAToken ¶ added in v0.2.0
func (*Client) EnableAToken ¶ added in v0.2.0
func (*Client) ListAllCheckoutSessions ¶
func (c *Client) ListAllCheckoutSessions(ctx context.Context, params *ListAllCheckoutSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllCoupons ¶
func (c *Client) ListAllCoupons(ctx context.Context, params *ListAllCouponsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllOrders ¶
func (c *Client) ListAllOrders(ctx context.Context, params *ListAllOrdersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllPayments ¶
func (c *Client) ListAllPayments(ctx context.Context, params *ListAllPaymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllPromotionCodes ¶
func (c *Client) ListAllPromotionCodes(ctx context.Context, params *ListAllPromotionCodesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllRefunds ¶
func (c *Client) ListAllRefunds(ctx context.Context, params *ListAllRefundsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllTokens ¶ added in v0.2.0
func (c *Client) ListAllTokens(ctx context.Context, params *ListAllTokensParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAllWebhookEndpoints ¶ added in v0.0.2
func (c *Client) ListAllWebhookEndpoints(ctx context.Context, params *ListAllWebhookEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RetrieveACheckoutSession ¶
func (c *Client) RetrieveACheckoutSession(ctx context.Context, checkoutSessionId string, params *RetrieveACheckoutSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RetrieveACoupon ¶
func (*Client) RetrieveAPayment ¶
func (c *Client) RetrieveAPayment(ctx context.Context, paymentId string, params *RetrieveAPaymentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RetrieveAPromotionCode ¶
func (*Client) RetrieveARefund ¶
func (c *Client) RetrieveARefund(ctx context.Context, refundId string, params *RetrieveARefundParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RetrieveAToken ¶ added in v0.2.0
func (*Client) RetrieveAWebhookEndpoint ¶ added in v0.0.2
func (*Client) RetrieveAnOrder ¶
func (c *Client) RetrieveAnOrder(ctx context.Context, orderId string, params *RetrieveAnOrderParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateACoupon ¶
func (c *Client) UpdateACoupon(ctx context.Context, couponId string, body UpdateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateACouponWithBody ¶
func (*Client) UpdateAPayment ¶
func (c *Client) UpdateAPayment(ctx context.Context, paymentId string, body UpdateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateAPaymentWithBody ¶
func (*Client) UpdateAPromotionCode ¶
func (c *Client) UpdateAPromotionCode(ctx context.Context, promotionCodeId string, body UpdateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateAPromotionCodeWithBody ¶
func (*Client) UpdateARefund ¶
func (c *Client) UpdateARefund(ctx context.Context, refundId string, body UpdateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateARefundWithBody ¶
func (*Client) UpdateAWebhookEndpoint ¶ added in v0.0.2
func (c *Client) UpdateAWebhookEndpoint(ctx context.Context, webhookEndpointId string, body UpdateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // CheckoutSession ListAllCheckoutSessions(ctx context.Context, params *ListAllCheckoutSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateACheckoutSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateACheckoutSession(ctx context.Context, body CreateACheckoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) CreateACheckoutSessionForAToken(ctx context.Context, body CreateACheckoutSessionForATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveACheckoutSession(ctx context.Context, checkoutSessionId string, params *RetrieveACheckoutSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error) // Coupon ListAllCoupons(ctx context.Context, params *ListAllCouponsParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateACouponWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateACoupon(ctx context.Context, body CreateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveACoupon(ctx context.Context, couponId string, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateACouponWithBody(ctx context.Context, couponId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateACoupon(ctx context.Context, couponId string, body UpdateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Order ListAllOrders(ctx context.Context, params *ListAllOrdersParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAnOrderUsingATokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAnOrderUsingAToken(ctx context.Context, body CreateAnOrderUsingATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveAnOrder(ctx context.Context, orderId string, params *RetrieveAnOrderParams, reqEditors ...RequestEditorFn) (*http.Response, error) CancelAnOrder(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*http.Response, error) // Payment UpdateAPaymentWithBody(ctx context.Context, paymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateAPayment(ctx context.Context, paymentId string, body UpdateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) ListAllPayments(ctx context.Context, params *ListAllPaymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveAPayment(ctx context.Context, paymentId string, params *RetrieveAPaymentParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAPaymentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAPayment(ctx context.Context, body CreateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // PromotionCode ListAllPromotionCodes(ctx context.Context, params *ListAllPromotionCodesParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAPromotionCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAPromotionCode(ctx context.Context, body CreateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveAPromotionCode(ctx context.Context, promotionCodeId string, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateAPromotionCodeWithBody(ctx context.Context, promotionCodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateAPromotionCode(ctx context.Context, promotionCodeId string, body UpdateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Refund ListAllRefunds(ctx context.Context, params *ListAllRefundsParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateARefundWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateARefund(ctx context.Context, body CreateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveARefund(ctx context.Context, refundId string, params *RetrieveARefundParams, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateARefundWithBody(ctx context.Context, refundId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateARefund(ctx context.Context, refundId string, body UpdateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // WebhookEndpoint ListAllWebhookEndpoints(ctx context.Context, params *ListAllWebhookEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAWebhookEndpointWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateAWebhookEndpoint(ctx context.Context, body CreateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveAWebhookEndpoint(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateAWebhookEndpointWithBody(ctx context.Context, webhookEndpointId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateAWebhookEndpoint(ctx context.Context, webhookEndpointId string, body UpdateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) DeleteAWebhookEndpoint(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*http.Response, error) // Token ListAllTokens(ctx context.Context, params *ListAllTokensParams, reqEditors ...RequestEditorFn) (*http.Response, error) RetrieveAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) EnableAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) DisableAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) DeleteAToken(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithRetryOptions ¶ added in v0.3.0
func WithRetryOptions(retryMax int, retryWaitMin time.Duration, retryWaitMax time.Duration) ClientOption
WithRetryOptions allows setting up retry policies for the default http client. If WithHTTPClient is invoked, this function changes nothing.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(secretKey string, publicKey string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CancelAnOrderWithResponse ¶
func (c *ClientWithResponses) CancelAnOrderWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*CancelAnOrderResponse, error)
CancelAnOrderWithResponse request returning *CancelAnOrderResponse
func (*ClientWithResponses) CreateACheckoutSessionForATokenWithBodyWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateACheckoutSessionForATokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error)
CreateACheckoutSessionForATokenWithBodyWithResponse request with arbitrary body returning *CreateACheckoutSessionResponse
func (*ClientWithResponses) CreateACheckoutSessionForATokenWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateACheckoutSessionForATokenWithResponse(ctx context.Context, body CreateACheckoutSessionForATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error)
func (*ClientWithResponses) CreateACheckoutSessionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateACheckoutSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error)
CreateACheckoutSessionWithBodyWithResponse request with arbitrary body returning *CreateACheckoutSessionResponse
func (*ClientWithResponses) CreateACheckoutSessionWithResponse ¶
func (c *ClientWithResponses) CreateACheckoutSessionWithResponse(ctx context.Context, body CreateACheckoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error)
func (*ClientWithResponses) CreateACouponWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateACouponWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateACouponResponse, error)
CreateACouponWithBodyWithResponse request with arbitrary body returning *CreateACouponResponse
func (*ClientWithResponses) CreateACouponWithResponse ¶
func (c *ClientWithResponses) CreateACouponWithResponse(ctx context.Context, body CreateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateACouponResponse, error)
func (*ClientWithResponses) CreateAPaymentWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAPaymentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAPaymentResponse, error)
CreateAPaymentWithBodyWithResponse request with arbitrary body returning *CreateAPaymentResponse
func (*ClientWithResponses) CreateAPaymentWithResponse ¶
func (c *ClientWithResponses) CreateAPaymentWithResponse(ctx context.Context, body CreateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAPaymentResponse, error)
func (*ClientWithResponses) CreateAPromotionCodeWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAPromotionCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAPromotionCodeResponse, error)
CreateAPromotionCodeWithBodyWithResponse request with arbitrary body returning *CreateAPromotionCodeResponse
func (*ClientWithResponses) CreateAPromotionCodeWithResponse ¶
func (c *ClientWithResponses) CreateAPromotionCodeWithResponse(ctx context.Context, body CreateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAPromotionCodeResponse, error)
func (*ClientWithResponses) CreateARefundWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateARefundWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateARefundResponse, error)
CreateARefundWithBodyWithResponse request with arbitrary body returning *CreateARefundResponse
func (*ClientWithResponses) CreateARefundWithResponse ¶
func (c *ClientWithResponses) CreateARefundWithResponse(ctx context.Context, body CreateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateARefundResponse, error)
func (*ClientWithResponses) CreateAWebhookEndpointWithBodyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) CreateAWebhookEndpointWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAWebhookEndpointResponse, error)
CreateAWebhookEndpointWithBodyWithResponse request with arbitrary body returning *CreateAWebhookEndpointResponse
func (*ClientWithResponses) CreateAWebhookEndpointWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) CreateAWebhookEndpointWithResponse(ctx context.Context, body CreateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAWebhookEndpointResponse, error)
func (*ClientWithResponses) CreateAnOrderUsingATokenWithBodyWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateAnOrderUsingATokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAnOrderUsingATokenResponse, error)
CreateAnOrderUsingATokenWithBodyWithResponse request with arbitrary body returning *CreateAnOrderUsingATokenResponse
func (*ClientWithResponses) CreateAnOrderUsingATokenWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateAnOrderUsingATokenWithResponse(ctx context.Context, body CreateAnOrderUsingATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAnOrderUsingATokenResponse, error)
func (*ClientWithResponses) DeleteATokenWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) DeleteATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*DeleteATokenResponse, error)
DeleteATokenWithResponse request returning *DeleteATokenResponse
func (*ClientWithResponses) DeleteAWebhookEndpointWithResponse ¶ added in v0.0.3
func (c *ClientWithResponses) DeleteAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*DeleteAWebhookEndpointResponse, error)
DeleteAWebhookEndpointWithResponse request returning *DeleteAWebhookEndpointResponse
func (*ClientWithResponses) DisableATokenWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) DisableATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*DisableATokenResponse, error)
DisableATokenWithResponse request returning *DisableATokenResponse
func (*ClientWithResponses) EnableATokenWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) EnableATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*EnableATokenResponse, error)
EnableATokenWithResponse request returning *EnableATokenResponse
func (*ClientWithResponses) ListAllCheckoutSessionsWithResponse ¶
func (c *ClientWithResponses) ListAllCheckoutSessionsWithResponse(ctx context.Context, params *ListAllCheckoutSessionsParams, reqEditors ...RequestEditorFn) (*ListAllCheckoutSessionsResponse, error)
ListAllCheckoutSessionsWithResponse request returning *ListAllCheckoutSessionsResponse
func (*ClientWithResponses) ListAllCouponsWithResponse ¶
func (c *ClientWithResponses) ListAllCouponsWithResponse(ctx context.Context, params *ListAllCouponsParams, reqEditors ...RequestEditorFn) (*ListAllCouponsResponse, error)
ListAllCouponsWithResponse request returning *ListAllCouponsResponse
func (*ClientWithResponses) ListAllOrdersWithResponse ¶
func (c *ClientWithResponses) ListAllOrdersWithResponse(ctx context.Context, params *ListAllOrdersParams, reqEditors ...RequestEditorFn) (*ListAllOrdersResponse, error)
ListAllOrdersWithResponse request returning *ListAllOrdersResponse
func (*ClientWithResponses) ListAllPaymentsWithResponse ¶
func (c *ClientWithResponses) ListAllPaymentsWithResponse(ctx context.Context, params *ListAllPaymentsParams, reqEditors ...RequestEditorFn) (*ListAllPaymentsResponse, error)
ListAllPaymentsWithResponse request returning *ListAllPaymentsResponse
func (*ClientWithResponses) ListAllPromotionCodesWithResponse ¶
func (c *ClientWithResponses) ListAllPromotionCodesWithResponse(ctx context.Context, params *ListAllPromotionCodesParams, reqEditors ...RequestEditorFn) (*ListAllPromotionCodesResponse, error)
ListAllPromotionCodesWithResponse request returning *ListAllPromotionCodesResponse
func (*ClientWithResponses) ListAllRefundsWithResponse ¶
func (c *ClientWithResponses) ListAllRefundsWithResponse(ctx context.Context, params *ListAllRefundsParams, reqEditors ...RequestEditorFn) (*ListAllRefundsResponse, error)
ListAllRefundsWithResponse request returning *ListAllRefundsResponse
func (*ClientWithResponses) ListAllTokensWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) ListAllTokensWithResponse(ctx context.Context, params *ListAllTokensParams, reqEditors ...RequestEditorFn) (*ListAllTokensResponse, error)
ListAllTokensWithResponse request returning *ListAllTokensResponse
func (*ClientWithResponses) ListAllWebhookEndpointsWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) ListAllWebhookEndpointsWithResponse(ctx context.Context, params *ListAllWebhookEndpointsParams, reqEditors ...RequestEditorFn) (*ListAllWebhookEndpointsResponse, error)
ListAllWebhookEndpointsWithResponse request returning *ListAllWebhookEndpointsResponse
func (*ClientWithResponses) RetrieveACheckoutSessionWithResponse ¶
func (c *ClientWithResponses) RetrieveACheckoutSessionWithResponse(ctx context.Context, checkoutSessionId string, params *RetrieveACheckoutSessionParams, reqEditors ...RequestEditorFn) (*RetrieveACheckoutSessionResponse, error)
RetrieveACheckoutSessionWithResponse request returning *RetrieveACheckoutSessionResponse
func (*ClientWithResponses) RetrieveACouponWithResponse ¶
func (c *ClientWithResponses) RetrieveACouponWithResponse(ctx context.Context, couponId string, reqEditors ...RequestEditorFn) (*RetrieveACouponResponse, error)
RetrieveACouponWithResponse request returning *RetrieveACouponResponse
func (*ClientWithResponses) RetrieveAPaymentWithResponse ¶
func (c *ClientWithResponses) RetrieveAPaymentWithResponse(ctx context.Context, paymentId string, params *RetrieveAPaymentParams, reqEditors ...RequestEditorFn) (*RetrieveAPaymentResponse, error)
RetrieveAPaymentWithResponse request returning *RetrieveAPaymentResponse
func (*ClientWithResponses) RetrieveAPromotionCodeWithResponse ¶
func (c *ClientWithResponses) RetrieveAPromotionCodeWithResponse(ctx context.Context, promotionCodeId string, reqEditors ...RequestEditorFn) (*RetrieveAPromotionCodeResponse, error)
RetrieveAPromotionCodeWithResponse request returning *RetrieveAPromotionCodeResponse
func (*ClientWithResponses) RetrieveARefundWithResponse ¶
func (c *ClientWithResponses) RetrieveARefundWithResponse(ctx context.Context, refundId string, params *RetrieveARefundParams, reqEditors ...RequestEditorFn) (*RetrieveARefundResponse, error)
RetrieveARefundWithResponse request returning *RetrieveARefundResponse
func (*ClientWithResponses) RetrieveATokenWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) RetrieveATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*RetrieveATokenResponse, error)
RetrieveATokenWithResponse request returning *RetrieveATokenResponse
func (*ClientWithResponses) RetrieveAWebhookEndpointWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) RetrieveAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*RetrieveAWebhookEndpointResponse, error)
RetrieveAWebhookEndpointWithResponse request returning *RetrieveAWebhookEndpointResponse
func (*ClientWithResponses) RetrieveAnOrderWithResponse ¶
func (c *ClientWithResponses) RetrieveAnOrderWithResponse(ctx context.Context, orderId string, params *RetrieveAnOrderParams, reqEditors ...RequestEditorFn) (*RetrieveAnOrderResponse, error)
RetrieveAnOrderWithResponse request returning *RetrieveAnOrderResponse
func (*ClientWithResponses) UpdateACouponWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateACouponWithBodyWithResponse(ctx context.Context, couponId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateACouponResponse, error)
UpdateACouponWithBodyWithResponse request with arbitrary body returning *UpdateACouponResponse
func (*ClientWithResponses) UpdateACouponWithResponse ¶
func (c *ClientWithResponses) UpdateACouponWithResponse(ctx context.Context, couponId string, body UpdateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateACouponResponse, error)
func (*ClientWithResponses) UpdateAPaymentWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateAPaymentWithBodyWithResponse(ctx context.Context, paymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAPaymentResponse, error)
UpdateAPaymentWithBodyWithResponse request with arbitrary body returning *UpdateAPaymentResponse
func (*ClientWithResponses) UpdateAPaymentWithResponse ¶
func (c *ClientWithResponses) UpdateAPaymentWithResponse(ctx context.Context, paymentId string, body UpdateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAPaymentResponse, error)
func (*ClientWithResponses) UpdateAPromotionCodeWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateAPromotionCodeWithBodyWithResponse(ctx context.Context, promotionCodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAPromotionCodeResponse, error)
UpdateAPromotionCodeWithBodyWithResponse request with arbitrary body returning *UpdateAPromotionCodeResponse
func (*ClientWithResponses) UpdateAPromotionCodeWithResponse ¶
func (c *ClientWithResponses) UpdateAPromotionCodeWithResponse(ctx context.Context, promotionCodeId string, body UpdateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAPromotionCodeResponse, error)
func (*ClientWithResponses) UpdateARefundWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateARefundWithBodyWithResponse(ctx context.Context, refundId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateARefundResponse, error)
UpdateARefundWithBodyWithResponse request with arbitrary body returning *UpdateARefundResponse
func (*ClientWithResponses) UpdateARefundWithResponse ¶
func (c *ClientWithResponses) UpdateARefundWithResponse(ctx context.Context, refundId string, body UpdateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateARefundResponse, error)
func (*ClientWithResponses) UpdateAWebhookEndpointWithBodyWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) UpdateAWebhookEndpointWithBodyWithResponse(ctx context.Context, webhookEndpointId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAWebhookEndpointResponse, error)
UpdateAWebhookEndpointWithBodyWithResponse request with arbitrary body returning *UpdateAWebhookEndpointResponse
func (*ClientWithResponses) UpdateAWebhookEndpointWithResponse ¶ added in v0.0.2
func (c *ClientWithResponses) UpdateAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, body UpdateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAWebhookEndpointResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // CheckoutSession ListAllCheckoutSessionsWithResponse(ctx context.Context, params *ListAllCheckoutSessionsParams, reqEditors ...RequestEditorFn) (*ListAllCheckoutSessionsResponse, error) CreateACheckoutSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error) CreateACheckoutSessionForATokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error) CreateACheckoutSessionWithResponse(ctx context.Context, body CreateACheckoutSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error) CreateACheckoutSessionForATokenWithResponse(ctx context.Context, body CreateACheckoutSessionForATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateACheckoutSessionResponse, error) RetrieveACheckoutSessionWithResponse(ctx context.Context, checkoutSessionId string, params *RetrieveACheckoutSessionParams, reqEditors ...RequestEditorFn) (*RetrieveACheckoutSessionResponse, error) // Coupon ListAllCouponsWithResponse(ctx context.Context, params *ListAllCouponsParams, reqEditors ...RequestEditorFn) (*ListAllCouponsResponse, error) CreateACouponWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateACouponResponse, error) CreateACouponWithResponse(ctx context.Context, body CreateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateACouponResponse, error) RetrieveACouponWithResponse(ctx context.Context, couponId string, reqEditors ...RequestEditorFn) (*RetrieveACouponResponse, error) UpdateACouponWithBodyWithResponse(ctx context.Context, couponId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateACouponResponse, error) UpdateACouponWithResponse(ctx context.Context, couponId string, body UpdateACouponJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateACouponResponse, error) // Order ListAllOrdersWithResponse(ctx context.Context, params *ListAllOrdersParams, reqEditors ...RequestEditorFn) (*ListAllOrdersResponse, error) CreateAnOrderUsingATokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAnOrderUsingATokenResponse, error) CreateAnOrderUsingATokenWithResponse(ctx context.Context, body CreateAnOrderUsingATokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAnOrderUsingATokenResponse, error) RetrieveAnOrderWithResponse(ctx context.Context, orderId string, params *RetrieveAnOrderParams, reqEditors ...RequestEditorFn) (*RetrieveAnOrderResponse, error) CancelAnOrderWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*CancelAnOrderResponse, error) // Payment UpdateAPaymentWithBodyWithResponse(ctx context.Context, paymentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAPaymentResponse, error) UpdateAPaymentWithResponse(ctx context.Context, paymentId string, body UpdateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAPaymentResponse, error) ListAllPaymentsWithResponse(ctx context.Context, params *ListAllPaymentsParams, reqEditors ...RequestEditorFn) (*ListAllPaymentsResponse, error) RetrieveAPaymentWithResponse(ctx context.Context, paymentId string, params *RetrieveAPaymentParams, reqEditors ...RequestEditorFn) (*RetrieveAPaymentResponse, error) CreateAPaymentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAPaymentResponse, error) CreateAPaymentWithResponse(ctx context.Context, body CreateAPaymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAPaymentResponse, error) // PromotionCode ListAllPromotionCodesWithResponse(ctx context.Context, params *ListAllPromotionCodesParams, reqEditors ...RequestEditorFn) (*ListAllPromotionCodesResponse, error) CreateAPromotionCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAPromotionCodeResponse, error) CreateAPromotionCodeWithResponse(ctx context.Context, body CreateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAPromotionCodeResponse, error) RetrieveAPromotionCodeWithResponse(ctx context.Context, promotionCodeId string, reqEditors ...RequestEditorFn) (*RetrieveAPromotionCodeResponse, error) UpdateAPromotionCodeWithBodyWithResponse(ctx context.Context, promotionCodeId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAPromotionCodeResponse, error) UpdateAPromotionCodeWithResponse(ctx context.Context, promotionCodeId string, body UpdateAPromotionCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAPromotionCodeResponse, error) // Refund ListAllRefundsWithResponse(ctx context.Context, params *ListAllRefundsParams, reqEditors ...RequestEditorFn) (*ListAllRefundsResponse, error) CreateARefundWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateARefundResponse, error) CreateARefundWithResponse(ctx context.Context, body CreateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateARefundResponse, error) RetrieveARefundWithResponse(ctx context.Context, refundId string, params *RetrieveARefundParams, reqEditors ...RequestEditorFn) (*RetrieveARefundResponse, error) UpdateARefundWithBodyWithResponse(ctx context.Context, refundId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateARefundResponse, error) UpdateARefundWithResponse(ctx context.Context, refundId string, body UpdateARefundJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateARefundResponse, error) // WebhookEndpoint ListAllWebhookEndpointsWithResponse(ctx context.Context, params *ListAllWebhookEndpointsParams, reqEditors ...RequestEditorFn) (*ListAllWebhookEndpointsResponse, error) CreateAWebhookEndpointWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAWebhookEndpointResponse, error) CreateAWebhookEndpointWithResponse(ctx context.Context, body CreateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAWebhookEndpointResponse, error) RetrieveAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*RetrieveAWebhookEndpointResponse, error) UpdateAWebhookEndpointWithBodyWithResponse(ctx context.Context, webhookEndpointId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAWebhookEndpointResponse, error) UpdateAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, body UpdateAWebhookEndpointJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAWebhookEndpointResponse, error) DeleteAWebhookEndpointWithResponse(ctx context.Context, webhookEndpointId string, reqEditors ...RequestEditorFn) (*DeleteAWebhookEndpointResponse, error) // Token ListAllTokensWithResponse(ctx context.Context, params *ListAllTokensParams, reqEditors ...RequestEditorFn) (*ListAllTokensResponse, error) RetrieveATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*RetrieveATokenResponse, error) EnableATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*EnableATokenResponse, error) DisableATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*DisableATokenResponse, error) DeleteATokenWithResponse(ctx context.Context, tokenId string, reqEditors ...RequestEditorFn) (*DeleteATokenResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses.
type CollectionObject ¶
type CollectionObject string
A string representing the object’s type. The value is always `collection` for collection objects.
const (
CollectionObjectCollection CollectionObject = "collection"
)
Defines values for CollectionObject.
type Coupon ¶
type Coupon struct { // Has the value `true` if the coupon is active and can be used, or the value `false` if it is not. Active *bool `json:"active,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // If the `discountType` is `amount`, the discount amount of this coupon object. DiscountAmount *float32 `json:"discountAmount,omitempty"` // If the `discountType` is `percentage`, the discount percentage of this coupon object. DiscountPercentage *float32 `json:"discountPercentage,omitempty"` // Discount Type DiscountType *DiscountType `json:"discountType,omitempty"` // Time at which the Coupon expires. Measured in seconds since the Unix epoch. ExpiresAt *int `json:"expiresAt,omitempty"` // The unique identifier for the Coupon object. Id *CouponId `json:"id,omitempty"` // Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. MaxRedemptionCount *int `json:"maxRedemptionCount,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The coupon's name, meant to be displayable to the customer. Name *string `json:"name,omitempty"` // A string representing the object’s type. The value is always `coupon` for Coupon objects. Object *string `json:"object,omitempty"` // Number of times this coupon has been applied to an order. RedemptionCount *int `json:"redemptionCount,omitempty"` // Has the value `true` if the coupon is Smartpay funded, or the value `false` if it is not. Sponsored *bool `json:"sponsored,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Coupon
type CouponCreate ¶
type CouponCreate struct { // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // required if discountType is **amount**. The amount of this coupon object. DiscountAmount *int32 `json:"discountAmount,omitempty"` // required if discountType is **percentage**. The discount percentage of this coupon object. DiscountPercentage *int32 `json:"discountPercentage,omitempty"` // Discount Type DiscountType DiscountType `json:"discountType"` // Time at which the Coupon expires. Measured in milliseconds since the Unix epoch. ExpiresAt *int32 `json:"expiresAt,omitempty"` // Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. MaxRedemptionCount *int `json:"maxRedemptionCount,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The coupon's name, meant to be displayable to the customer. Name string `json:"name"` }
CouponCreate defines model for coupon_create.
type CouponUpdate ¶
type CouponUpdate struct { // Has the value `true` if the coupon is active and can be used, or the value `false` if it is not. Active *bool `json:"active,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The coupon's name, meant to be displayable to the customer. Name *string `json:"name,omitempty"` }
CouponUpdate defines model for coupon_update.
type Coupons ¶
type Coupons struct { Data *[]Coupon `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
Coupons defines model for coupons.
type CreateACheckoutSessionForATokenJSONRequestBody ¶ added in v0.2.0
type CreateACheckoutSessionForATokenJSONRequestBody CheckoutSessionForATokenCreate
CreateACheckoutSessionForATokenJSONRequestBody defines body for CheckoutSessionForATokenCreate for application/json ContentType.
type CreateACheckoutSessionJSONRequestBody ¶
type CreateACheckoutSessionJSONRequestBody CheckoutSessionCreate
CreateACheckoutSessionJSONRequestBody defines body for CreateACheckoutSession for application/json ContentType.
type CreateACheckoutSessionResponse ¶
type CreateACheckoutSessionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CheckoutSessionExpanded JSON400 *interface{} JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseCreateACheckoutSessionResponse ¶
func ParseCreateACheckoutSessionResponse(rsp *http.Response) (*CreateACheckoutSessionResponse, error)
ParseCreateACheckoutSessionResponse parses an HTTP response from a CreateACheckoutSessionWithResponse call
func (CreateACheckoutSessionResponse) Status ¶
func (r CreateACheckoutSessionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateACheckoutSessionResponse) StatusCode ¶
func (r CreateACheckoutSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateACouponJSONRequestBody ¶
type CreateACouponJSONRequestBody CouponCreate
CreateACouponJSONRequestBody defines body for CreateACoupon for application/json ContentType.
type CreateACouponResponse ¶
type CreateACouponResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Coupon JSON400 *interface{} JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseCreateACouponResponse ¶
func ParseCreateACouponResponse(rsp *http.Response) (*CreateACouponResponse, error)
ParseCreateACouponResponse parses an HTTP response from a CreateACouponWithResponse call
func (CreateACouponResponse) Status ¶
func (r CreateACouponResponse) Status() string
Status returns HTTPResponse.Status
func (CreateACouponResponse) StatusCode ¶
func (r CreateACouponResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAPaymentJSONRequestBody ¶
type CreateAPaymentJSONRequestBody PaymentCreate
CreateAPaymentJSONRequestBody defines body for CreateAPayment for application/json ContentType.
type CreateAPaymentResponse ¶
type CreateAPaymentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Payment JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } JSON409 *struct { Details []interface{} `json:"details"` ErrorCode N409ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N409StatusCode `json:"statusCode"` } }
func ParseCreateAPaymentResponse ¶
func ParseCreateAPaymentResponse(rsp *http.Response) (*CreateAPaymentResponse, error)
ParseCreateAPaymentResponse parses an HTTP response from a CreateAPaymentWithResponse call
func (CreateAPaymentResponse) Status ¶
func (r CreateAPaymentResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAPaymentResponse) StatusCode ¶
func (r CreateAPaymentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAPromotionCodeJSONRequestBody ¶
type CreateAPromotionCodeJSONRequestBody PromotionCodeCreate
CreateAPromotionCodeJSONRequestBody defines body for CreateAPromotionCode for application/json ContentType.
type CreateAPromotionCodeResponse ¶
type CreateAPromotionCodeResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PromotionCode JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } JSON409 *struct { Details *[]interface{} `json:"details,omitempty"` ErrorCode *string `json:"errorCode,omitempty"` Message *string `json:"message,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseCreateAPromotionCodeResponse ¶
func ParseCreateAPromotionCodeResponse(rsp *http.Response) (*CreateAPromotionCodeResponse, error)
ParseCreateAPromotionCodeResponse parses an HTTP response from a CreateAPromotionCodeWithResponse call
func (CreateAPromotionCodeResponse) Status ¶
func (r CreateAPromotionCodeResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAPromotionCodeResponse) StatusCode ¶
func (r CreateAPromotionCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateARefundJSONBodyReason ¶
type CreateARefundJSONBodyReason string
CreateARefundJSONBodyReason defines parameters for CreateARefund.
type CreateARefundJSONRequestBody ¶
type CreateARefundJSONRequestBody RefundCreate
CreateARefundJSONRequestBody defines body for CreateARefund for application/json ContentType.
type CreateARefundResponse ¶
type CreateARefundResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Refund JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON403 *struct { Details *[]interface{} `json:"details,omitempty"` ErrorCode *string `json:"errorCode,omitempty"` Message *string `json:"message,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []map[string]interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseCreateARefundResponse ¶
func ParseCreateARefundResponse(rsp *http.Response) (*CreateARefundResponse, error)
ParseCreateARefundResponse parses an HTTP response from a CreateARefundWithResponse call
func (CreateARefundResponse) Status ¶
func (r CreateARefundResponse) Status() string
Status returns HTTPResponse.Status
func (CreateARefundResponse) StatusCode ¶
func (r CreateARefundResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAWebhookEndpointJSONRequestBody ¶ added in v0.0.2
type CreateAWebhookEndpointJSONRequestBody WebhookEndpointCreate
CreateAWebhookEndpointJSONRequestBody defines body for CreateAWebhookEndpoint for application/json ContentType.
type CreateAWebhookEndpointResponse ¶ added in v0.0.2
type CreateAWebhookEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *WebhookEndpoint JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseCreateAWebhookEndpointResponse ¶ added in v0.0.2
func ParseCreateAWebhookEndpointResponse(rsp *http.Response) (*CreateAWebhookEndpointResponse, error)
ParseCreateAWebhookEndpointResponse parses an HTTP response from a CreateAWebhookEndpointWithResponse call
func (CreateAWebhookEndpointResponse) Status ¶ added in v0.0.2
func (r CreateAWebhookEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAWebhookEndpointResponse) StatusCode ¶ added in v0.0.2
func (r CreateAWebhookEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateAnOrderUsingATokenJSONRequestBody ¶ added in v0.2.0
type CreateAnOrderUsingATokenJSONRequestBody OrderCreate
CreateAnOrderUsingATokenJSONRequestBody defines body for CreateAnOrderUsingAToken for application/json ContentType.
type CreateAnOrderUsingATokenResponse ¶ added in v0.2.0
type CreateAnOrderUsingATokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *OrderExpanded JSON400 *interface{} JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseCreateAnOrderUsingATokenResponse ¶ added in v0.2.0
func ParseCreateAnOrderUsingATokenResponse(rsp *http.Response) (*CreateAnOrderUsingATokenResponse, error)
ParseCreateAnOrderUsingATokenResponse parses an HTTP response from a CreateAnOrderUsingATokenWithResponse call
func (CreateAnOrderUsingATokenResponse) Status ¶ added in v0.2.0
func (r CreateAnOrderUsingATokenResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAnOrderUsingATokenResponse) StatusCode ¶ added in v0.2.0
func (r CreateAnOrderUsingATokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatedAt ¶
type CreatedAt int
Time at which the object was created. Measured in milliseconds since the Unix epoch.
type Currency ¶
type Currency string
Three-letter ISO currency code, in uppercase. Must be a supported currency.
const (
CurrencyJPY Currency = "JPY"
)
Defines values for Currency.
type CustomerInfo ¶
type CustomerInfo struct { // The age of the customer's account on your website in days. AccountAge *int `json:"accountAge,omitempty"` // Address Address *Address `json:"address,omitempty"` // The date of birth of your customer. The date of birth specified here will be used to pre-populate the date of birth field in your customer's checkout experiences. DateOfBirth *openapi_types.Date `json:"dateOfBirth,omitempty"` // The email address of your customer. The email address specified here will be used to pre-populate the email address field in your customer's checkout experiences. EmailAddress *openapi_types.Email `json:"emailAddress,omitempty"` // The first name of your customer. The name specified here will be used to pre-populate the first name field in your customer's checkout experiences. FirstName *string `json:"firstName,omitempty"` // The kana version of the first name of your customer. The name specified here will be used to pre-populate the kana version of the first name field in your customer's checkout experiences. FirstNameKana *string `json:"firstNameKana,omitempty"` // The last name of your customer. The name specified here will be used to pre-populate the last name field in your customer's checkout experiences. LastName *string `json:"lastName,omitempty"` // The kana version of the last name of your customer. The name specified here will be used to pre-populate the kana version of the last name field in your customer's checkout experiences. LastNameKana *string `json:"lastNameKana,omitempty"` // The (legal) gender of your customer. The gender specified here will be used to pre-populate the gender field in your customer's checkout experiences. LegalGender *CustomerInfoLegalGender `json:"legalGender,omitempty"` // The phone number of your customer. The phone number specified here will be used to pre-populate the phone number field in your customer's checkout experiences. PhoneNumber *string `json:"phoneNumber,omitempty"` // The ID of the user in your system Reference *string `json:"reference,omitempty"` }
Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have.
type CustomerInfoLegalGender ¶
type CustomerInfoLegalGender string
The (legal) gender of your customer. The gender specified here will be used to pre-populate the gender field in your customer's checkout experiences.
const ( CustomerInfoLegalGenderFemale CustomerInfoLegalGender = "female" CustomerInfoLegalGenderMale CustomerInfoLegalGender = "male" )
Defines values for CustomerInfoLegalGender.
type DeleteATokenResponse ¶ added in v0.2.0
type DeleteATokenResponse struct { Body []byte HTTPResponse *http.Response JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseDeleteATokenResponse ¶ added in v0.2.0
func ParseDeleteATokenResponse(rsp *http.Response) (*DeleteATokenResponse, error)
ParseDeleteATokenResponse parses an HTTP response from a DeleteATokenWithResponse call
func (DeleteATokenResponse) Status ¶ added in v0.2.0
func (r DeleteATokenResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteATokenResponse) StatusCode ¶ added in v0.2.0
func (r DeleteATokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAWebhookEndpointResponse ¶ added in v0.0.3
type DeleteAWebhookEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseDeleteAWebhookEndpointResponse ¶ added in v0.0.3
func ParseDeleteAWebhookEndpointResponse(rsp *http.Response) (*DeleteAWebhookEndpointResponse, error)
ParseDeleteAWebhookEndpointResponse parses an HTTP response from a DeleteAWebhookEndpointWithResponse call
func (DeleteAWebhookEndpointResponse) Status ¶ added in v0.0.3
func (r DeleteAWebhookEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAWebhookEndpointResponse) StatusCode ¶ added in v0.0.3
func (r DeleteAWebhookEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DisableATokenResponse ¶ added in v0.2.0
type DisableATokenResponse struct { Body []byte HTTPResponse *http.Response JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseDisableATokenResponse ¶ added in v0.2.0
func ParseDisableATokenResponse(rsp *http.Response) (*DisableATokenResponse, error)
ParseDisableATokenResponse parses an HTTP response from a DisableATokenWithResponse call
func (DisableATokenResponse) Status ¶ added in v0.2.0
func (r DisableATokenResponse) Status() string
Status returns HTTPResponse.Status
func (DisableATokenResponse) StatusCode ¶ added in v0.2.0
func (r DisableATokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Discount ¶
type Discount struct { Amount *float32 `json:"amount,omitempty"` // The unique identifier for the Coupon object. Coupon *CouponId `json:"coupon,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // The unique identifier for the Discount object. Id *DiscountId `json:"id,omitempty"` // A string representing the object’s type. The value is always `discount` for Discount objects. Object *string `json:"object,omitempty"` // The unique identifier for the Promotion Code object. PromotionCode *PromotionCodeId `json:"promotionCode,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` }
Discount
type DiscountAmount ¶
type DiscountAmount float32
The discount amount applied to the order through a Smartpay coupon type DiscountAmount int
type DiscountType ¶
type DiscountType string
Discount Type
const ( DiscountTypeAmount DiscountType = "amount" DiscountTypePercentage DiscountType = "percentage" )
Defines values for DiscountType.
type EnableATokenResponse ¶ added in v0.2.0
type EnableATokenResponse struct { Body []byte HTTPResponse *http.Response JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseEnableATokenResponse ¶ added in v0.2.0
func ParseEnableATokenResponse(rsp *http.Response) (*EnableATokenResponse, error)
ParseEnableATokenResponse parses an HTTP response from a EnableATokenWithResponse call
func (EnableATokenResponse) Status ¶ added in v0.2.0
func (r EnableATokenResponse) Status() string
Status returns HTTPResponse.Status
func (EnableATokenResponse) StatusCode ¶ added in v0.2.0
func (r EnableATokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EventSubscription ¶
type EventSubscription string
Even name to subscribe to
const ( EventSubscriptionCouponCreated EventSubscription = "coupon.created" EventSubscriptionCouponUpdated EventSubscription = "coupon.updated" EventSubscriptionMerchantUserCreated EventSubscription = "merchant_user.created" EventSubscriptionMerchantUserPasswordReset EventSubscription = "merchant_user.password_reset" EventSubscriptionOrderAuthorized EventSubscription = "order.authorized" EventSubscriptionOrderCanceled EventSubscription = "order.canceled" EventSubscriptionOrderRejected EventSubscription = "order.rejected" EventSubscriptionPaymentCreated EventSubscription = "payment.created" EventSubscriptionPayoutGenerated EventSubscription = "payout.generated" EventSubscriptionPayoutPaid EventSubscription = "payout.paid" EventSubscriptionPromotionCodeCreated EventSubscription = "promotion_code.created" EventSubscriptionPromotionCodeUpdated EventSubscription = "promotion_code.updated" EventSubscriptionRefundCreated EventSubscription = "refund.created" EventSubscriptionTokenApproved EventSubscription = "token.approved" EventSubscriptionTokenRejected EventSubscription = "token.rejected" EventSubscriptionTokenDeleted EventSubscription = "token.deleted" EventSubscriptionTokenDisabled EventSubscription = "token.disabled" EventSubscriptionTokenEnabled EventSubscription = "token.enabled" EventSubscriptionTokenCreated EventSubscription = "token.created" EventSubscriptionTokenUsed EventSubscription = "token.used" )
Defines values for EventSubscription.
type ExpandableCheckoutSession ¶
type ExpandableCheckoutSession CheckoutSessionOptions
ExpandableCheckoutSession defines model for expandableCheckoutSession.
type ExpandableCheckoutSessions ¶
type ExpandableCheckoutSessions struct { Data *[]CheckoutSessionOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
ExpandableCheckoutSessions defines model for expandableCheckoutSessions.
type ExpandableOrders ¶
type ExpandableOrders struct { Data *[]OrderOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
ExpandableOrders defines model for expandableOrders.
type ExpandablePayments ¶
type ExpandablePayments struct { Data *[]PaymentOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
ExpandablePayments defines model for expandablePayments.
type ExpandableRefunds ¶
type ExpandableRefunds struct { Data *[]RefundOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
ExpandableRefunds defines model for expandableRefunds.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImageUrl ¶
type ImageUrl string
A URL for an image for this product, meant to be displayed to the customer.
type Item ¶
type Item struct { // The unit amount of this line item. Amount float32 `json:"amount"` // The kind of this line item. Can be either of product, tax and discount. If non given it will be treated as a product Kind *LineItemKind `json:"kind,omitempty"` // The brand of the Product. Brand *string `json:"brand,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency Currency `json:"currency"` // An arbitrary - ideally descriptive - long form explanation of the Line Item, meant to be displayed to the customer. Description *string `json:"description,omitempty"` // The Global Trade Item Number of the Product. Gtin *string `json:"gtin,omitempty"` // A list of up to 8 URLs of images for this product, meant to be displayed to the customer. Images *[]ImageUrl `json:"images,omitempty"` // A brief description of the price, not visible to customers. Label *string `json:"label,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The product’s name, meant to be displayed to the customer. Name string `json:"name"` PriceDescription *string `json:"priceDescription,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. PriceMetadata *Metadata `json:"priceMetadata,omitempty"` // An arbitrary - ideally descriptive - long form explanation of the Product, meant to be displayed to the customer. ProductDescription *string `json:"productDescription,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. ProductMetadata *Metadata `json:"productMetadata,omitempty"` // The quantity of products. Needs to be positive or zero. Quantity *int `json:"quantity,omitempty"` // A - ideally unique - string to reference the Product in your system (e.g. a product ID, etc.). Reference *string `json:"reference,omitempty"` // A URL of the publicly accessible page for this Product on your site or store. Url *ProductUrl `json:"url,omitempty"` }
Item
type LineItemExpanded ¶
type LineItemExpanded struct { // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` Description *string `json:"description,omitempty"` // The kind of this line item. Can be either of product, tax and discount. If non given it will be treated as a product Kind *LineItemKind `json:"kind,omitempty"` // The unit amount of this line item. Amount *float32 `json:"amount,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // The unique identifier for the Line Item object. Id *LineItemId `json:"id,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `lineItem` for Line Item objects. Object *string `json:"object,omitempty"` // Price Price *PriceExpanded `json:"price,omitempty"` Quantity *int `json:"quantity,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Line Item
type LineItemKind ¶ added in v0.1.0
type LineItemKind string
LineItem Kind
const ( LineItemKindProduct LineItemKind = "product" LineItemKindDiscount LineItemKind = "discount" LineItemKindTax LineItemKind = "tax" )
Defines values for LineItemKind.
type ListAllCheckoutSessionsParams ¶
type ListAllCheckoutSessionsParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // Set to `all` if the references within the response need to be expanded to the full objects Expand *ListAllCheckoutSessionsParamsExpand `json:"expand,omitempty"` }
ListAllCheckoutSessionsParams defines parameters for ListAllCheckoutSessions.
type ListAllCheckoutSessionsParamsExpand ¶
type ListAllCheckoutSessionsParamsExpand string
ListAllCheckoutSessionsParamsExpand defines parameters for ListAllCheckoutSessions.
type ListAllCheckoutSessionsResponse ¶
type ListAllCheckoutSessionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]CheckoutSessionOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllCheckoutSessionsResponse ¶
func ParseListAllCheckoutSessionsResponse(rsp *http.Response) (*ListAllCheckoutSessionsResponse, error)
ParseListAllCheckoutSessionsResponse parses an HTTP response from a ListAllCheckoutSessionsWithResponse call
func (ListAllCheckoutSessionsResponse) Status ¶
func (r ListAllCheckoutSessionsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllCheckoutSessionsResponse) StatusCode ¶
func (r ListAllCheckoutSessionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllCouponsParams ¶
type ListAllCouponsParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` }
ListAllCouponsParams defines parameters for ListAllCoupons.
type ListAllCouponsResponse ¶
type ListAllCouponsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]Coupon `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllCouponsResponse ¶
func ParseListAllCouponsResponse(rsp *http.Response) (*ListAllCouponsResponse, error)
ParseListAllCouponsResponse parses an HTTP response from a ListAllCouponsWithResponse call
func (ListAllCouponsResponse) Status ¶
func (r ListAllCouponsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllCouponsResponse) StatusCode ¶
func (r ListAllCouponsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllOrdersParams ¶
type ListAllOrdersParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // Set to `all` if the references within the response need to be expanded to the full objects Expand *ListAllOrdersParamsExpand `json:"expand,omitempty"` }
ListAllOrdersParams defines parameters for ListAllOrders.
type ListAllOrdersParamsExpand ¶
type ListAllOrdersParamsExpand string
ListAllOrdersParamsExpand defines parameters for ListAllOrders.
type ListAllOrdersResponse ¶
type ListAllOrdersResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]OrderOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllOrdersResponse ¶
func ParseListAllOrdersResponse(rsp *http.Response) (*ListAllOrdersResponse, error)
ParseListAllOrdersResponse parses an HTTP response from a ListAllOrdersWithResponse call
func (ListAllOrdersResponse) Status ¶
func (r ListAllOrdersResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllOrdersResponse) StatusCode ¶
func (r ListAllOrdersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllPaymentsParams ¶
type ListAllPaymentsParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // Set to `all` if the references within the response need to be expanded to the full objects Expand *ListAllPaymentsParamsExpand `json:"expand,omitempty"` }
ListAllPaymentsParams defines parameters for ListAllPayments.
type ListAllPaymentsParamsExpand ¶
type ListAllPaymentsParamsExpand string
ListAllPaymentsParamsExpand defines parameters for ListAllPayments.
type ListAllPaymentsResponse ¶
type ListAllPaymentsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]PaymentOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllPaymentsResponse ¶
func ParseListAllPaymentsResponse(rsp *http.Response) (*ListAllPaymentsResponse, error)
ParseListAllPaymentsResponse parses an HTTP response from a ListAllPaymentsWithResponse call
func (ListAllPaymentsResponse) Status ¶
func (r ListAllPaymentsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllPaymentsResponse) StatusCode ¶
func (r ListAllPaymentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllPromotionCodesParams ¶
type ListAllPromotionCodesParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` }
ListAllPromotionCodesParams defines parameters for ListAllPromotionCodes.
type ListAllPromotionCodesResponse ¶
type ListAllPromotionCodesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]PromotionCode `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllPromotionCodesResponse ¶
func ParseListAllPromotionCodesResponse(rsp *http.Response) (*ListAllPromotionCodesResponse, error)
ParseListAllPromotionCodesResponse parses an HTTP response from a ListAllPromotionCodesWithResponse call
func (ListAllPromotionCodesResponse) Status ¶
func (r ListAllPromotionCodesResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllPromotionCodesResponse) StatusCode ¶
func (r ListAllPromotionCodesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllRefundsParams ¶
type ListAllRefundsParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // Set to `all` if the references within the response need to be expanded to the full objects Expand *ListAllRefundsParamsExpand `json:"expand,omitempty"` }
ListAllRefundsParams defines parameters for ListAllRefunds.
type ListAllRefundsParamsExpand ¶
type ListAllRefundsParamsExpand string
ListAllRefundsParamsExpand defines parameters for ListAllRefunds.
type ListAllRefundsResponse ¶
type ListAllRefundsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]RefundOptions `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllRefundsResponse ¶
func ParseListAllRefundsResponse(rsp *http.Response) (*ListAllRefundsResponse, error)
ParseListAllRefundsResponse parses an HTTP response from a ListAllRefundsWithResponse call
func (ListAllRefundsResponse) Status ¶
func (r ListAllRefundsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllRefundsResponse) StatusCode ¶
func (r ListAllRefundsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllTokensParams ¶ added in v0.2.0
type ListAllTokensParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` }
ListAllTokensParams defines parameters for ListAllTokens.
type ListAllTokensResponse ¶ added in v0.2.0
type ListAllTokensResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]Token `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllTokensResponse ¶ added in v0.2.0
func ParseListAllTokensResponse(rsp *http.Response) (*ListAllTokensResponse, error)
ParseListAllTokensResponse parses an HTTP response from a ListAllTokensWithResponse call
func (ListAllTokensResponse) Status ¶ added in v0.2.0
func (r ListAllTokensResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllTokensResponse) StatusCode ¶ added in v0.2.0
func (r ListAllTokensResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAllWebhookEndpointsParams ¶ added in v0.0.2
type ListAllWebhookEndpointsParams struct { // Number of objects to return. Defaults to 20 if not set. MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` }
ListAllWebhookEndpointsParams defines parameters for ListAllWebhookEndpoints.
type ListAllWebhookEndpointsResponse ¶ added in v0.0.2
type ListAllWebhookEndpointsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Data *[]WebhookEndpoint `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` } JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } }
func ParseListAllWebhookEndpointsResponse ¶ added in v0.0.2
func ParseListAllWebhookEndpointsResponse(rsp *http.Response) (*ListAllWebhookEndpointsResponse, error)
ParseListAllWebhookEndpointsResponse parses an HTTP response from a ListAllWebhookEndpointsWithResponse call
func (ListAllWebhookEndpointsResponse) Status ¶ added in v0.0.2
func (r ListAllWebhookEndpointsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAllWebhookEndpointsResponse) StatusCode ¶ added in v0.0.2
func (r ListAllWebhookEndpointsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MaxResults ¶
type MaxResults int
The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified).
type Metadata ¶
type Metadata map[string]interface{}
Set of up to 20 key-value pairs that you can attach to the object.
type Mode ¶ added in v0.2.0
type Mode string
const (
ModeToken Mode = "token"
)
Defines values for Mode.
type N401 ¶
type N401 struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` }
N401 defines model for 401.
type N404ErrorCode ¶
type N404ErrorCode string
type N404StatusCode ¶
type N404StatusCode *int
type N409ErrorCode ¶
type N409ErrorCode string
type N409StatusCode ¶
type N409StatusCode *int
type NextPageToken ¶
type NextPageToken string
The token for the next page of the collection of objects.
type Order ¶
type Order struct { // The amount intended to be collected through this order. A positive integer in the smallest currency unit. Amount *OrderAmount `json:"amount,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // The discount amount applied to the order through a Smartpay coupon DiscountAmount *DiscountAmount `json:"discountAmount,omitempty"` Discounts *[]DiscountId `json:"discounts,omitempty"` ExpiresAt *int `json:"expiresAt,omitempty"` // The unique identifier for the Payment object. Id *OrderId `json:"id,omitempty"` LineItems *[]LineItemId `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `order` for Order objects. Object *string `json:"object,omitempty"` Payments *[]PaymentId `json:"payments,omitempty"` Reference *string `json:"reference,omitempty"` // Shipping Information ShippingInfo *ShippingInfo `json:"shippingInfo,omitempty"` // Order Status Status *OrderStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Order
type OrderAmount ¶
type OrderAmount float32
The amount intended to be collected through this order. A positive integer in the smallest currency unit.
type OrderCreate ¶ added in v0.2.0
type OrderCreate struct { // The amount intended to be collected through this order. A positive integer in the smallest currency unit. Amount OrderAmount `json:"amount"` CaptureMethod *CaptureMethod `json:"captureMethod,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency Currency `json:"currency"` // Customer Information, the details provided here are used to pre-populate forms for your customer's checkout experiences. The more information you send, the better experience the customer will have. CustomerInfo CustomerInfo `json:"customerInfo"` // The line items the customer wishes to order. Items []Item `json:"items"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A - ideally unique - string to reference the Order in your system (e.g. an order ID, etc.). Reference *string `json:"reference,omitempty"` // Shipping Information ShippingInfo ShippingInfo `json:"shippingInfo"` // The unique identifier for the token to be used when creating this order. Token TokenId `json:"token"` }
CheckoutSessionCreate defines model for checkout-session_create.
type OrderExpanded ¶
type OrderExpanded struct { // The amount intended to be collected through this order. A positive integer in the smallest currency unit. Amount *OrderAmount `json:"amount,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` Description *string `json:"description,omitempty"` // The discount amount applied to the order through a Smartpay coupon DiscountAmount *DiscountAmount `json:"discountAmount,omitempty"` Discounts *[]Discount `json:"discounts,omitempty"` ExpiresAt *int `json:"expiresAt,omitempty"` // The unique identifier for the Payment object. Id *OrderId `json:"id,omitempty"` LineItems *[]LineItemExpanded `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `order` for Order objects. Object *string `json:"object,omitempty"` Payments *[]PaymentExpanded `json:"payments,omitempty"` // Shipping Information ShippingInfo *ShippingInfo `json:"shippingInfo,omitempty"` // Order Status Status *OrderStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` // The unique identifier for the Token object. TokenId *TokenId `json:"tokenId,omitempty"` }
Expanded Order
type OrderStatus ¶
type OrderStatus string
Order Status
const ( OrderStatusCanceled OrderStatus = "canceled" OrderStatusPending OrderStatus = "pending" OrderStatusRejected OrderStatus = "rejected" OrderStatusRequiresAuthorization OrderStatus = "requires_authorization" OrderStatusRequiresCapture OrderStatus = "requires_capture" OrderStatusSucceeded OrderStatus = "succeeded" )
Defines values for OrderStatus.
type Payment ¶
type Payment struct { Amount *float32 `json:"amount,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` Description *string `json:"description,omitempty"` // The unique identifier for the Payment object. Id *PaymentId `json:"id,omitempty"` LineItems *[]LineItemId `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `payment` for Payment objects. Object *string `json:"object,omitempty"` // The unique identifier for the Payment object. Order *OrderId `json:"order,omitempty"` Reference *string `json:"reference,omitempty"` Status *PaymentStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Payment
type PaymentCreate ¶
type PaymentCreate struct { // The amount to be captured. Amount float32 `json:"amount"` // Whether to cancel remaining amount in case of a partial capture. Defaults to automatic, which means only a single capture is allowed and any remaining, uncaptured amount is cancelled. Set to manual if you would like to create multiple partial captures. CancelRemainder *PaymentCreateCancelRemainder `json:"cancelRemainder,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency Currency `json:"currency"` // An arbitrary - ideally descriptive - long form explanation of the Payment, meant to be displayed to the customer. Description *string `json:"description,omitempty"` // A list of the IDs of the Line Items of the original order this Payment captures. LineItems *[]LineItemId `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The unique identifier for the Payment object. Order OrderId `json:"order"` // A - ideally unique - string to reference the Payment (e.g. a customer ID, a cart ID, etc.) which can be used to reconcile the Payment with your internal systems. Reference *string `json:"reference,omitempty"` }
PaymentCreate defines model for payment_create.
type PaymentCreateCancelRemainder ¶
type PaymentCreateCancelRemainder string
PaymentCreateCancelRemainder defines parameters for CreateAPayment.
const ( PaymentCreateCancelRemainderAutomatic PaymentCreateCancelRemainder = "automatic" PaymentCreateCancelRemainderManual PaymentCreateCancelRemainder = "manual" )
Defines values for PaymentCreateCancelRemainder
type PaymentExpanded ¶
type PaymentExpanded struct { Amount *float32 `json:"amount,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` Description *string `json:"description,omitempty"` // The unique identifier for the Payment object. Id *PaymentId `json:"id,omitempty"` LineItems *[]LineItemExpanded `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `payment` for Payment objects. Object *string `json:"object,omitempty"` // The unique identifier for the Payment object. Order *OrderId `json:"order,omitempty"` Reference *string `json:"reference,omitempty"` Status *PaymentExpandedStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Expanded Payment
type PaymentExpandedStatus ¶
type PaymentExpandedStatus string
PaymentExpandedStatus defines model for PaymentExpanded.Status.
const ( PaymentExpandedStatusProcessed PaymentExpandedStatus = "processed" PaymentExpandedStatusRefunded PaymentExpandedStatus = "refunded" )
Defines values for PaymentExpandedStatus.
type PaymentStatus ¶
type PaymentStatus string
PaymentStatus defines model for Payment.Status.
const ( PaymentStatusProcessed PaymentStatus = "processed" PaymentStatusRefunded PaymentStatus = "refunded" )
Defines values for PaymentStatus.
type PaymentUpdate ¶
type PaymentUpdate struct { // An arbitrary - ideally descriptive - long form explanation of the Payment, meant to be displayed to the customer. Description *string `json:"description,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A - ideally unique - string to reference the Payment (e.g. a customer ID, a cart ID, etc.) which can be used to reconcile the Payment with your internal systems. Reference *string `json:"reference,omitempty"` }
PaymentUpdate defines model for payment_update.
type PriceExpanded ¶
type PriceExpanded struct { Active *bool `json:"active,omitempty"` Amount *float32 `json:"amount,omitempty"` CreatedAt *int `json:"createdAt,omitempty"` Description *string `json:"description,omitempty"` // The unique identifier for the Price object. Id *PriceId `json:"id,omitempty"` Label *string `json:"label,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `price` for Price objects. Object *string `json:"object,omitempty"` // Product Product *Product `json:"product,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` UpdatedAt *int `json:"updatedAt,omitempty"` }
Price
type Product ¶
type Product struct { Active *bool `json:"active,omitempty"` Brand *string `json:"brand,omitempty"` Categories *[]ProductCategory `json:"categories,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` Description *string `json:"description,omitempty"` Gtin *string `json:"gtin,omitempty"` // The unique identifier for the Product object. Id *ProductId `json:"id,omitempty"` Images *[]ImageUrl `json:"images,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` // A string representing the object’s type. The value is always `product` for Product objects. Object *string `json:"object,omitempty"` Reference *string `json:"reference,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` // A URL of the publicly accessible page for this Product on your site or store. Url *ProductUrl `json:"url,omitempty"` }
Product
type ProductCategory ¶
type ProductCategory string
A category of items the product belongs to. Examples: apparel, cosmetics, etc.
type ProductUrl ¶
type ProductUrl string
A URL of the publicly accessible page for this Product on your site or store.
type PromotionCode ¶
type PromotionCode struct { // Flag indicating whether the promotion code is currently active. Active *bool `json:"active,omitempty"` // The customer-facing code. This code must be unique across all your promotion codes. Code *string `json:"code,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // The moment at which the promotion code can no longer be redeemed. Measured in seconds since the Unix epoch. ExpiresAt *int `json:"expiresAt,omitempty"` // A flag indicating that the Promotion Code should only be redeemed by Customer without any successful Smartpay payments with you. FirstTimeTransaction *bool `json:"firstTimeTransaction,omitempty"` // The unique identifier for the Promotion Code object. Id *PromotionCodeId `json:"id,omitempty"` // The maximum number of times this promotion code can be redeemedcan be redeemed, in total, across all customers, before it is no longer valid. MaxRedemptionCount *int `json:"maxRedemptionCount,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // Minimum amount required to redeem this Promotion Code into a Coupon discount. MinimumAmount *float32 `json:"minimumAmount,omitempty"` // A string representing the object’s type. The value is always `promotionCode` for Promotion Code objects. Object *string `json:"object,omitempty"` // Flag indicating that the Promotion Code should only be redeemed once by a single Customer. OnePerCustomer *bool `json:"onePerCustomer,omitempty"` // The number of times this promotion code has been used. RedemptionCount *int `json:"redemptionCount,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
A promotion code points to a coupon, and can be used to (attempt to) attach that coupon to an order.
type PromotionCodeCreate ¶
type PromotionCodeCreate struct { // Has the value true (default) if the promotion code is active and can be used, or the value false if it is not. Active *bool `json:"active,omitempty"` // The customer-facing code. Regardless of case, this code must be unique across all your promotion codes. Code string `json:"code"` // The unique identifier for the Coupon object. Coupon CouponId `json:"coupon"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` // Time at which the Promotion Code expires. Measured in milliseconds since the Unix epoch. ExpiresAt *int `json:"expiresAt,omitempty"` // A Boolean indicating if the Promotion Code should only be redeemed for customers without any successful order with the merchant. Defaults to false if not set. FirstTimeTransaction *bool `json:"firstTimeTransaction,omitempty"` // Maximum number of times this Promotion Code can be redeemed, in total, across all customers, before it is no longer valid. MaxRedemptionCount *int `json:"maxRedemptionCount,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The minimum amount required to redeem this Promotion Code (e.g., the amount of the order must be ¥10,000 or more to be applicable). MinimumAmount *float32 `json:"minimumAmount,omitempty"` // A Boolean indicating if the Promotion Code should only be redeemed once by any given customer. Defaults to false if not set. OnePerCustomer *bool `json:"onePerCustomer,omitempty"` }
PromotionCodeCreate defines model for promotion-code_create.
type PromotionCodeId ¶
type PromotionCodeId string
The unique identifier for the Promotion Code object.
type PromotionCodeUpdate ¶
type PromotionCodeUpdate struct { // Has the value true if the promotion code is active and can be used, or the value false if it is not. Active *bool `json:"active,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` }
PromotionCodeUpdate defines model for promotion-code_update.
type PromotionCodes ¶
type PromotionCodes struct { Data *[]PromotionCode `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
PromotionCodes defines model for promotion-codes.
type Refund ¶
type Refund struct { Amount *float32 `json:"amount,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` Description *string `json:"description,omitempty"` // The unique identifier for the Refund object. Id *RefundId `json:"id,omitempty"` LineItems *[]LineItemId `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `refund` for Refund objects. Object *string `json:"object,omitempty"` // The unique identifier for the Payment object. Payment *PaymentId `json:"payment,omitempty"` Reason *RefundReason `json:"reason,omitempty"` Reference *string `json:"reference,omitempty"` Status *RefundStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Refund
type RefundCreate ¶
type RefundCreate struct { // A positive amount representing how much of this payment to refund. You can refund only up to the remaining, unrefunded amount of the payment. If this is not set, the default will be the full unrefunded amount of the payment. Amount *float32 `json:"amount,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency Currency `json:"currency"` // An arbitrary - ideally descriptive - long form explanation of the Refund, meant to be displayed to the customer. Description *string `json:"description,omitempty"` // A list of the IDs of the Line Items of the original Payment this Refund is on. LineItems *[]LineItemId `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The unique identifier for the Payment object. Payment PaymentId `json:"payment"` // The reason of the Refund Reason RefundReason `json:"reason"` // A - ideally unique - string to reference the Refund which can be used to reconcile the Refund with your internal systems. Reference *string `json:"reference,omitempty"` }
RefundCreate defines model for refund_create.
type RefundExpanded ¶
type RefundExpanded struct { Amount *int `json:"amount,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. Currency *Currency `json:"currency,omitempty"` Description *string `json:"description,omitempty"` // The unique identifier for the Refund object. Id *RefundId `json:"id,omitempty"` LineItems *[]LineItemExpanded `json:"lineItems,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `refund` for Refund objects. Object *string `json:"object,omitempty"` // The unique identifier for the Payment object. Payment *PaymentId `json:"payment,omitempty"` Reason *RefundExpandedReason `json:"reason,omitempty"` Reference *string `json:"reference,omitempty"` Status *RefundExpandedStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Expanded Refund
type RefundExpandedReason ¶
type RefundExpandedReason string
RefundExpandedReason defines model for RefundExpanded.Reason.
const ( RefundExpandedReasonFraudulent RefundExpandedReason = "fraudulent" RefundExpandedReasonRequestedByCustomer RefundExpandedReason = "requested_by_customer" )
Defines values for RefundExpandedReason.
type RefundExpandedStatus ¶
type RefundExpandedStatus string
RefundExpandedStatus defines model for RefundExpanded.Status.
const ( RefundExpandedStatusFailed RefundExpandedStatus = "failed" RefundExpandedStatusSucceeded RefundExpandedStatus = "succeeded" )
Defines values for RefundExpandedStatus.
type RefundReason ¶
type RefundReason string
RefundReason defines model for Refund.Reason.
const ( RefundReasonFraudulent RefundReason = "fraudulent" RefundReasonRequestedByCustomer RefundReason = "requested_by_customer" )
Defines values for RefundReason.
type RefundStatus ¶
type RefundStatus string
RefundStatus defines model for Refund.Status.
const ( RefundStatusFailed RefundStatus = "failed" RefundStatusSucceeded RefundStatus = "succeeded" )
Defines values for RefundStatus.
type RefundUpdate ¶
type RefundUpdate struct { // An arbitrary - ideally descriptive - long form explanation of the Refund, meant to be displayed to the customer. Description *string `json:"description,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A - ideally unique - string to reference the Refund which can be used to reconcile the Refund with your internal systems. Reference *string `json:"reference,omitempty"` }
RefundUpdate defines model for refund_update.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Results ¶
type Results int
The actual number of objects returned for this call. This value is less than or equal to maxResults.
type RetrieveACheckoutSessionParams ¶
type RetrieveACheckoutSessionParams struct { // Set to `all` if the references within the response need to be expanded to the full objects Expand *RetrieveACheckoutSessionParamsExpand `json:"expand,omitempty"` }
RetrieveACheckoutSessionParams defines parameters for RetrieveACheckoutSession.
type RetrieveACheckoutSessionParamsExpand ¶
type RetrieveACheckoutSessionParamsExpand string
RetrieveACheckoutSessionParamsExpand defines parameters for RetrieveACheckoutSession.
type RetrieveACheckoutSessionResponse ¶
type RetrieveACheckoutSessionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CheckoutSessionOptions JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseRetrieveACheckoutSessionResponse ¶
func ParseRetrieveACheckoutSessionResponse(rsp *http.Response) (*RetrieveACheckoutSessionResponse, error)
ParseRetrieveACheckoutSessionResponse parses an HTTP response from a RetrieveACheckoutSessionWithResponse call
func (RetrieveACheckoutSessionResponse) Status ¶
func (r RetrieveACheckoutSessionResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveACheckoutSessionResponse) StatusCode ¶
func (r RetrieveACheckoutSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveACouponResponse ¶
type RetrieveACouponResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Coupon JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseRetrieveACouponResponse ¶
func ParseRetrieveACouponResponse(rsp *http.Response) (*RetrieveACouponResponse, error)
ParseRetrieveACouponResponse parses an HTTP response from a RetrieveACouponWithResponse call
func (RetrieveACouponResponse) Status ¶
func (r RetrieveACouponResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveACouponResponse) StatusCode ¶
func (r RetrieveACouponResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveAPaymentParams ¶
type RetrieveAPaymentParams struct { // Set to `all` if the references within the response need to be expanded to the full objects Expand *RetrieveAPaymentParamsExpand `json:"expand,omitempty"` }
RetrieveAPaymentParams defines parameters for RetrieveAPayment.
type RetrieveAPaymentParamsExpand ¶
type RetrieveAPaymentParamsExpand string
RetrieveAPaymentParamsExpand defines parameters for RetrieveAnOrder.
type RetrieveAPaymentResponse ¶
type RetrieveAPaymentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PaymentOptions JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseRetrieveAPaymentResponse ¶
func ParseRetrieveAPaymentResponse(rsp *http.Response) (*RetrieveAPaymentResponse, error)
ParseRetrieveAPaymentResponse parses an HTTP response from a RetrieveAPaymentWithResponse call
func (RetrieveAPaymentResponse) Status ¶
func (r RetrieveAPaymentResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveAPaymentResponse) StatusCode ¶
func (r RetrieveAPaymentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveAPromotionCodeResponse ¶
type RetrieveAPromotionCodeResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PromotionCode JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseRetrieveAPromotionCodeResponse ¶
func ParseRetrieveAPromotionCodeResponse(rsp *http.Response) (*RetrieveAPromotionCodeResponse, error)
ParseRetrieveAPromotionCodeResponse parses an HTTP response from a RetrieveAPromotionCodeWithResponse call
func (RetrieveAPromotionCodeResponse) Status ¶
func (r RetrieveAPromotionCodeResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveAPromotionCodeResponse) StatusCode ¶
func (r RetrieveAPromotionCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveARefundParams ¶
type RetrieveARefundParams struct { // Set to `all` if the references within the response need to be expanded to the full objects Expand *RetrieveARefundParamsExpand `json:"expand,omitempty"` }
RetrieveARefundParams defines parameters for RetrieveARefund.
type RetrieveARefundParamsExpand ¶
type RetrieveARefundParamsExpand string
RetrieveARefundParamsExpand defines parameters for RetrieveARefund.
type RetrieveARefundResponse ¶
type RetrieveARefundResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RefundOptions JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseRetrieveARefundResponse ¶
func ParseRetrieveARefundResponse(rsp *http.Response) (*RetrieveARefundResponse, error)
ParseRetrieveARefundResponse parses an HTTP response from a RetrieveARefundWithResponse call
func (RetrieveARefundResponse) Status ¶
func (r RetrieveARefundResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveARefundResponse) StatusCode ¶
func (r RetrieveARefundResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveATokenResponse ¶ added in v0.2.0
type RetrieveATokenResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Token JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseRetrieveATokenResponse ¶ added in v0.2.0
func ParseRetrieveATokenResponse(rsp *http.Response) (*RetrieveATokenResponse, error)
ParseRetrieveATokenResponse parses an HTTP response from a RetrieveATokenWithResponse call
func (RetrieveATokenResponse) Status ¶ added in v0.2.0
func (r RetrieveATokenResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveATokenResponse) StatusCode ¶ added in v0.2.0
func (r RetrieveATokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveAWebhookEndpointResponse ¶ added in v0.0.2
type RetrieveAWebhookEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *WebhookEndpoint JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseRetrieveAWebhookEndpointResponse ¶ added in v0.0.2
func ParseRetrieveAWebhookEndpointResponse(rsp *http.Response) (*RetrieveAWebhookEndpointResponse, error)
ParseRetrieveAWebhookEndpointResponse parses an HTTP response from a RetrieveAWebhookEndpointWithResponse call
func (RetrieveAWebhookEndpointResponse) Status ¶ added in v0.0.2
func (r RetrieveAWebhookEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveAWebhookEndpointResponse) StatusCode ¶ added in v0.0.2
func (r RetrieveAWebhookEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveAnOrderParams ¶
type RetrieveAnOrderParams struct { // Set to `all` if the references within the response need to be expanded to the full objects Expand *RetrieveAnOrderParamsExpand `json:"expand,omitempty"` }
RetrieveAnOrderParams defines parameters for RetrieveAnOrder.
type RetrieveAnOrderParamsExpand ¶
type RetrieveAnOrderParamsExpand string
RetrieveAnOrderParamsExpand defines parameters for RetrieveAnOrder.
type RetrieveAnOrderResponse ¶
type RetrieveAnOrderResponse struct { Body []byte HTTPResponse *http.Response JSON200 *OrderOptions JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseRetrieveAnOrderResponse ¶
func ParseRetrieveAnOrderResponse(rsp *http.Response) (*RetrieveAnOrderResponse, error)
ParseRetrieveAnOrderResponse parses an HTTP response from a RetrieveAnOrderWithResponse call
func (RetrieveAnOrderResponse) Status ¶
func (r RetrieveAnOrderResponse) Status() string
Status returns HTTPResponse.Status
func (RetrieveAnOrderResponse) StatusCode ¶
func (r RetrieveAnOrderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ShippingInfo ¶
type ShippingInfo struct { // Address Address Address `json:"address"` // Address Type AddressType *AddressType `json:"addressType,omitempty"` // The delivery service that shipped a physical product, such as Yamato, Seino, Fedex, UPS, etc. CarrierName *string `json:"carrierName,omitempty"` // The shipping fee. FeeAmount *float32 `json:"feeAmount,omitempty"` // Three-letter ISO currency code, in uppercase. Must be a supported currency. FeeCurrency *Currency `json:"feeCurrency,omitempty"` // The reference for the shipment (e.g. the tracking number for a physical product, obtained from the delivery service). Reference *string `json:"reference,omitempty"` }
Shipping Information
type SuccessUrl ¶
type SuccessUrl string
The URL the customer will be redirected to if the Checkout Session completed successfully. This means the Checkout succeeded, i.e. the customer authorized the order.
type TestFlag ¶
type TestFlag bool
A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode.
type Token ¶ added in v0.2.0
type Token struct { // The unique identifier for the Token object. Id *TokenId `json:"id,omitempty"` // A string representing the object’s type. The value is always `checkoutSession` for Checkout Session objects. Object *string `json:"object,omitempty"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A - ideally unique - string to reference the Token in your system (e.g. a token ID, etc.). Reference *string `json:"reference,omitempty"` // The current status of the Token object. Status *TokenStatus `json:"status,omitempty"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test,omitempty"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt,omitempty"` }
Token
type TokenStatus ¶ added in v0.2.0
type TokenStatus string
Token Status
const ( TokenStatusRequiresAuthorization TokenStatus = "requires_authorization" TokenStatusActive TokenStatus = "active" TokenStatusRejected TokenStatus = "rejected" TokenStatusDisabled TokenStatus = "disabled" TokenStatusDeleted TokenStatus = "deleted" )
Defines values for TokenStatus.
type UpdateACouponJSONRequestBody ¶
type UpdateACouponJSONRequestBody CouponUpdate
UpdateACouponJSONRequestBody defines body for UpdateACoupon for application/json ContentType.
type UpdateACouponResponse ¶
type UpdateACouponResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Coupon JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseUpdateACouponResponse ¶
func ParseUpdateACouponResponse(rsp *http.Response) (*UpdateACouponResponse, error)
ParseUpdateACouponResponse parses an HTTP response from a UpdateACouponWithResponse call
func (UpdateACouponResponse) Status ¶
func (r UpdateACouponResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateACouponResponse) StatusCode ¶
func (r UpdateACouponResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateAPaymentJSONRequestBody ¶
type UpdateAPaymentJSONRequestBody PaymentUpdate
UpdateAPaymentJSONRequestBody defines body for UpdateAPayment for application/json ContentType.
type UpdateAPaymentResponse ¶
type UpdateAPaymentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Payment JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseUpdateAPaymentResponse ¶
func ParseUpdateAPaymentResponse(rsp *http.Response) (*UpdateAPaymentResponse, error)
ParseUpdateAPaymentResponse parses an HTTP response from a UpdateAPaymentWithResponse call
func (UpdateAPaymentResponse) Status ¶
func (r UpdateAPaymentResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAPaymentResponse) StatusCode ¶
func (r UpdateAPaymentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateAPromotionCodeJSONRequestBody ¶
type UpdateAPromotionCodeJSONRequestBody PromotionCodeUpdate
UpdateAPromotionCodeJSONRequestBody defines body for UpdateAPromotionCode for application/json ContentType.
type UpdateAPromotionCodeResponse ¶
type UpdateAPromotionCodeResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PromotionCode JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseUpdateAPromotionCodeResponse ¶
func ParseUpdateAPromotionCodeResponse(rsp *http.Response) (*UpdateAPromotionCodeResponse, error)
ParseUpdateAPromotionCodeResponse parses an HTTP response from a UpdateAPromotionCodeWithResponse call
func (UpdateAPromotionCodeResponse) Status ¶
func (r UpdateAPromotionCodeResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAPromotionCodeResponse) StatusCode ¶
func (r UpdateAPromotionCodeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateARefundJSONRequestBody ¶
type UpdateARefundJSONRequestBody RefundUpdate
UpdateARefundJSONRequestBody defines body for UpdateARefund for application/json ContentType.
type UpdateARefundResponse ¶
type UpdateARefundResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Refund JSON401 *struct { Realm *string `json:"realm,omitempty"` Scheme *string `json:"scheme,omitempty"` StatusCode *int `json:"statusCode,omitempty"` } JSON404 *struct { Details []interface{} `json:"details"` ErrorCode N404ErrorCode `json:"errorCode"` Message string `json:"message"` StatusCode N404StatusCode `json:"statusCode"` } }
func ParseUpdateARefundResponse ¶
func ParseUpdateARefundResponse(rsp *http.Response) (*UpdateARefundResponse, error)
ParseUpdateARefundResponse parses an HTTP response from a UpdateARefundWithResponse call
func (UpdateARefundResponse) Status ¶
func (r UpdateARefundResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateARefundResponse) StatusCode ¶
func (r UpdateARefundResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateAWebhookEndpointJSONRequestBody ¶ added in v0.0.2
type UpdateAWebhookEndpointJSONRequestBody WebhookEndpointUpdate
UpdateAWebhookEndpointJSONRequestBody defines body for UpdateAWebhookEndpoint for application/json ContentType.
type UpdateAWebhookEndpointResponse ¶ added in v0.0.2
type UpdateAWebhookEndpointResponse struct { Body []byte HTTPResponse *http.Response JSON200 *WebhookEndpoint JSON404 *struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` } }
func ParseUpdateAWebhookEndpointResponse ¶ added in v0.0.2
func ParseUpdateAWebhookEndpointResponse(rsp *http.Response) (*UpdateAWebhookEndpointResponse, error)
ParseUpdateAWebhookEndpointResponse parses an HTTP response from a UpdateAWebhookEndpointWithResponse call
func (UpdateAWebhookEndpointResponse) Status ¶ added in v0.0.2
func (r UpdateAWebhookEndpointResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAWebhookEndpointResponse) StatusCode ¶ added in v0.0.2
func (r UpdateAWebhookEndpointResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdatedAt ¶
type UpdatedAt int
The moment at which the object was last updated. Measured in milliseconds since the Unix epoch.
type WebhookEndpoint ¶
type WebhookEndpoint struct { // Has the value `true` if the webhook endpoint is active and events are sent to the url specified. Has the value `false if the endpoint is inactive and the events won't be sent to the url specified. Active *bool `json:"active"` // Time at which the object was created. Measured in milliseconds since the Unix epoch. CreatedAt *CreatedAt `json:"createdAt"` // An optional description for your webhook endpoint. Description *string `json:"description"` // The list of events to subscribe to. If not specified you will be subsribed to all events. EventSubscriptions *[]EventSubscription `json:"eventSubscriptions,omitempty"` // The unique identifier for the Webhook Endpoint object. Id *WebhookEndpointId `json:"id"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // A string representing the object’s type. The value is always `webhookEndpoint` for Webhook Endpoint objects. Object *string `json:"object"` SigningSecret *string `json:"signingSecret"` // A flag with a value `false` if the object exists in live mode or `true` if the object exists in test mode. Test *TestFlag `json:"test"` // The moment at which the object was last updated. Measured in milliseconds since the Unix epoch. UpdatedAt *UpdatedAt `json:"updatedAt"` // The url which will be called when any of the events you subscribed to occur. Url *string `json:"url"` }
WebhookEndpoint defines model for webhookEndpoint.
type WebhookEndpointCreate ¶
type WebhookEndpointCreate struct { // An optional description for your webhook endpoint. Description *string `json:"description,omitempty"` // The list of events to subscribe to. If not specified you will be subsribed to all events. EventSubscriptions *[]EventSubscription `json:"eventSubscriptions,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The url which will be called when any of the events you subscribed to occur. Url string `json:"url"` }
WebhookEndpointCreate defines model for webhook-endpoint_create.
type WebhookEndpointId ¶
type WebhookEndpointId string
The unique identifier for the Webhook Endpoint object.
type WebhookEndpointNotFound ¶
type WebhookEndpointNotFound struct { Details []interface{} `json:"details"` ErrorCode string `json:"errorCode"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` }
WebhookEndpointNotFound defines model for WebhookEndpointNotFound.
type WebhookEndpointUpdate ¶
type WebhookEndpointUpdate struct { // Has the value `true` if the webhook endpoint is active and events are sent to the url specified. Has the value `false if the endpoint is inactive and the events won't be sent to the url specified. Active *bool `json:"active,omitempty"` // An optional description for your webhook endpoint. Description *string `json:"description,omitempty"` // The list of events to subscribe to. If not specified you will be subsribed to all events. EventSubscriptions *[]EventSubscription `json:"eventSubscriptions,omitempty"` // Set of up to 20 key-value pairs that you can attach to the object. Metadata *Metadata `json:"metadata,omitempty"` // The url which will be called when any of the events you subscribed to occur. Url *string `json:"url,omitempty"` }
WebhookEndpointUpdate defines model for webhook-endpoint_update.
type WebhookEndpoints ¶
type WebhookEndpoints struct { Data *[]WebhookEndpoint `json:"data,omitempty"` // The maximum number of objects returned for this call. Equals to the maxResults query parameter specified (or 20 if not specified). MaxResults *MaxResults `json:"maxResults,omitempty"` // The token for the next page of the collection of objects. NextPageToken *NextPageToken `json:"nextPageToken,omitempty"` // A string representing the object’s type. The value is always `collection` for collection objects. Object *CollectionObject `json:"object,omitempty"` // The token for the page of the collection of objects. PageToken *PageToken `json:"pageToken,omitempty"` // The actual number of objects returned for this call. This value is less than or equal to maxResults. Results *Results `json:"results,omitempty"` }
WebhookEndpoints defines model for webhookEndpoints.