Class: OnlinePayments::SDK::Domain::CardBinDetails

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#card_corporate_indicatortrue/false



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_corporate_indicator
  @card_corporate_indicator
end

#card_effective_dateDate



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_effective_date
  @card_effective_date
end

#card_effective_date_indicatortrue/false



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_effective_date_indicator
  @card_effective_date_indicator
end

#card_pan_typeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_pan_type
  @card_pan_type
end

#card_product_codeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_product_code
  @card_product_code
end

#card_product_nameString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_product_name
  @card_product_name
end

#card_product_usage_labelString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_product_usage_label
  @card_product_usage_label
end

#card_schemeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_scheme
  @card_scheme
end

#card_typeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def card_type
  @card_type
end

#country_codeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def country_code
  @country_code
end

#issuer_codeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def issuer_code
  @issuer_code
end

#issuer_nameString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def issuer_name
  @issuer_name
end

#issuer_region_codeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def issuer_region_code
  @issuer_region_code
end

#issuing_country_codeString



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def issuing_country_code
  @issuing_country_code
end

#pan_length_maxInteger



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def pan_length_max
  @pan_length_max
end

#pan_length_minInteger



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def pan_length_min
  @pan_length_min
end

#pan_luhn_checktrue/false



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def pan_luhn_check
  @pan_luhn_check
end

#virtual_card_indicatortrue/false



29
30
31
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 29

def virtual_card_indicator
  @virtual_card_indicator
end

Instance Method Details

#from_hash(hash) ⇒ Object



91
92
93
94
95
96
97
98
99
100
101
102
103
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
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 91

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? 'countryCode'
    @country_code = hash['countryCode']
  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? 'virtualCardIndicator'
    @virtual_card_indicator = hash['virtualCardIndicator']
  end
end

#to_hHash



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/onlinepayments/sdk/domain/card_bin_details.rb', line 68

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['countryCode'] = @country_code unless @country_code.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['virtualCardIndicator'] = @virtual_card_indicator unless @virtual_card_indicator.nil?
  hash
end