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.



518
519
520
# File 'lib/stripe/resources/issuing/transaction.rb', line 518

def fleet
  @fleet
end

#flightObject (readonly)

Information about the flight that was purchased with this transaction.



520
521
522
# File 'lib/stripe/resources/issuing/transaction.rb', line 520

def flight
  @flight
end

#fuelObject (readonly)

Information about fuel that was purchased with this transaction.



522
523
524
# File 'lib/stripe/resources/issuing/transaction.rb', line 522

def fuel
  @fuel
end

#lodgingObject (readonly)

Information about lodging that was purchased with this transaction.



524
525
526
# File 'lib/stripe/resources/issuing/transaction.rb', line 524

def lodging
  @lodging
end

#receiptObject (readonly)

The line items in the purchase.



526
527
528
# File 'lib/stripe/resources/issuing/transaction.rb', line 526

def receipt
  @receipt
end

#referenceObject (readonly)

A merchant-specific order number.



528
529
530
# File 'lib/stripe/resources/issuing/transaction.rb', line 528

def reference
  @reference
end

Class Method Details

.field_encodingsObject



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/stripe/resources/issuing/transaction.rb', line 544

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

.field_remappingsObject



540
541
542
# File 'lib/stripe/resources/issuing/transaction.rb', line 540

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



530
531
532
533
534
535
536
537
538
# File 'lib/stripe/resources/issuing/transaction.rb', line 530

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