Class: Io::Flow::V0::Models::PaymentMethodDataAuthorizeKlarnaResultSuccess

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

Instance Attribute Summary collapse

Attributes inherited from PaymentMethodDataAuthorizeKlarnaResult

#type

Instance Method Summary collapse

Methods inherited from PaymentMethodDataAuthorizeKlarnaResult

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentMethodDataAuthorizeKlarnaResultSuccess

Returns a new instance of PaymentMethodDataAuthorizeKlarnaResultSuccess.



57312
57313
57314
57315
57316
57317
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57312

def initialize(incoming={})
  super(:type => PaymentMethodDataAuthorizeKlarnaResult::Types::PAYMENT_METHOD_DATA_AUTHORIZE_KLARNA_RESULT_SUCCESS)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:authorization_token], 'PaymentMethodDataAuthorizeKlarnaResultSuccess')
  @authorization_token = HttpClient::Preconditions.assert_class('authorization_token', opts.delete(:authorization_token), String)
end

Instance Attribute Details

#authorization_tokenObject (readonly)

Returns the value of attribute authorization_token.



57310
57311
57312
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57310

def authorization_token
  @authorization_token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57323
57324
57325
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57323

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

#subtype_to_hashObject



57327
57328
57329
57330
57331
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57327

def subtype_to_hash
  {
    :authorization_token => authorization_token
  }
end

#to_jsonObject



57319
57320
57321
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57319

def to_json
  JSON.dump(to_hash)
end