Class: Io::Flow::V0::Models::CryptopayAuthorizationDetails

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

Overview

Represents online payment

Instance Attribute Summary collapse

Attributes inherited from OnlineAuthorizationDetails

#discriminator

Instance Method Summary collapse

Methods inherited from OnlineAuthorizationDetails

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ CryptopayAuthorizationDetails

Returns a new instance of CryptopayAuthorizationDetails.



37787
37788
37789
37790
37791
37792
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37787

def initialize(incoming={})
  super(:discriminator => OnlineAuthorizationDetails::Types::CRYPTOPAY_AUTHORIZATION_DETAILS)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:payment_id], 'CryptopayAuthorizationDetails')
  @payment_id = HttpClient::Preconditions.assert_class('payment_id', opts.delete(:payment_id), String)
end

Instance Attribute Details

#payment_idObject (readonly)

Returns the value of attribute payment_id.



37785
37786
37787
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37785

def payment_id
  @payment_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



37798
37799
37800
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37798

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

#subtype_to_hashObject



37802
37803
37804
37805
37806
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37802

def subtype_to_hash
  {
    :payment_id => payment_id
  }
end

#to_jsonObject



37794
37795
37796
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37794

def to_json
  JSON.dump(to_hash)
end