yoorefund

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package yoorefund describes all the necessary entities for working with YooMoney Refunds.

Package yoorefund describes all the necessary entities for working with YooMoney Refunds.

Package yoorefund describes all the necessary entities for working with YooMoney Refunds.

Package yoorefund describes all the necessary entities for working with YooMoney Refunds.

Package yoorefund describes all the necessary entities for working with YooMoney Refunds.

Package yoorefund describes all the necessary entities for working with YooMoney Refunds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deal

type Deal struct {
	// Deal ID. Taken from the linked payment.
	ID string `json:"id,omitempty"`

	// Information about money distribution.
	RefundSettlements []yoocommon.Settlement `json:"refund_settlements,omitempty"`
}

The Deal within which the payment is being carried out.

type Refund

type Refund struct {
	// Refund's ID in YooMoney.
	Id string `json:"id,omitempty"`

	// Payment ID in YooMoney.
	PaymentId string `json:"payment_id,omitempty"`

	// Refund status. Possible values: pending, succeeded, and canceled.
	Status Status `json:"status,omitempty"`

	// Comment to the canceled status: who canceled the refund and what was the reason.
	CancellationDetails *yoocommon.CancellationDetails `json:"cancellation_details,omitempty"`

	// Status of receipt delivery. Possible values: pending, succeeded, and canceled.
	ReceiptRegistration Status `json:"receipt_registration,omitempty"`

	// Time to refund creation, based on UTC and specified in the ISO 8601 format,
	// for example, 2017-11-03T11:52:31.827Z
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Amount refunded to the user.
	Amount *yoocommon.Amount `json:"amount,omitempty"`

	// Reason behind the refund.
	Description string `json:"description,omitempty"`

	// Information about money held for refunds:
	// the amount to be held and the stores getting the refunds.
	Sources *Source `json:"sources,omitempty"`

	// The deal within which the refund is being carried out.
	Deal *Deal `json:"deal,omitempty"`
}

The Refund object contains all currently relevant information about the refund of a successful payment. The object is sent in response to any refund-related requests.

type RefundList

type RefundList struct {
	// Format of request results output. Possible value: list.
	Type string `json:"type"`

	// Array of objects matching the request parameters.
	Items []Refund `json:"items"`

	// Cursor to the next fragment of the list.
	// Example: cursor=37a5c87d-3984-51e8-a7f3-8de646d39ec15
	NextCursor string `json:"next_cursor"`
}

RefundList contains list of refunds. Data can be filtered.

type RefundListFilter

type RefundListFilter struct {
	// Filter by creation date: time must be greater than the specified
	// value or equal ("from a certain moment inclusive").
	// Specified in the ISO 8601 format.
	CreatedAtGTE *time.Time `json:"created_at.gte,omitempty"`

	// Filter by creation date: time must be greater than the specified
	// value ("from a certain moment exclusive").
	// Specified in the ISO 8601 format.
	CreatedAtGT *time.Time `json:"created_at.gt,omitempty"`

	// Filter by creation date: time must be less than the specified
	// value or equal ("until a certain moment inclusive").
	// Specified in the ISO 8601 format
	CreatedAtLTE *time.Time `json:"created_at.lte,omitempty"`

	// Filter by creation date: time must be less than the specified
	// value ("until a certain moment exclusive").
	// Specified in the ISO 8601 format.
	CreatedAtLT *time.Time `json:"created_at.lt,omitempty"`

	// Filter by time of payment capture: time must be greater than the specified
	// value or equal ("from a certain moment inclusive").
	// Specified in the ISO 8601 format.
	CapturedAtGTE *time.Time `json:"captured_at.gte,omitempty"`

	// Filter by time of payment capture: time must be greater than the specified
	// value ("from a certain moment exclusive").
	// Specified in the ISO 8601 format.
	CapturedAtGT *time.Time `json:"captured_at.gt,omitempty"`

	// Filter by time of payment capture: time must be less than the specified
	// value or equal ("until a certain moment inclusive").
	// Specified in the ISO 8601 format.
	CapturedAtLTE *time.Time `json:"captured_at.lte,omitempty"`

	// Filter by time of payment capture: time must be less than the specified
	// value ("until a certain moment exclusive").
	// Specified in the ISO 8601 format.
	CapturedAtLT *time.Time `json:"captured_at.lt,omitempty"`

	// Filter by payment ID.
	PaymentID string `json:"payment_id,omitempty"`

	// Filter by payment status. Example: succeeded
	Status Status `json:"status,omitempty"`

	// Size of the output of request results: number of objects sent in response.
	// Possible values: 1 to 100.
	// Default value: 10
	Limit int `json:"limit,omitempty"`

	// Cursor to the next fragment in the list. Example: cursor=37a5c87d-3984-51e8-a7f3-8de646d39ec15
	// Use the value of the next_cursor parameter received in response to the previous request as the cursor.
	// Used if the size of the list is greater than the output size (limit) and the output end hasn't been reached.
	Cursor string `json:"cursor,omitempty"`
}

The request allows you to receive the list of refunds filtered by specified criteria.

type Source

type Source struct {
	// ID of the store in favor of which you're accepting the receipt.
	// Provided by YooMoney, displayed in the Sellers section of your Merchant Profile (shopId column).
	AccountId string `json:"account_id,omitempty"`

	// Refund amount.
	Amount *yoocommon.Amount `json:"amount,omitempty"`

	// Commission that you charged during payment.
	PlatformFeeAmount *yoocommon.Amount `json:"platform_fee_amount,omitempty"`
}

Information about money held for refunds: the amount to be held and the stores getting the refunds.

type Status

type Status string
const (
	// Pending - refund has been created, but it is still being processed.
	Pending Status = "pending"

	// Succeeded — refund successfully completed, the amount specified in the request
	// has been refunded to the user's means of payment (final and unchangeable status).
	Succeeded Status = "succeeded"

	// Canceled — refund canceled, the initiator and reasons are specified
	// in the cancellation_details object (final and unchangeable status).
	Canceled Status = "canceled"
)

Jump to

Keyboard shortcuts

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