shared

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefundResponse

type RefundResponse struct {
	// The ID of the `refund`. We recommend you store this value. If you need to
	// reverse this refund, you will be required to reference this ID.
	ID        string                   `json:"id"`
	LineItems []RefundResponseLineItem `json:"line_items"`
	// The type of object: `tax.refund`.
	Object string `json:"object"`
	// Unix timestamp in **seconds** representing the date and time the refund was
	// made. If not provided, the time the `refund` was created will be used.
	RefundProcessedAt float64 `json:"refund_processed_at"`
	// This will be either `'full'` or `'partial'`.
	RefundType string `json:"refund_type"`
	// `True` if using a production API key. `False` if using a test API key.
	Testmode bool `json:"testmode"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		LineItems         respjson.Field
		Object            respjson.Field
		RefundProcessedAt respjson.Field
		RefundType        respjson.Field
		Testmode          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RefundResponse) RawJSON

func (r RefundResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*RefundResponse) UnmarshalJSON

func (r *RefundResponse) UnmarshalJSON(data []byte) error

type RefundResponseLineItem

type RefundResponseLineItem struct {
	// The amount excluding tax, which should be a negative number for refunds.
	AmountExcludingTax float64 `json:"amount_excluding_tax"`
	// The amount including tax, which should be a negative number for refunds.
	AmountIncludingTax float64                       `json:"amount_including_tax"`
	Product            RefundResponseLineItemProduct `json:"product"`
	// The quantity of this product being refunded.
	Quantity float64 `json:"quantity"`
	// The tax amount, which should be a negative number for refunds.
	TaxAmount        float64                                 `json:"tax_amount"`
	TaxJurisdictions []RefundResponseLineItemTaxJurisdiction `json:"tax_jurisdictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AmountExcludingTax respjson.Field
		AmountIncludingTax respjson.Field
		Product            respjson.Field
		Quantity           respjson.Field
		TaxAmount          respjson.Field
		TaxJurisdictions   respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RefundResponseLineItem) RawJSON

func (r RefundResponseLineItem) RawJSON() string

Returns the unmodified JSON received from the API

func (*RefundResponseLineItem) UnmarshalJSON

func (r *RefundResponseLineItem) UnmarshalJSON(data []byte) error

type RefundResponseLineItemProduct

type RefundResponseLineItemProduct struct {
	ProductTaxCode       string `json:"product_tax_code"`
	ReferenceLineItemID  string `json:"reference_line_item_id"`
	ReferenceProductID   string `json:"reference_product_id"`
	ReferenceProductName string `json:"reference_product_name"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ProductTaxCode       respjson.Field
		ReferenceLineItemID  respjson.Field
		ReferenceProductID   respjson.Field
		ReferenceProductName respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RefundResponseLineItemProduct) RawJSON

Returns the unmodified JSON received from the API

func (*RefundResponseLineItemProduct) UnmarshalJSON

func (r *RefundResponseLineItemProduct) UnmarshalJSON(data []byte) error

type RefundResponseLineItemTaxJurisdiction

type RefundResponseLineItemTaxJurisdiction struct {
	// The flat fee that is added to this transaction. Like all numeric values, this
	// will be returned in cents and should be added directly to the tax amount
	// independent of other percentages. For example, a $100 transaction taxed at 5%
	// and with a `fee_amount: 50` will lead to `($100 * 5% + 0.50) = $5.50` in tax
	// being charged
	FeeAmount        float64 `json:"fee_amount"`
	JurisdictionName string  `json:"jurisdiction_name"`
	// Additional information about the tax jurisdiction. Available with API version
	// 2025-05-12. For B2B transactions, reverse charge is determined by comparing
	// origin_address.address_country vs customer.address.address_country (same country
	// = domestic VAT, different countries = reverse charge).
	Note     string `json:"note"`
	RateType string `json:"rate_type"`
	// The tax rate percentage applied to this transaction.
	TaxRate float64 `json:"tax_rate"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FeeAmount        respjson.Field
		JurisdictionName respjson.Field
		Note             respjson.Field
		RateType         respjson.Field
		TaxRate          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RefundResponseLineItemTaxJurisdiction) RawJSON

Returns the unmodified JSON received from the API

func (*RefundResponseLineItemTaxJurisdiction) UnmarshalJSON

func (r *RefundResponseLineItemTaxJurisdiction) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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