graphql

package
v0.0.0-...-cb7f019 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckoutData

type CheckoutData struct {
	ID         string `json:"id"`
	IsArchived bool   `json:"isArchived"`
	Connection struct {
		Type     string `json:"type"`
		Provider struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		}
		Credentials string `json:"credentials"`
		IsTest      bool   `json:"isTest"`
	}
	PaymentOptions struct {
		Items []struct {
			PaymentOption struct {
				ID    string `json:"id"`
				Image string `json:"image"`
				Name  string `json:"name"`
			} `json:"paymentOption"`
		} `json:"items"`
	} `json:"paymentOptions"`
	ShippingZone *ShippingZone `json:"-"`
}

type Client

type Client struct {
	*graphql.Client
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) CreateCharge

func (c *Client) CreateCharge(ctx context.Context, params *buyte.CreateChargeParams) (*buyte.Charge, error)

func (*Client) CreatePaymentToken

func (c *Client) CreatePaymentToken(ctx context.Context, paymentTokenInput *buyte.CreatePaymentTokenInput) (*buyte.PaymentToken, error)

func (*Client) GetCharge

func (c *Client) GetCharge(ctx context.Context, chargeId string) (*buyte.Charge, error)

func (*Client) GetFullCheckout

func (c *Client) GetFullCheckout(ctx context.Context, checkoutId string, options *buyte.FullCheckoutOptions) (*buyte.FullCheckout, error)

Using Main User Struct SUGGEST: Filter the shipping zones within the Graphql Query... --> Current Fix: Filtering in Go

func (*Client) GetPaymentToken

func (c *Client) GetPaymentToken(ctx context.Context, paymentTokenId string) (*buyte.PaymentToken, error)

type ShippingZone

type ShippingZone struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Countries []struct {
		Iso  string `json:"iso"`
		Name string `json:"name"`
	} `json:"countries"`
	PriceRates struct {
		Items []struct {
			ID            string      `json:"id"`
			Label         string      `json:"label"`
			Description   string      `json:"description"`
			MinOrderPrice int         `json:"minOrderPrice"`
			MaxOrderPrice interface{} `json:"maxOrderPrice"`
			Rate          int         `json:"rate"`
		}
	}
}

Jump to

Keyboard shortcuts

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