Class: Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fuel

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

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(industry_product_code: nil, quantity_decimal: nil, type: nil, unit: nil, unit_cost_decimal: nil) ⇒ Fuel

Returns a new instance of Fuel.



262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 262

def initialize(
  industry_product_code: nil,
  quantity_decimal: nil,
  type: nil,
  unit: nil,
  unit_cost_decimal: nil
)
  @industry_product_code = industry_product_code
  @quantity_decimal = quantity_decimal
  @type = type
  @unit = unit
  @unit_cost_decimal = unit_cost_decimal
end

Instance Attribute Details

#industry_product_codeObject

[Conexxus Payment System Product Code](www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.



252
253
254
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 252

def industry_product_code
  @industry_product_code
end

#quantity_decimalObject

The quantity of ‘unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.



254
255
256
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 254

def quantity_decimal
  @quantity_decimal
end

#typeObject

The type of fuel that was purchased. One of diesel, unleaded_plus, unleaded_regular, unleaded_super, or other.



256
257
258
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 256

def type
  @type
end

#unitObject

The units for quantity_decimal. One of charging_minute, imperial_gallon, kilogram, kilowatt_hour, liter, pound, us_gallon, or other.



258
259
260
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 258

def unit
  @unit
end

#unit_cost_decimalObject

The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.



260
261
262
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 260

def unit_cost_decimal
  @unit_cost_decimal
end

Class Method Details

.field_encodingsObject



276
277
278
279
280
281
# File 'lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb', line 276

def self.field_encodings
  @field_encodings = {
    quantity_decimal: :decimal_string,
    unit_cost_decimal: :decimal_string,
  }
end