Class: Io::Flow::V0::Models::TaxReportType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TaxReportType
- 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 TaxReportType for this value, creating a new instance for an unknown value.
- .b2b ⇒ Object
- .consumer ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of TaxReportType for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ TaxReportType
constructor
A new instance of TaxReportType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TaxReportType
Returns a new instance of TaxReportType.
25228 25229 25230 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25228 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
25226 25227 25228 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25226 def value @value end |
Class Method Details
.ALL ⇒ Object
25248 25249 25250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25248 def TaxReportType.ALL @@all ||= [TaxReportType.consumer, TaxReportType.b2b] end |
.apply(value) ⇒ Object
Returns the instance of TaxReportType for this value, creating a new instance for an unknown value
25233 25234 25235 25236 25237 25238 25239 25240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25233 def TaxReportType.apply(value) if value.instance_of?(TaxReportType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TaxReportType.new(value)) end end |
.b2b ⇒ Object
25256 25257 25258 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25256 def TaxReportType.b2b @@_b2b ||= TaxReportType.new('b2b') end |
.consumer ⇒ Object
25252 25253 25254 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25252 def TaxReportType.consumer @@_consumer ||= TaxReportType.new('consumer') end |
.from_string(value) ⇒ Object
Returns the instance of TaxReportType for this value, or nil if not found
25243 25244 25245 25246 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25243 def TaxReportType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TaxReportType.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
25260 25261 25262 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25260 def to_hash value end |