Class: Io::Flow::V0::Models::AddressFieldValidation
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AddressFieldValidation
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#postal ⇒ Object
readonly
Returns the value of attribute postal.
-
#province ⇒ Object
readonly
Returns the value of attribute province.
-
#street_1 ⇒ Object
readonly
Returns the value of attribute street_1.
-
#street_2 ⇒ Object
readonly
Returns the value of attribute street_2.
-
#vat_registration_number ⇒ Object
readonly
Returns the value of attribute vat_registration_number.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AddressFieldValidation
constructor
A new instance of AddressFieldValidation.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AddressFieldValidation
Returns a new instance of AddressFieldValidation.
25965 25966 25967 25968 25969 25970 25971 25972 25973 25974 25975 25976 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25965 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @first_name = HttpClient::Preconditions.assert_class('first_name', (x = opts.delete(:first_name); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @last_name = HttpClient::Preconditions.assert_class('last_name', (x = opts.delete(:last_name); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @street_1 = HttpClient::Preconditions.assert_class('street_1', (x = opts.delete(:street_1); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @street_2 = HttpClient::Preconditions.assert_class('street_2', (x = opts.delete(:street_2); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @city = HttpClient::Preconditions.assert_class('city', (x = opts.delete(:city); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @province = HttpClient::Preconditions.assert_class('province', (x = opts.delete(:province); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @postal = HttpClient::Preconditions.assert_class('postal', (x = opts.delete(:postal); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @phone = HttpClient::Preconditions.assert_class('phone', (x = opts.delete(:phone); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } @vat_registration_number = HttpClient::Preconditions.assert_class('vat_registration_number', (x = opts.delete(:vat_registration_number); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FieldValidationRule) ? x : ::Io::Flow::V0::Models::FieldValidationRule.from_json(x)) } end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def city @city end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def last_name @last_name end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def phone @phone end |
#postal ⇒ Object (readonly)
Returns the value of attribute postal.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def postal @postal end |
#province ⇒ Object (readonly)
Returns the value of attribute province.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def province @province end |
#street_1 ⇒ Object (readonly)
Returns the value of attribute street_1.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def street_1 @street_1 end |
#street_2 ⇒ Object (readonly)
Returns the value of attribute street_2.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def street_2 @street_2 end |
#vat_registration_number ⇒ Object (readonly)
Returns the value of attribute vat_registration_number.
25963 25964 25965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25963 def vat_registration_number @vat_registration_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25982 25983 25984 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25982 def copy(incoming={}) AddressFieldValidation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
25986 25987 25988 25989 25990 25991 25992 25993 25994 25995 25996 25997 25998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25986 def to_hash { :first_name => first_name.map { |o| o.to_hash }, :last_name => last_name.map { |o| o.to_hash }, :street_1 => street_1.map { |o| o.to_hash }, :street_2 => street_2.map { |o| o.to_hash }, :city => city.map { |o| o.to_hash }, :province => province.map { |o| o.to_hash }, :postal => postal.map { |o| o.to_hash }, :phone => phone.map { |o| o.to_hash }, :vat_registration_number => vat_registration_number.map { |o| o.to_hash } } end |
#to_json ⇒ Object
25978 25979 25980 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25978 def to_json JSON.dump(to_hash) end |