Class: Io::Flow::V0::Models::ActionUseSdkApplepayJsCompleteValidation
- Inherits:
-
Action
- Object
- Action
- Io::Flow::V0::Models::ActionUseSdkApplepayJsCompleteValidation
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Use the Apple Pay Javascript SDK to complete the validation processor for an Apple Pay session on the browser. This allows Apple to render their payment sheet to the consumer, so they can authenticate and pick their payment method. The results of this operation will be an Apple Pay token that is used to update the payment request with a ‘payment_method_data` of type `authorize_applepay`. developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778015-completemerchantvalidation
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#payment_session ⇒ Object
readonly
Returns the value of attribute payment_session.
Attributes inherited from Action
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ActionUseSdkApplepayJsCompleteValidation
constructor
A new instance of ActionUseSdkApplepayJsCompleteValidation.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Action
Constructor Details
#initialize(incoming = {}) ⇒ ActionUseSdkApplepayJsCompleteValidation
Returns a new instance of ActionUseSdkApplepayJsCompleteValidation.
29241 29242 29243 29244 29245 29246 29247 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29241 def initialize(incoming={}) super(:type => Action::Types::ACTION_USE_SDK_APPLEPAY_JS_COMPLETE_VALIDATION) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_session], 'ActionUseSdkApplepayJsCompleteValidation') @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @payment_session = HttpClient::Preconditions.assert_class('payment_session', HttpClient::Helper.to_object(opts.delete(:payment_session)), Hash) end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
29239 29240 29241 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29239 def expires_at @expires_at end |
#payment_session ⇒ Object (readonly)
Returns the value of attribute payment_session.
29239 29240 29241 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29239 def payment_session @payment_session end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29253 29254 29255 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29253 def copy(incoming={}) ActionUseSdkApplepayJsCompleteValidation.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
29257 29258 29259 29260 29261 29262 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29257 def subtype_to_hash { :expires_at => expires_at, :payment_session => payment_session } end |
#to_json ⇒ Object
29249 29250 29251 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29249 def to_json JSON.dump(to_hash) end |