Class: Io::Flow::V0::Models::OrganizationTokenV2Reference
- Inherits:
-
TokenReference
- Object
- TokenReference
- Io::Flow::V0::Models::OrganizationTokenV2Reference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
Attributes inherited from TokenReference
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrganizationTokenV2Reference
constructor
A new instance of OrganizationTokenV2Reference.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from TokenReference
Constructor Details
#initialize(incoming = {}) ⇒ OrganizationTokenV2Reference
Returns a new instance of OrganizationTokenV2Reference.
55664 55665 55666 55667 55668 55669 55670 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55664 def initialize(incoming={}) super(:discriminator => TokenReference::Types::ORGANIZATION_TOKEN_V2_REFERENCE) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :organization], 'OrganizationTokenV2Reference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @organization = (x = opts.delete(:organization); x.is_a?(::Io::Flow::V0::Models::OrganizationReference) ? x : ::Io::Flow::V0::Models::OrganizationReference.new(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
55662 55663 55664 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55662 def id @id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
55662 55663 55664 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55662 def organization @organization end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
55676 55677 55678 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55676 def copy(incoming={}) OrganizationTokenV2Reference.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
55680 55681 55682 55683 55684 55685 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55680 def subtype_to_hash { :id => id, :organization => organization.to_hash } end |
#to_json ⇒ Object
55672 55673 55674 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55672 def to_json JSON.dump(to_hash) end |