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.



23053
23054
23055
23056
23057
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23053

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

#numberObject (readonly)

Returns the value of attribute number.



23051
23052
23053
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23051

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



23063
23064
23065
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23063

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

#to_hashObject



23067
23068
23069
23070
23071
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23067

def to_hash
  {
    :number => number
  }
end

#to_jsonObject



23059
23060
23061
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23059

def to_json
  JSON.dump(to_hash)
end