Class: Stripe::OrderService::SubmitParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/order_service.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.



2197
2198
2199
2200
# File 'lib/stripe/services/order_service.rb', line 2197

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.



2193
2194
2195
# File 'lib/stripe/services/order_service.rb', line 2193

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.



2195
2196
2197
# File 'lib/stripe/services/order_service.rb', line 2195

def expected_total
  @expected_total
end