Class: Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb

Defined Under Namespace

Classes: Fleet, Flight, Fuel, Healthcare, Lodging, Receipt

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(fleet: nil, flight: nil, fuel: nil, healthcare: nil, lodging: nil, receipt: nil, reference: nil) ⇒ PurchaseDetails

Returns a new instance of PurchaseDetails.



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 379

def initialize(
  fleet: nil,
  flight: nil,
  fuel: nil,
  healthcare: nil,
  lodging: nil,
  receipt: nil,
  reference: nil
)
  @fleet = fleet
  @flight = flight
  @fuel = fuel
  @healthcare = healthcare
  @lodging = lodging
  @receipt = receipt
  @reference = reference
end

Instance Attribute Details

#fleetObject

Fleet-specific information for transactions using Fleet cards.



365
366
367
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 365

def fleet
  @fleet
end

#flightObject

Information about the flight that was purchased with this transaction.



367
368
369
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 367

def flight
  @flight
end

#fuelObject

Information about fuel that was purchased with this transaction.



369
370
371
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 369

def fuel
  @fuel
end

#healthcareObject

Healthcare sub-amounts for IIAS-eligible transactions.



371
372
373
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 371

def healthcare
  @healthcare
end

#lodgingObject

Information about lodging that was purchased with this transaction.



373
374
375
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 373

def lodging
  @lodging
end

#receiptObject

The line items in the purchase.



375
376
377
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 375

def receipt
  @receipt
end

#referenceObject

A merchant-specific order number.



377
378
379
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 377

def reference
  @reference
end

Class Method Details

.field_encodingsObject



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb', line 397

def self.field_encodings
  @field_encodings = {
    fleet: {
      kind: :object,
      fields: {
        reported_breakdown: {
          kind: :object,
          fields: {
            fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } },
            non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } },
            tax: {
              kind: :object,
              fields: {
                local_amount_decimal: :decimal_string,
                national_amount_decimal: :decimal_string,
              },
            },
          },
        },
      },
    },
    fuel: {
      kind: :object,
      fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string },
    },
    receipt: {
      kind: :array,
      element: { kind: :object, fields: { quantity: :decimal_string } },
    },
  }
end