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.
29511 29512 29513 29514 29515 29516 29517 29518 29519 29520 29521 29522 29523 29524 29525 29526 29527 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29511 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.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 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.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 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.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def consumer_company_name @consumer_company_name end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def country @country end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def key @key end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def number @number end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def success @success end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def end |
#vies_company_address ⇒ Object (readonly)
Returns the value of attribute vies_company_address.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def vies_company_address @vies_company_address end |
#vies_company_name ⇒ Object (readonly)
Returns the value of attribute vies_company_name.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def vies_company_name @vies_company_name end |
#vies_result ⇒ Object (readonly)
Returns the value of attribute vies_result.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def vies_result @vies_result end |
#vies_result_reason ⇒ Object (readonly)
Returns the value of attribute vies_result_reason.
29509 29510 29511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29509 def vies_result_reason @vies_result_reason end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29533 29534 29535 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29533 def copy(incoming={}) DetailedTaxRegistration.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29537 29538 29539 29540 29541 29542 29543 29544 29545 29546 29547 29548 29549 29550 29551 29552 29553 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29537 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
29529 29530 29531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29529 def to_json JSON.dump(to_hash) end |