Class: Io::Flow::V0::Models::PartnerCenterForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PartnerCenterForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#fees ⇒ Object
readonly
Returns the value of attribute fees.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#partner_id ⇒ Object
readonly
Returns the value of attribute partner_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PartnerCenterForm
constructor
A new instance of PartnerCenterForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PartnerCenterForm
Returns a new instance of PartnerCenterForm.
38172 38173 38174 38175 38176 38177 38178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38172 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:partner_id], 'PartnerCenterForm') @partner_id = HttpClient::Preconditions.assert_class('partner_id', opts.delete(:partner_id), String) @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String)) @fees = (x = opts.delete(:fees); x.nil? ? nil : HttpClient::Preconditions.assert_class('fees', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PartnerCenterFee) ? x : ::Io::Flow::V0::Models::PartnerCenterFee.from_json(x)) }) end |
Instance Attribute Details
#fees ⇒ Object (readonly)
Returns the value of attribute fees.
38170 38171 38172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38170 def fees @fees end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
38170 38171 38172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38170 def number @number end |
#partner_id ⇒ Object (readonly)
Returns the value of attribute partner_id.
38170 38171 38172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38170 def partner_id @partner_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38184 38185 38186 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38184 def copy(incoming={}) PartnerCenterForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38188 38189 38190 38191 38192 38193 38194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38188 def to_hash { :partner_id => partner_id, :number => number, :fees => fees.nil? ? nil : fees.map { |o| o.to_hash } } end |
#to_json ⇒ Object
38180 38181 38182 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38180 def to_json JSON.dump(to_hash) end |