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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ AuthorizationOrderReference

Returns a new instance of AuthorizationOrderReference.



9851
9852
9853
9854
9855
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9851

def initialize(incoming={})
  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

#number ⇒ Object (readonly)

Returns the value of attribute number.



9849
9850
9851
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9849

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



9861
9862
9863
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9861

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

#to_hash ⇒ Object



9865
9866
9867
9868
9869
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9865

def to_hash
  {
    :number => number
  }
end

#to_json ⇒ Object



9857
9858
9859
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9857

def to_json
  JSON.dump(to_hash)
end