Class: Io::Flow::V0::Models::GooglePayAuthorizationPayload

Inherits:
AuthorizationPayloadParameters show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from AuthorizationPayloadParameters

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationPayloadParameters

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ GooglePayAuthorizationPayload

Returns a new instance of GooglePayAuthorizationPayload.



44343
44344
44345
44346
44347
44348
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44343

def initialize(incoming={})
  super(:discriminator => AuthorizationPayloadParameters::Types::GOOGLE_PAY_AUTHORIZATION_PAYLOAD)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:payload], 'GooglePayAuthorizationPayload')
  @payload = HttpClient::Preconditions.assert_class('payload', HttpClient::Helper.to_object(opts.delete(:payload)), Hash)
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



44341
44342
44343
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44341

def payload
  @payload
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



44354
44355
44356
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44354

def copy(incoming={})
  GooglePayAuthorizationPayload.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



44358
44359
44360
44361
44362
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44358

def subtype_to_hash
  {
    :payload => payload
  }
end

#to_jsonObject



44350
44351
44352
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44350

def to_json
  JSON.dump(to_hash)
end