github.com/stripe/stripe-go/v76@v76.25.0/financialconnections_transaction.go (about)

     1  //
     2  //
     3  // File generated from our OpenAPI spec
     4  //
     5  //
     6  
     7  package stripe
     8  
     9  // The status of the transaction.
    10  type FinancialConnectionsTransactionStatus string
    11  
    12  // List of values that FinancialConnectionsTransactionStatus can take
    13  const (
    14  	FinancialConnectionsTransactionStatusPending FinancialConnectionsTransactionStatus = "pending"
    15  	FinancialConnectionsTransactionStatusPosted  FinancialConnectionsTransactionStatus = "posted"
    16  	FinancialConnectionsTransactionStatusVoid    FinancialConnectionsTransactionStatus = "void"
    17  )
    18  
    19  // A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
    20  type FinancialConnectionsTransactionListTransactionRefreshParams struct {
    21  	// Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
    22  	After *string `form:"after"`
    23  }
    24  
    25  // Returns a list of Financial Connections Transaction objects.
    26  type FinancialConnectionsTransactionListParams struct {
    27  	ListParams `form:"*"`
    28  	// The ID of the Stripe account whose transactions will be retrieved.
    29  	Account *string `form:"account"`
    30  	// Specifies which fields in the response should be expanded.
    31  	Expand []*string `form:"expand"`
    32  	// A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
    33  	TransactedAt *int64 `form:"transacted_at"`
    34  	// A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
    35  	TransactedAtRange *RangeQueryParams `form:"transacted_at"`
    36  	// A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
    37  	TransactionRefresh *FinancialConnectionsTransactionListTransactionRefreshParams `form:"transaction_refresh"`
    38  }
    39  
    40  // AddExpand appends a new field to expand.
    41  func (p *FinancialConnectionsTransactionListParams) AddExpand(f string) {
    42  	p.Expand = append(p.Expand, &f)
    43  }
    44  
    45  // Retrieves the details of a Financial Connections Transaction
    46  type FinancialConnectionsTransactionParams struct {
    47  	Params `form:"*"`
    48  	// Specifies which fields in the response should be expanded.
    49  	Expand []*string `form:"expand"`
    50  }
    51  
    52  // AddExpand appends a new field to expand.
    53  func (p *FinancialConnectionsTransactionParams) AddExpand(f string) {
    54  	p.Expand = append(p.Expand, &f)
    55  }
    56  
    57  type FinancialConnectionsTransactionStatusTransitions struct {
    58  	// Time at which this transaction posted. Measured in seconds since the Unix epoch.
    59  	PostedAt int64 `json:"posted_at"`
    60  	// Time at which this transaction was voided. Measured in seconds since the Unix epoch.
    61  	VoidAt int64 `json:"void_at"`
    62  }
    63  
    64  // A Transaction represents a real transaction that affects a Financial Connections Account balance.
    65  type FinancialConnectionsTransaction struct {
    66  	APIResource
    67  	// The ID of the Financial Connections Account this transaction belongs to.
    68  	Account string `json:"account"`
    69  	// The amount of this transaction, in cents (or local equivalent).
    70  	Amount int64 `json:"amount"`
    71  	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
    72  	Currency Currency `json:"currency"`
    73  	// The description of this transaction.
    74  	Description string `json:"description"`
    75  	// Unique identifier for the object.
    76  	ID string `json:"id"`
    77  	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    78  	Livemode bool `json:"livemode"`
    79  	// String representing the object's type. Objects of the same type share the same value.
    80  	Object string `json:"object"`
    81  	// The status of the transaction.
    82  	Status            FinancialConnectionsTransactionStatus             `json:"status"`
    83  	StatusTransitions *FinancialConnectionsTransactionStatusTransitions `json:"status_transitions"`
    84  	// Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
    85  	TransactedAt int64 `json:"transacted_at"`
    86  	// The token of the transaction refresh that last updated or created this transaction.
    87  	TransactionRefresh string `json:"transaction_refresh"`
    88  	// Time at which the object was last updated. Measured in seconds since the Unix epoch.
    89  	Updated int64 `json:"updated"`
    90  }
    91  
    92  // FinancialConnectionsTransactionList is a list of Transactions as retrieved from a list endpoint.
    93  type FinancialConnectionsTransactionList struct {
    94  	APIResource
    95  	ListMeta
    96  	Data []*FinancialConnectionsTransaction `json:"data"`
    97  }