Class: Io::Flow::V0::Models::AuthorizationPayload
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AuthorizationPayload
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Used to complete an inline authorization like Google Pay or Apple Pay.
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AuthorizationPayload
constructor
A new instance of AuthorizationPayload.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AuthorizationPayload
Returns a new instance of AuthorizationPayload.
31187 31188 31189 31190 31191 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31187 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:parameters], 'AuthorizationPayload') @parameters = (x = opts.delete(:parameters); x.is_a?(::Io::Flow::V0::Models::AuthorizationPayloadParameters) ? x : ::Io::Flow::V0::Models::AuthorizationPayloadParameters.from_json(x)) end |
Instance Attribute Details
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
31185 31186 31187 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31185 def parameters @parameters end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31197 31198 31199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31197 def copy(incoming={}) AuthorizationPayload.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31201 31202 31203 31204 31205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31201 def to_hash { :parameters => parameters.to_hash } end |
#to_json ⇒ Object
31193 31194 31195 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31193 def to_json JSON.dump(to_hash) end |