Class: Ingenico::Connect::SDK::Domain::Services::GetIINDetailsResponse
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Services::GetIINDetailsResponse
- Defined in:
- lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb
Overview
Class GetIINDetailsResponse
Instance Attribute Summary collapse
-
#co_brands ⇒ Object
Array of IINDetail.
-
#country_code ⇒ Object
String.
-
#is_allowed_in_context ⇒ Object
true/false.
-
#payment_product_id ⇒ Object
Integer.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#co_brands ⇒ Object
Array of IINDetail
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb', line 16 def co_brands @co_brands end |
#country_code ⇒ Object
String
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb', line 19 def country_code @country_code end |
#is_allowed_in_context ⇒ Object
true/false
22 23 24 |
# File 'lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb', line 22 def is_allowed_in_context @is_allowed_in_context end |
#payment_product_id ⇒ Object
Integer
25 26 27 |
# File 'lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb', line 25 def payment_product_id @payment_product_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb', line 36 def from_hash(hash) super if hash.has_key?('coBrands') if !(hash['coBrands'].is_a? Array) raise TypeError, "value '%s' is not an Array" % [hash['coBrands']] end @co_brands = [] hash['coBrands'].each do |e| @co_brands << Ingenico::Connect::SDK::Domain::Services::IINDetail.new_from_hash(e) end end if hash.has_key?('countryCode') @country_code = hash['countryCode'] end if hash.has_key?('isAllowedInContext') @is_allowed_in_context = hash['isAllowedInContext'] end if hash.has_key?('paymentProductId') @payment_product_id = hash['paymentProductId'] end end |
#to_h ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb', line 27 def to_h hash = super add_to_hash(hash, 'coBrands', @co_brands) add_to_hash(hash, 'countryCode', @country_code) add_to_hash(hash, 'isAllowedInContext', @is_allowed_in_context) add_to_hash(hash, 'paymentProductId', @payment_product_id) hash end |