Class: Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet

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

Defined Under Namespace

Classes: CardholderPromptData, ReportedBreakdown

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(cardholder_prompt_data: nil, purchase_type: nil, reported_breakdown: nil, service_type: nil) ⇒ Fleet

Returns a new instance of Fleet.



118
119
120
121
122
123
124
125
126
127
128
# File 'lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb', line 118

def initialize(
  cardholder_prompt_data: nil,
  purchase_type: nil,
  reported_breakdown: nil,
  service_type: nil
)
  @cardholder_prompt_data = cardholder_prompt_data
  @purchase_type = purchase_type
  @reported_breakdown = reported_breakdown
  @service_type = service_type
end

Instance Attribute Details

#cardholder_prompt_dataObject

Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.



110
111
112
# File 'lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb', line 110

def cardholder_prompt_data
  @cardholder_prompt_data
end

#purchase_typeObject

The type of purchase. One of ‘fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.



112
113
114
# File 'lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb', line 112

def purchase_type
  @purchase_type
end

#reported_breakdownObject

More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.



114
115
116
# File 'lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb', line 114

def reported_breakdown
  @reported_breakdown
end

#service_typeObject

The type of fuel service. One of ‘non_fuel_transaction`, `full_service`, or `self_service`.



116
117
118
# File 'lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb', line 116

def service_type
  @service_type
end

Class Method Details

.field_encodingsObject



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb', line 130

def self.field_encodings
  @field_encodings = {
    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,
          },
        },
      },
    },
  }
end