class Io::Flow::V0::Models::ActionUseSdkApplepayJsCreateSession
Use the Apple Pay Javascript SDK to instantiate an Apple Pay session on the browser. This will start loading the Apple Pay experience, which triggers a validation check from Apple. The results of this operation are a validation request which will be used to update the payment request with a ‘payment_method_data` of type `validate_applepay`. developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/2320659-applepaysession
Attributes
expires_at[R]
merchant_identifier[R]
payment_data_request[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::Action::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 29276 def initialize(incoming={}) super(:type => Action::Types::ACTION_USE_SDK_APPLEPAY_JS_CREATE_SESSION) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:merchant_identifier, :payment_data_request], 'ActionUseSdkApplepayJsCreateSession') @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @merchant_identifier = HttpClient::Preconditions.assert_class('merchant_identifier', opts.delete(:merchant_identifier), String) @payment_data_request = (x = opts.delete(:payment_data_request); x.is_a?(::Io::Flow::Apple::Pay::V0::Models::ApplePayPaymentInfo) ? x : ::Io::Flow::Apple::Pay::V0::Models::ApplePayPaymentInfo.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29289 def copy(incoming={}) ActionUseSdkApplepayJsCreateSession.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29293 def subtype_to_hash { :expires_at => expires_at, :merchant_identifier => merchant_identifier, :payment_data_request => payment_data_request.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 29285 def to_json JSON.dump(to_hash) end