Class: Io::Flow::V0::Models::DetailedTaxRegistration
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::DetailedTaxRegistration
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Result of looking up a specific tax registration number. Includes details of both the consumer request and the VIES response.
Instance Attribute Summary collapse
-
#company_name_match_result ⇒ Object
readonly
Returns the value of attribute company_name_match_result.
-
#company_name_match_result_reason ⇒ Object
readonly
Returns the value of attribute company_name_match_result_reason.
-
#consumer_company_name ⇒ Object
readonly
Returns the value of attribute consumer_company_name.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#vies_company_address ⇒ Object
readonly
Returns the value of attribute vies_company_address.
-
#vies_company_name ⇒ Object
readonly
Returns the value of attribute vies_company_name.
-
#vies_result ⇒ Object
readonly
Returns the value of attribute vies_result.
-
#vies_result_reason ⇒ Object
readonly
Returns the value of attribute vies_result_reason.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ DetailedTaxRegistration
constructor
A new instance of DetailedTaxRegistration.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ DetailedTaxRegistration
Returns a new instance of DetailedTaxRegistration.
29654 29655 29656 29657 29658 29659 29660 29661 29662 29663 29664 29665 29666 29667 29668 29669 29670 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29654 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :key, :number, :country, :success, :timestamp, :vies_result, :company_name_match_result], 'DetailedTaxRegistration') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) @consumer_company_name = (x = opts.delete(:consumer_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('consumer_company_name', x, String)) @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String) @success = HttpClient::Preconditions.assert_boolean('success', opts.delete(:success)) = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @vies_result = (x = opts.delete(:vies_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x)) @vies_result_reason = (x = opts.delete(:vies_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_result_reason', x, String)) @vies_company_name = (x = opts.delete(:vies_company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_name', x, String)) @vies_company_address = (x = opts.delete(:vies_company_address); x.nil? ? nil : HttpClient::Preconditions.assert_class('vies_company_address', x, String)) @company_name_match_result = (x = opts.delete(:company_name_match_result); x.is_a?(::Io::Flow::V0::Models::TaxVerificationResult) ? x : ::Io::Flow::V0::Models::TaxVerificationResult.apply(x)) @company_name_match_result_reason = (x = opts.delete(:company_name_match_result_reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('company_name_match_result_reason', x, String)) end |
Instance Attribute Details
#company_name_match_result ⇒ Object (readonly)
Returns the value of attribute company_name_match_result.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def company_name_match_result @company_name_match_result end |
#company_name_match_result_reason ⇒ Object (readonly)
Returns the value of attribute company_name_match_result_reason.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def company_name_match_result_reason @company_name_match_result_reason end |
#consumer_company_name ⇒ Object (readonly)
Returns the value of attribute consumer_company_name.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def consumer_company_name @consumer_company_name end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def country @country end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def key @key end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def number @number end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def success @success end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def end |
#vies_company_address ⇒ Object (readonly)
Returns the value of attribute vies_company_address.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def vies_company_address @vies_company_address end |
#vies_company_name ⇒ Object (readonly)
Returns the value of attribute vies_company_name.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def vies_company_name @vies_company_name end |
#vies_result ⇒ Object (readonly)
Returns the value of attribute vies_result.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def vies_result @vies_result end |
#vies_result_reason ⇒ Object (readonly)
Returns the value of attribute vies_result_reason.
29652 29653 29654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29652 def vies_result_reason @vies_result_reason end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29676 29677 29678 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29676 def copy(incoming={}) DetailedTaxRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29680 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29680 def to_hash { :id => id, :key => key, :consumer_company_name => consumer_company_name, :number => number, :country => country, :success => success, :timestamp => , :vies_result => vies_result.value, :vies_result_reason => vies_result_reason, :vies_company_name => vies_company_name, :vies_company_address => vies_company_address, :company_name_match_result => company_name_match_result.value, :company_name_match_result_reason => company_name_match_result_reason } end |
#to_json ⇒ Object
29672 29673 29674 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29672 def to_json JSON.dump(to_hash) end |