Class: Io::Flow::V0::Models::AuthorizationOrderReference

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

Instance Attribute Summary collapse

Attributes inherited from PaymentOrderReference

#discriminator

Instance Method Summary collapse

Methods inherited from PaymentOrderReference

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AuthorizationOrderReference

Returns a new instance of AuthorizationOrderReference.



31159
31160
31161
31162
31163
31164
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31159

def initialize(incoming={})
  super(:discriminator => PaymentOrderReference::Types::AUTHORIZATION_ORDER_REFERENCE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:number], 'AuthorizationOrderReference')
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
end

Instance Attribute Details

#numberObject (readonly)

Returns the value of attribute number.



31157
31158
31159
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31157

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



31170
31171
31172
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31170

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

#subtype_to_hashObject



31174
31175
31176
31177
31178
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31174

def subtype_to_hash
  {
    :number => number
  }
end

#to_jsonObject



31166
31167
31168
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31166

def to_json
  JSON.dump(to_hash)
end