Class: Io::Flow::V0::Models::SurchargeResponsibleParty
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SurchargeResponsibleParty
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of SurchargeResponsibleParty for this value, creating a new instance for an unknown value.
-
.customer ⇒ Object
The customer pays for this surcharge.
-
.from_string(value) ⇒ Object
Returns the instance of SurchargeResponsibleParty for this value, or nil if not found.
-
.organization ⇒ Object
The merchant pays for this surcharge.
Instance Method Summary collapse
-
#initialize(value) ⇒ SurchargeResponsibleParty
constructor
A new instance of SurchargeResponsibleParty.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ SurchargeResponsibleParty
Returns a new instance of SurchargeResponsibleParty.
19301 19302 19303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19301 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19299 19300 19301 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19299 def value @value end |
Class Method Details
.ALL ⇒ Object
19321 19322 19323 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19321 def SurchargeResponsibleParty.ALL @@all ||= [SurchargeResponsibleParty.organization, SurchargeResponsibleParty.customer] end |
.apply(value) ⇒ Object
Returns the instance of SurchargeResponsibleParty for this value, creating a new instance for an unknown value
19306 19307 19308 19309 19310 19311 19312 19313 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19306 def SurchargeResponsibleParty.apply(value) if value.instance_of?(SurchargeResponsibleParty) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || SurchargeResponsibleParty.new(value)) end end |
.customer ⇒ Object
The customer pays for this surcharge
19331 19332 19333 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19331 def SurchargeResponsibleParty.customer @@_customer ||= SurchargeResponsibleParty.new('customer') end |
.from_string(value) ⇒ Object
Returns the instance of SurchargeResponsibleParty for this value, or nil if not found
19316 19317 19318 19319 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19316 def SurchargeResponsibleParty.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SurchargeResponsibleParty.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
The merchant pays for this surcharge
19326 19327 19328 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19326 def SurchargeResponsibleParty.organization @@_organization ||= SurchargeResponsibleParty.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
19335 19336 19337 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19335 def to_hash value end |