Class: Io::Flow::V0::Models::CustomerReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CustomerReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CustomerReference
constructor
A new instance of CustomerReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CustomerReference
27086 27087 27088 27089 27090 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27086 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:number], 'CustomerReference') @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
27084 27085 27086 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27084 def number @number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
27096 27097 27098 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27096 def copy(incoming={}) CustomerReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
27100 27101 27102 27103 27104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27100 def to_hash { :number => number } end |
#to_json ⇒ Object
27092 27093 27094 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27092 def to_json JSON.dump(to_hash) end |