Class: Stripe::Issuing::Transaction::PurchaseDetails

Inherits:
StripeObject
  • Object
show all
Defined in:
lib/stripe/resources/issuing/transaction.rb

Defined Under Namespace

Classes: Fleet, Flight, Fuel, Lodging, Receipt

Constant Summary

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#fleetObject (readonly)

Fleet-specific information for transactions using Fleet cards.



457
458
459
# File 'lib/stripe/resources/issuing/transaction.rb', line 457

def fleet
  @fleet
end

#flightObject (readonly)

Information about the flight that was purchased with this transaction.



459
460
461
# File 'lib/stripe/resources/issuing/transaction.rb', line 459

def flight
  @flight
end

#fuelObject (readonly)

Information about fuel that was purchased with this transaction.



461
462
463
# File 'lib/stripe/resources/issuing/transaction.rb', line 461

def fuel
  @fuel
end

#lodgingObject (readonly)

Information about lodging that was purchased with this transaction.



463
464
465
# File 'lib/stripe/resources/issuing/transaction.rb', line 463

def lodging
  @lodging
end

#receiptObject (readonly)

The line items in the purchase.



465
466
467
# File 'lib/stripe/resources/issuing/transaction.rb', line 465

def receipt
  @receipt
end

#referenceObject (readonly)

A merchant-specific order number.



467
468
469
# File 'lib/stripe/resources/issuing/transaction.rb', line 467

def reference
  @reference
end

Class Method Details

.field_encodingsObject



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/stripe/resources/issuing/transaction.rb', line 483

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 },
    },
  }
end

.field_remappingsObject



479
480
481
# File 'lib/stripe/resources/issuing/transaction.rb', line 479

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



469
470
471
472
473
474
475
476
477
# File 'lib/stripe/resources/issuing/transaction.rb', line 469

def self.inner_class_types
  @inner_class_types = {
    fleet: Fleet,
    flight: Flight,
    fuel: Fuel,
    lodging: Lodging,
    receipt: Receipt,
  }
end