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

     1  //
     2  //
     3  // File generated from our OpenAPI spec
     4  //
     5  //
     6  
     7  package stripe
     8  
     9  // Refund a test-mode Transaction.
    10  type TestHelpersIssuingTransactionRefundParams struct {
    11  	Params `form:"*"`
    12  	// Specifies which fields in the response should be expanded.
    13  	Expand []*string `form:"expand"`
    14  	// The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
    15  	RefundAmount *int64 `form:"refund_amount"`
    16  }
    17  
    18  // AddExpand appends a new field to expand.
    19  func (p *TestHelpersIssuingTransactionRefundParams) AddExpand(f string) {
    20  	p.Expand = append(p.Expand, &f)
    21  }
    22  
    23  // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
    24  type TestHelpersIssuingTransactionCreateForceCaptureMerchantDataParams struct {
    25  	// A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
    26  	Category *string `form:"category"`
    27  	// City where the seller is located
    28  	City *string `form:"city"`
    29  	// Country where the seller is located
    30  	Country *string `form:"country"`
    31  	// Name of the seller
    32  	Name *string `form:"name"`
    33  	// Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
    34  	NetworkID *string `form:"network_id"`
    35  	// Postal code where the seller is located
    36  	PostalCode *string `form:"postal_code"`
    37  	// State where the seller is located
    38  	State *string `form:"state"`
    39  	// An ID assigned by the seller to the location of the sale.
    40  	TerminalID *string `form:"terminal_id"`
    41  	// URL provided by the merchant on a 3DS request
    42  	URL *string `form:"url"`
    43  }
    44  
    45  // The legs of the trip.
    46  type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams struct {
    47  	// The three-letter IATA airport code of the flight's destination.
    48  	ArrivalAirportCode *string `form:"arrival_airport_code"`
    49  	// The airline carrier code.
    50  	Carrier *string `form:"carrier"`
    51  	// The three-letter IATA airport code that the flight departed from.
    52  	DepartureAirportCode *string `form:"departure_airport_code"`
    53  	// The flight number.
    54  	FlightNumber *string `form:"flight_number"`
    55  	// The flight's service class.
    56  	ServiceClass *string `form:"service_class"`
    57  	// Whether a stopover is allowed on this flight.
    58  	StopoverAllowed *bool `form:"stopover_allowed"`
    59  }
    60  
    61  // Information about the flight that was purchased with this transaction.
    62  type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams struct {
    63  	// The time that the flight departed.
    64  	DepartureAt *int64 `form:"departure_at"`
    65  	// The name of the passenger.
    66  	PassengerName *string `form:"passenger_name"`
    67  	// Whether the ticket is refundable.
    68  	Refundable *bool `form:"refundable"`
    69  	// The legs of the trip.
    70  	Segments []*TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightSegmentParams `form:"segments"`
    71  	// The travel agency that issued the ticket.
    72  	TravelAgency *string `form:"travel_agency"`
    73  }
    74  
    75  // Information about fuel that was purchased with this transaction.
    76  type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams struct {
    77  	// The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
    78  	Type *string `form:"type"`
    79  	// The units for `volume_decimal`. One of `us_gallon` or `liter`.
    80  	Unit *string `form:"unit"`
    81  	// The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
    82  	UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"`
    83  	// The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.
    84  	VolumeDecimal *float64 `form:"volume_decimal,high_precision"`
    85  }
    86  
    87  // Information about lodging that was purchased with this transaction.
    88  type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams struct {
    89  	// The time of checking into the lodging.
    90  	CheckInAt *int64 `form:"check_in_at"`
    91  	// The number of nights stayed at the lodging.
    92  	Nights *int64 `form:"nights"`
    93  }
    94  
    95  // The line items in the purchase.
    96  type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams struct {
    97  	Description *string  `form:"description"`
    98  	Quantity    *float64 `form:"quantity,high_precision"`
    99  	Total       *int64   `form:"total"`
   100  	UnitCost    *int64   `form:"unit_cost"`
   101  }
   102  
   103  // Additional purchase information that is optionally provided by the merchant.
   104  type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsParams struct {
   105  	// Information about the flight that was purchased with this transaction.
   106  	Flight *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams `form:"flight"`
   107  	// Information about fuel that was purchased with this transaction.
   108  	Fuel *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams `form:"fuel"`
   109  	// Information about lodging that was purchased with this transaction.
   110  	Lodging *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsLodgingParams `form:"lodging"`
   111  	// The line items in the purchase.
   112  	Receipt []*TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsReceiptParams `form:"receipt"`
   113  	// A merchant-specific order number.
   114  	Reference *string `form:"reference"`
   115  }
   116  
   117  // Allows the user to capture an arbitrary amount, also known as a forced capture.
   118  type TestHelpersIssuingTransactionCreateForceCaptureParams struct {
   119  	Params `form:"*"`
   120  	// The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
   121  	Amount *int64 `form:"amount"`
   122  	// Card associated with this transaction.
   123  	Card *string `form:"card"`
   124  	// The currency of the capture. If not provided, defaults to the currency of the card. 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).
   125  	Currency *string `form:"currency"`
   126  	// Specifies which fields in the response should be expanded.
   127  	Expand []*string `form:"expand"`
   128  	// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
   129  	MerchantData *TestHelpersIssuingTransactionCreateForceCaptureMerchantDataParams `form:"merchant_data"`
   130  	// Additional purchase information that is optionally provided by the merchant.
   131  	PurchaseDetails *TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsParams `form:"purchase_details"`
   132  }
   133  
   134  // AddExpand appends a new field to expand.
   135  func (p *TestHelpersIssuingTransactionCreateForceCaptureParams) AddExpand(f string) {
   136  	p.Expand = append(p.Expand, &f)
   137  }
   138  
   139  // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
   140  type TestHelpersIssuingTransactionCreateUnlinkedRefundMerchantDataParams struct {
   141  	// A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
   142  	Category *string `form:"category"`
   143  	// City where the seller is located
   144  	City *string `form:"city"`
   145  	// Country where the seller is located
   146  	Country *string `form:"country"`
   147  	// Name of the seller
   148  	Name *string `form:"name"`
   149  	// Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
   150  	NetworkID *string `form:"network_id"`
   151  	// Postal code where the seller is located
   152  	PostalCode *string `form:"postal_code"`
   153  	// State where the seller is located
   154  	State *string `form:"state"`
   155  	// An ID assigned by the seller to the location of the sale.
   156  	TerminalID *string `form:"terminal_id"`
   157  	// URL provided by the merchant on a 3DS request
   158  	URL *string `form:"url"`
   159  }
   160  
   161  // The legs of the trip.
   162  type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams struct {
   163  	// The three-letter IATA airport code of the flight's destination.
   164  	ArrivalAirportCode *string `form:"arrival_airport_code"`
   165  	// The airline carrier code.
   166  	Carrier *string `form:"carrier"`
   167  	// The three-letter IATA airport code that the flight departed from.
   168  	DepartureAirportCode *string `form:"departure_airport_code"`
   169  	// The flight number.
   170  	FlightNumber *string `form:"flight_number"`
   171  	// The flight's service class.
   172  	ServiceClass *string `form:"service_class"`
   173  	// Whether a stopover is allowed on this flight.
   174  	StopoverAllowed *bool `form:"stopover_allowed"`
   175  }
   176  
   177  // Information about the flight that was purchased with this transaction.
   178  type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParams struct {
   179  	// The time that the flight departed.
   180  	DepartureAt *int64 `form:"departure_at"`
   181  	// The name of the passenger.
   182  	PassengerName *string `form:"passenger_name"`
   183  	// Whether the ticket is refundable.
   184  	Refundable *bool `form:"refundable"`
   185  	// The legs of the trip.
   186  	Segments []*TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightSegmentParams `form:"segments"`
   187  	// The travel agency that issued the ticket.
   188  	TravelAgency *string `form:"travel_agency"`
   189  }
   190  
   191  // Information about fuel that was purchased with this transaction.
   192  type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams struct {
   193  	// The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
   194  	Type *string `form:"type"`
   195  	// The units for `volume_decimal`. One of `us_gallon` or `liter`.
   196  	Unit *string `form:"unit"`
   197  	// The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
   198  	UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"`
   199  	// The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.
   200  	VolumeDecimal *float64 `form:"volume_decimal,high_precision"`
   201  }
   202  
   203  // Information about lodging that was purchased with this transaction.
   204  type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams struct {
   205  	// The time of checking into the lodging.
   206  	CheckInAt *int64 `form:"check_in_at"`
   207  	// The number of nights stayed at the lodging.
   208  	Nights *int64 `form:"nights"`
   209  }
   210  
   211  // The line items in the purchase.
   212  type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams struct {
   213  	Description *string  `form:"description"`
   214  	Quantity    *float64 `form:"quantity,high_precision"`
   215  	Total       *int64   `form:"total"`
   216  	UnitCost    *int64   `form:"unit_cost"`
   217  }
   218  
   219  // Additional purchase information that is optionally provided by the merchant.
   220  type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsParams struct {
   221  	// Information about the flight that was purchased with this transaction.
   222  	Flight *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParams `form:"flight"`
   223  	// Information about fuel that was purchased with this transaction.
   224  	Fuel *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams `form:"fuel"`
   225  	// Information about lodging that was purchased with this transaction.
   226  	Lodging *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsLodgingParams `form:"lodging"`
   227  	// The line items in the purchase.
   228  	Receipt []*TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsReceiptParams `form:"receipt"`
   229  	// A merchant-specific order number.
   230  	Reference *string `form:"reference"`
   231  }
   232  
   233  // Allows the user to refund an arbitrary amount, also known as a unlinked refund.
   234  type TestHelpersIssuingTransactionCreateUnlinkedRefundParams struct {
   235  	Params `form:"*"`
   236  	// The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
   237  	Amount *int64 `form:"amount"`
   238  	// Card associated with this unlinked refund transaction.
   239  	Card *string `form:"card"`
   240  	// The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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).
   241  	Currency *string `form:"currency"`
   242  	// Specifies which fields in the response should be expanded.
   243  	Expand []*string `form:"expand"`
   244  	// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
   245  	MerchantData *TestHelpersIssuingTransactionCreateUnlinkedRefundMerchantDataParams `form:"merchant_data"`
   246  	// Additional purchase information that is optionally provided by the merchant.
   247  	PurchaseDetails *TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsParams `form:"purchase_details"`
   248  }
   249  
   250  // AddExpand appends a new field to expand.
   251  func (p *TestHelpersIssuingTransactionCreateUnlinkedRefundParams) AddExpand(f string) {
   252  	p.Expand = append(p.Expand, &f)
   253  }