Class: Io::Flow::V0::Models::AddressVerificationResult
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AddressVerificationResult
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#name_code ⇒ Object
readonly
Returns the value of attribute name_code.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#street_code ⇒ Object
readonly
Returns the value of attribute street_code.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AddressVerificationResult
constructor
A new instance of AddressVerificationResult.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AddressVerificationResult
Returns a new instance of AddressVerificationResult.
29828 29829 29830 29831 29832 29833 29834 29835 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29828 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:street_code, :postal_code, :name_code], 'AddressVerificationResult') @street_code = (x = opts.delete(:street_code); x.is_a?(::Io::Flow::V0::Models::AddressVerificationResultFieldCode) ? x : ::Io::Flow::V0::Models::AddressVerificationResultFieldCode.apply(x)) @postal_code = (x = opts.delete(:postal_code); x.is_a?(::Io::Flow::V0::Models::AddressVerificationResultFieldCode) ? x : ::Io::Flow::V0::Models::AddressVerificationResultFieldCode.apply(x)) @name_code = (x = opts.delete(:name_code); x.is_a?(::Io::Flow::V0::Models::AddressVerificationResultFieldCode) ? x : ::Io::Flow::V0::Models::AddressVerificationResultFieldCode.apply(x)) @raw = (x = opts.delete(:raw); x.nil? ? nil : HttpClient::Preconditions.assert_class('raw', x, String)) end |
Instance Attribute Details
#name_code ⇒ Object (readonly)
Returns the value of attribute name_code.
29826 29827 29828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29826 def name_code @name_code end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
29826 29827 29828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29826 def postal_code @postal_code end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
29826 29827 29828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29826 def raw @raw end |
#street_code ⇒ Object (readonly)
Returns the value of attribute street_code.
29826 29827 29828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29826 def street_code @street_code end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29841 29842 29843 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29841 def copy(incoming={}) AddressVerificationResult.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29845 29846 29847 29848 29849 29850 29851 29852 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29845 def to_hash { :street_code => street_code.value, :postal_code => postal_code.value, :name_code => name_code.value, :raw => raw } end |
#to_json ⇒ Object
29837 29838 29839 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29837 def to_json JSON.dump(to_hash) end |