Class: Stripe::OrderSubmitParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/order_submit_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(expand: nil, expected_total: nil) ⇒ OrderSubmitParams

Returns a new instance of OrderSubmitParams.



11
12
13
14
# File 'lib/stripe/params/order_submit_params.rb', line 11

def initialize(expand: nil, expected_total: nil)
  @expand = expand
  @expected_total = expected_total
end

Instance Attribute Details

#expandObject

Specifies which fields in the response should be expanded.



7
8
9
# File 'lib/stripe/params/order_submit_params.rb', line 7

def expand
  @expand
end

#expected_totalObject

‘expected_total` should always be set to the order’s ‘amount_total` field. If they don’t match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order.



9
10
11
# File 'lib/stripe/params/order_submit_params.rb', line 9

def expected_total
  @expected_total
end