Class: Io::Flow::V0::Models::ActionUseSdkStripeV3
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Use the Stripe SDK v3 and handleCardAction. After the decision has been made, the payment request will be updated asynchronously. stripe.com/docs/js/payment_intents/handle_card_action
Instance Attribute Summary collapse
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#publishable_key ⇒ Object
readonly
Returns the value of attribute publishable_key.
Attributes inherited from Action
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ActionUseSdkStripeV3
constructor
A new instance of ActionUseSdkStripeV3.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Action
Constructor Details
#initialize(incoming = {}) ⇒ ActionUseSdkStripeV3
Returns a new instance of ActionUseSdkStripeV3.
27265 27266 27267 27268 27269 27270 27271 27272 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27265 def initialize(incoming={}) super(:type => Action::Types::ACTION_USE_SDK_STRIPE_V3) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:client_secret, :publishable_key], 'ActionUseSdkStripeV3') @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @client_secret = HttpClient::Preconditions.assert_class('client_secret', opts.delete(:client_secret), String) @publishable_key = HttpClient::Preconditions.assert_class('publishable_key', opts.delete(:publishable_key), String) end |
Instance Attribute Details
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
27263 27264 27265 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27263 def client_secret @client_secret end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
27263 27264 27265 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27263 def expires_at @expires_at end |
#publishable_key ⇒ Object (readonly)
Returns the value of attribute publishable_key.
27263 27264 27265 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27263 def publishable_key @publishable_key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
27278 27279 27280 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27278 def copy(incoming={}) ActionUseSdkStripeV3.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
27282 27283 27284 27285 27286 27287 27288 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27282 def subtype_to_hash { :expires_at => expires_at, :client_secret => client_secret, :publishable_key => publishable_key } end |
#to_json ⇒ Object
27274 27275 27276 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27274 def to_json JSON.dump(to_hash) end |