Class: Stripe::TestHelpers::Issuing::AuthorizationCreateParams

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

Defined Under Namespace

Classes: AmountDetails, Fleet, Fuel, Healthcare, MerchantData, NetworkData, RiskAssessment, VerificationData

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, amount_details: nil, authorization_method: nil, card: nil, currency: nil, expand: nil, fleet: nil, fraud_disputability_likelihood: nil, fuel: nil, healthcare: nil, is_amount_controllable: nil, merchant_amount: nil, merchant_currency: nil, merchant_data: nil, network_data: nil, risk_assessment: nil, verification_data: nil, wallet: nil) ⇒ AuthorizationCreateParams

Returns a new instance of AuthorizationCreateParams.



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 438

def initialize(
  amount: nil,
  amount_details: nil,
  authorization_method: nil,
  card: nil,
  currency: nil,
  expand: nil,
  fleet: nil,
  fraud_disputability_likelihood: nil,
  fuel: nil,
  healthcare: nil,
  is_amount_controllable: nil,
  merchant_amount: nil,
  merchant_currency: nil,
  merchant_data: nil,
  network_data: nil,
  risk_assessment: nil,
  verification_data: nil,
  wallet: nil
)
  @amount = amount
  @amount_details = amount_details
  @authorization_method = authorization_method
  @card = card
  @currency = currency
  @expand = expand
  @fleet = fleet
  @fraud_disputability_likelihood = fraud_disputability_likelihood
  @fuel = fuel
  @healthcare = healthcare
  @is_amount_controllable = is_amount_controllable
  @merchant_amount = merchant_amount
  @merchant_currency = merchant_currency
  @merchant_data = merchant_data
  @network_data = network_data
  @risk_assessment = risk_assessment
  @verification_data = verification_data
  @wallet = wallet
end

Instance Attribute Details

#amountObject

The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the smallest currency unit.



402
403
404
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 402

def amount
  @amount
end

#amount_detailsObject

Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit.



404
405
406
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 404

def amount_details
  @amount_details
end

#authorization_methodObject

How the card details were provided. Defaults to online.



406
407
408
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 406

def authorization_method
  @authorization_method
end

#cardObject

Card associated with this authorization.



408
409
410
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 408

def card
  @card
end

#currencyObject

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



410
411
412
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 410

def currency
  @currency
end

#expandObject

Specifies which fields in the response should be expanded.



412
413
414
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 412

def expand
  @expand
end

#fleetObject

Fleet-specific information for authorizations using Fleet cards.



414
415
416
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 414

def fleet
  @fleet
end

#fraud_disputability_likelihoodObject

Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules.



416
417
418
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 416

def fraud_disputability_likelihood
  @fraud_disputability_likelihood
end

#fuelObject

Information about fuel that was purchased with this transaction.



418
419
420
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 418

def fuel
  @fuel
end

#healthcareObject

Healthcare-specific information for IIAS-eligible authorizations.



420
421
422
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 420

def healthcare
  @healthcare
end

#is_amount_controllableObject

If set true, you may provide amount to control how much to hold for the authorization.



422
423
424
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 422

def is_amount_controllable
  @is_amount_controllable
end

#merchant_amountObject

The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the smallest currency unit.



424
425
426
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 424

def merchant_amount
  @merchant_amount
end

#merchant_currencyObject

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



426
427
428
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 426

def merchant_currency
  @merchant_currency
end

#merchant_dataObject

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



428
429
430
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 428

def merchant_data
  @merchant_data
end

#network_dataObject

Details about the authorization, such as identifiers, set by the card network.



430
431
432
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 430

def network_data
  @network_data
end

#risk_assessmentObject

Stripe’s assessment of the fraud risk for this authorization.



432
433
434
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 432

def risk_assessment
  @risk_assessment
end

#verification_dataObject

Verifications that Stripe performed on information that the cardholder provided to the merchant.



434
435
436
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 434

def verification_data
  @verification_data
end

#walletObject

The digital wallet used for this transaction. One of apple_pay, google_pay, or samsung_pay. Will populate as null when no digital wallet was utilized.



436
437
438
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 436

def wallet
  @wallet
end

Class Method Details

.field_encodingsObject



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
503
504
# File 'lib/stripe/params/test_helpers/issuing/authorization_create_params.rb', line 478

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