Class: Io::Flow::V0::Models::SurchargeResponsiblePartyDisplay
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SurchargeResponsiblePartyDisplay
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Surcharge responsible parties that can be displayed and selected
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#responsible_party ⇒ Object
readonly
Returns the value of attribute responsible_party.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SurchargeResponsiblePartyDisplay
constructor
A new instance of SurchargeResponsiblePartyDisplay.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SurchargeResponsiblePartyDisplay
Returns a new instance of SurchargeResponsiblePartyDisplay.
49894 49895 49896 49897 49898 49899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49894 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name, :responsible_party], 'SurchargeResponsiblePartyDisplay') @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @responsible_party = (x = opts.delete(:responsible_party); x.is_a?(::Io::Flow::V0::Models::SurchargeResponsibleParty) ? x : ::Io::Flow::V0::Models::SurchargeResponsibleParty.apply(x)) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
49892 49893 49894 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49892 def name @name end |
#responsible_party ⇒ Object (readonly)
Returns the value of attribute responsible_party.
49892 49893 49894 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49892 def responsible_party @responsible_party end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49905 49906 49907 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49905 def copy(incoming={}) SurchargeResponsiblePartyDisplay.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49909 49910 49911 49912 49913 49914 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49909 def to_hash { :name => name, :responsible_party => responsible_party.value } end |
#to_json ⇒ Object
49901 49902 49903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49901 def to_json JSON.dump(to_hash) end |