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.



52987
52988
52989
52990
52991
52992
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52987

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.



52985
52986
52987
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52985

def authorization_token
  @authorization_token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



52998
52999
53000
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52998

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

#subtype_to_hashObject



53002
53003
53004
53005
53006
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53002

def subtype_to_hash
  {
    :authorization_token => authorization_token
  }
end

#to_jsonObject



52994
52995
52996
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52994

def to_json
  JSON.dump(to_hash)
end