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.



27263
27264
27265
27266
27267
27268
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27263

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.



27261
27262
27263
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27261

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



27274
27275
27276
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27274

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

#subtype_to_hashObject



27278
27279
27280
27281
27282
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27278

def subtype_to_hash
  {
    :number => number
  }
end

#to_jsonObject



27270
27271
27272
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27270

def to_json
  JSON.dump(to_hash)
end