Class: Stripe::Issuing::TransactionCreateForceCaptureParams

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

Defined Under Namespace

Classes: MerchantData, NetworkData, PurchaseDetails

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(amount: nil, card: nil, currency: nil, expand: nil, merchant_data: nil, network_data: nil, purchase_details: nil) ⇒ TransactionCreateForceCaptureParams

Returns a new instance of TransactionCreateForceCaptureParams.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 449

def initialize(
  amount: nil,
  card: nil,
  currency: nil,
  expand: nil,
  merchant_data: nil,
  network_data: nil,
  purchase_details: nil
)
  @amount = amount
  @card = card
  @currency = currency
  @expand = expand
  @merchant_data = merchant_data
  @network_data = network_data
  @purchase_details = purchase_details
end

Instance Attribute Details

#amountObject

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.



435
436
437
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 435

def amount
  @amount
end

#cardObject

Card associated with this transaction.



437
438
439
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 437

def card
  @card
end

#currencyObject

The currency of the capture. If not provided, defaults to the currency of the card. Three-letter ISO currency code, in lowercase. Must be a supported currency.



439
440
441
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 439

def currency
  @currency
end

#expandObject

Specifies which fields in the response should be expanded.



441
442
443
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 441

def expand
  @expand
end

#merchant_dataObject

Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.



443
444
445
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 443

def merchant_data
  @merchant_data
end

#network_dataObject

Details about the transaction, such as processing dates, set by the card network.



445
446
447
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 445

def network_data
  @network_data
end

#purchase_detailsObject

Additional purchase information that is optionally provided by the merchant.



447
448
449
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 447

def purchase_details
  @purchase_details
end

Class Method Details

.field_encodingsObject



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# File 'lib/stripe/params/issuing/transaction_create_force_capture_params.rb', line 467

def self.field_encodings
  @field_encodings = {
    purchase_details: {
      kind: :object,
      fields: {
        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