class Io::Flow::V0::Models::PartnerTokenReference
Summary data for a given token
Attributes
environment[R]
id[R]
partner[R]
user[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::TokenReference::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 56178 def initialize(incoming={}) super(:discriminator => TokenReference::Types::PARTNER_TOKEN_REFERENCE) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :partner, :environment, :user], 'PartnerTokenReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @partner = (x = opts.delete(:partner); x.is_a?(::Io::Flow::V0::Models::TokenPartnerReference) ? x : ::Io::Flow::V0::Models::TokenPartnerReference.new(x)) @environment = (x = opts.delete(:environment); x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x)) @user = (x = opts.delete(:user); x.is_a?(::Io::Flow::V0::Models::UserReference) ? x : ::Io::Flow::V0::Models::UserReference.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56192 def copy(incoming={}) PartnerTokenReference.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56196 def subtype_to_hash { :id => id, :partner => partner.to_hash, :environment => environment.value, :user => user.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56188 def to_json JSON.dump(to_hash) end