Class: Stripe::Order::SubmitParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

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

Returns a new instance of SubmitParams.



2690
2691
2692
2693
# File 'lib/stripe/resources/order.rb', line 2690

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.



2686
2687
2688
# File 'lib/stripe/resources/order.rb', line 2686

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.



2688
2689
2690
# File 'lib/stripe/resources/order.rb', line 2688

def expected_total
  @expected_total
end