Class: Io::Flow::V0::Models::ActionUseSdkGooglepay
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Use a Google Pay SDK to render the Google Pay button and the Google Pay experience. The result of this operation will be a Google Pay token that will be used to update the payment request with a ‘payment_method_data` of type `authorize_googlepay`. developers.google.com/pay/api/web/guides/tutorial#js-load
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#payment_data_request ⇒ Object
readonly
Returns the value of attribute payment_data_request.
Attributes inherited from Action
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ActionUseSdkGooglepay
constructor
A new instance of ActionUseSdkGooglepay.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Action
Constructor Details
#initialize(incoming = {}) ⇒ ActionUseSdkGooglepay
Returns a new instance of ActionUseSdkGooglepay.
25588 25589 25590 25591 25592 25593 25594 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25588 def initialize(incoming={}) super(:type => Action::Types::ACTION_USE_SDK_GOOGLEPAY) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_data_request], 'ActionUseSdkGooglepay') @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_data_request = (x = opts.delete(:payment_data_request); x.is_a?(::Io::Flow::Google::Pay::V0::Models::PaymentDataRequest) ? x : ::Io::Flow::Google::Pay::V0::Models::PaymentDataRequest.new(x)) end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
25586 25587 25588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25586 def expires_at @expires_at end |
#payment_data_request ⇒ Object (readonly)
Returns the value of attribute payment_data_request.
25586 25587 25588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25586 def payment_data_request @payment_data_request end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25600 25601 25602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25600 def copy(incoming={}) ActionUseSdkGooglepay.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
25604 25605 25606 25607 25608 25609 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25604 def subtype_to_hash { :expires_at => expires_at, :payment_data_request => payment_data_request.to_hash } end |
#to_json ⇒ Object
25596 25597 25598 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25596 def to_json JSON.dump(to_hash) end |