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.



28868
28869
28870
28871
28872
28873
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28868

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.



28866
28867
28868
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28866

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



28879
28880
28881
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28879

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

#subtype_to_hashObject



28883
28884
28885
28886
28887
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28883

def subtype_to_hash
  {
    :number => number
  }
end

#to_jsonObject



28875
28876
28877
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28875

def to_json
  JSON.dump(to_hash)
end