Class: OnlinePayments::SDK::Domain::GetIINDetailsResponse

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/get_iin_details_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#card_corporate_indicatortrue/false

Returns the current value of card_corporate_indicator.

Returns:

  • (true/false)

    the current value of card_corporate_indicator



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_corporate_indicator
  @card_corporate_indicator
end

#card_effective_dateDate

Returns the current value of card_effective_date.

Returns:

  • (Date)

    the current value of card_effective_date



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_effective_date
  @card_effective_date
end

#card_effective_date_indicatortrue/false

Returns the current value of card_effective_date_indicator.

Returns:

  • (true/false)

    the current value of card_effective_date_indicator



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_effective_date_indicator
  @card_effective_date_indicator
end

#card_pan_typeString

Returns the current value of card_pan_type.

Returns:

  • (String)

    the current value of card_pan_type



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_pan_type
  @card_pan_type
end

#card_product_codeString

Returns the current value of card_product_code.

Returns:

  • (String)

    the current value of card_product_code



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_product_code
  @card_product_code
end

#card_product_nameString

Returns the current value of card_product_name.

Returns:

  • (String)

    the current value of card_product_name



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_product_name
  @card_product_name
end

#card_product_usage_labelString

Returns the current value of card_product_usage_label.

Returns:

  • (String)

    the current value of card_product_usage_label



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_product_usage_label
  @card_product_usage_label
end

#card_schemeString

Returns the current value of card_scheme.

Returns:

  • (String)

    the current value of card_scheme



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_scheme
  @card_scheme
end

#card_typeString

Returns the current value of card_type.

Returns:

  • (String)

    the current value of card_type



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def card_type
  @card_type
end

#co_brandsArray<OnlinePayments::SDK::Domain::IINDetail>

Returns the current value of co_brands.

Returns:



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def co_brands
  @co_brands
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def country_code
  @country_code
end

#is_allowed_in_contexttrue/false

Returns the current value of is_allowed_in_context.

Returns:

  • (true/false)

    the current value of is_allowed_in_context



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def is_allowed_in_context
  @is_allowed_in_context
end

#issuer_codeString

Returns the current value of issuer_code.

Returns:

  • (String)

    the current value of issuer_code



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def issuer_code
  @issuer_code
end

#issuer_nameString

Returns the current value of issuer_name.

Returns:

  • (String)

    the current value of issuer_name



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def issuer_name
  @issuer_name
end

#issuer_region_codeString

Returns the current value of issuer_region_code.

Returns:

  • (String)

    the current value of issuer_region_code



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def issuer_region_code
  @issuer_region_code
end

#issuing_country_codeString

Returns the current value of issuing_country_code.

Returns:

  • (String)

    the current value of issuing_country_code



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def issuing_country_code
  @issuing_country_code
end

#pan_length_maxInteger

Returns the current value of pan_length_max.

Returns:

  • (Integer)

    the current value of pan_length_max



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def pan_length_max
  @pan_length_max
end

#pan_length_minInteger

Returns the current value of pan_length_min.

Returns:

  • (Integer)

    the current value of pan_length_min



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def pan_length_min
  @pan_length_min
end

#pan_luhn_checktrue/false

Returns the current value of pan_luhn_check.

Returns:

  • (true/false)

    the current value of pan_luhn_check



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def pan_luhn_check
  @pan_luhn_check
end

#payment_product_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    the current value of payment_product_id



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def payment_product_id
  @payment_product_id
end

#virtual_card_indicatortrue/false

Returns the current value of virtual_card_indicator.

Returns:

  • (true/false)

    the current value of virtual_card_indicator



33
34
35
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 33

def virtual_card_indicator
  @virtual_card_indicator
end

Instance Method Details

#from_hash(hash) ⇒ Object



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 104

def from_hash(hash)
  super
  if hash.has_key? 'cardCorporateIndicator'
    @card_corporate_indicator = hash['cardCorporateIndicator']
  end
  if hash.has_key? 'cardEffectiveDate'
    @card_effective_date = Date.parse(hash['cardEffectiveDate'])
  end
  if hash.has_key? 'cardEffectiveDateIndicator'
    @card_effective_date_indicator = hash['cardEffectiveDateIndicator']
  end
  if hash.has_key? 'cardPanType'
    @card_pan_type = hash['cardPanType']
  end
  if hash.has_key? 'cardProductCode'
    @card_product_code = hash['cardProductCode']
  end
  if hash.has_key? 'cardProductName'
    @card_product_name = hash['cardProductName']
  end
  if hash.has_key? 'cardProductUsageLabel'
    @card_product_usage_label = hash['cardProductUsageLabel']
  end
  if hash.has_key? 'cardScheme'
    @card_scheme = hash['cardScheme']
  end
  if hash.has_key? 'cardType'
    @card_type = hash['cardType']
  end
  if hash.has_key? 'coBrands'
    raise TypeError, "value '%s' is not an Array" % [hash['coBrands']] unless hash['coBrands'].is_a? Array
    @co_brands = []
    hash['coBrands'].each do |e|
      @co_brands << OnlinePayments::SDK::Domain::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? 'issuerCode'
    @issuer_code = hash['issuerCode']
  end
  if hash.has_key? 'issuerName'
    @issuer_name = hash['issuerName']
  end
  if hash.has_key? 'issuerRegionCode'
    @issuer_region_code = hash['issuerRegionCode']
  end
  if hash.has_key? 'issuingCountryCode'
    @issuing_country_code = hash['issuingCountryCode']
  end
  if hash.has_key? 'panLengthMax'
    @pan_length_max = hash['panLengthMax']
  end
  if hash.has_key? 'panLengthMin'
    @pan_length_min = hash['panLengthMin']
  end
  if hash.has_key? 'panLuhnCheck'
    @pan_luhn_check = hash['panLuhnCheck']
  end
  if hash.has_key? 'paymentProductId'
    @payment_product_id = hash['paymentProductId']
  end
  if hash.has_key? 'virtualCardIndicator'
    @virtual_card_indicator = hash['virtualCardIndicator']
  end
end

#to_hHash

Returns:

  • (Hash)


78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/onlinepayments/sdk/domain/get_iin_details_response.rb', line 78

def to_h
  hash = super
  hash['cardCorporateIndicator'] = @card_corporate_indicator unless @card_corporate_indicator.nil?
  hash['cardEffectiveDate'] = @card_effective_date.iso8601 unless @card_effective_date.nil?
  hash['cardEffectiveDateIndicator'] = @card_effective_date_indicator unless @card_effective_date_indicator.nil?
  hash['cardPanType'] = @card_pan_type unless @card_pan_type.nil?
  hash['cardProductCode'] = @card_product_code unless @card_product_code.nil?
  hash['cardProductName'] = @card_product_name unless @card_product_name.nil?
  hash['cardProductUsageLabel'] = @card_product_usage_label unless @card_product_usage_label.nil?
  hash['cardScheme'] = @card_scheme unless @card_scheme.nil?
  hash['cardType'] = @card_type unless @card_type.nil?
  hash['coBrands'] = @co_brands.collect{|val| val.to_h} unless @co_brands.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash['isAllowedInContext'] = @is_allowed_in_context unless @is_allowed_in_context.nil?
  hash['issuerCode'] = @issuer_code unless @issuer_code.nil?
  hash['issuerName'] = @issuer_name unless @issuer_name.nil?
  hash['issuerRegionCode'] = @issuer_region_code unless @issuer_region_code.nil?
  hash['issuingCountryCode'] = @issuing_country_code unless @issuing_country_code.nil?
  hash['panLengthMax'] = @pan_length_max unless @pan_length_max.nil?
  hash['panLengthMin'] = @pan_length_min unless @pan_length_min.nil?
  hash['panLuhnCheck'] = @pan_luhn_check unless @pan_luhn_check.nil?
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash['virtualCardIndicator'] = @virtual_card_indicator unless @virtual_card_indicator.nil?
  hash
end