Class: OnlinePayments::SDK::Domain::CardEssentials
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CardEssentials
- Defined in:
- lib/onlinepayments/sdk/domain/card_essentials.rb
Instance Attribute Summary collapse
-
#bin ⇒ String
The current value of bin.
-
#card_corporate_indicator ⇒ true/false
The current value of card_corporate_indicator.
-
#card_effective_date ⇒ Date
The current value of card_effective_date.
-
#card_effective_date_indicator ⇒ true/false
The current value of card_effective_date_indicator.
-
#card_number ⇒ String
The current value of card_number.
-
#card_pan_type ⇒ String
The current value of card_pan_type.
-
#card_product_code ⇒ String
The current value of card_product_code.
-
#card_product_usage_label ⇒ String
The current value of card_product_usage_label.
-
#card_scheme ⇒ String
The current value of card_scheme.
-
#card_type ⇒ String
The current value of card_type.
-
#country_code ⇒ String
The current value of country_code.
-
#expiry_date ⇒ String
The current value of expiry_date.
-
#issuer_code ⇒ String
The current value of issuer_code.
-
#issuer_name ⇒ String
The current value of issuer_name.
-
#issuing_country_code ⇒ String
The current value of issuing_country_code.
-
#pan_length_max ⇒ Integer
The current value of pan_length_max.
-
#pan_length_min ⇒ Integer
The current value of pan_length_min.
-
#pan_luhn_check ⇒ true/false
The current value of pan_luhn_check.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#bin ⇒ String
Returns the current value of bin.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def bin @bin end |
#card_corporate_indicator ⇒ true/false
Returns the current value of card_corporate_indicator.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_corporate_indicator @card_corporate_indicator end |
#card_effective_date ⇒ Date
Returns the current value of card_effective_date.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_effective_date @card_effective_date end |
#card_effective_date_indicator ⇒ true/false
Returns the current value of card_effective_date_indicator.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_effective_date_indicator @card_effective_date_indicator end |
#card_number ⇒ String
Returns the current value of card_number.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_number @card_number end |
#card_pan_type ⇒ String
Returns the current value of card_pan_type.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_pan_type @card_pan_type end |
#card_product_code ⇒ String
Returns the current value of card_product_code.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_product_code @card_product_code end |
#card_product_usage_label ⇒ String
Returns the current value of card_product_usage_label.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_product_usage_label @card_product_usage_label end |
#card_scheme ⇒ String
Returns the current value of card_scheme.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_scheme @card_scheme end |
#card_type ⇒ String
Returns the current value of card_type.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def card_type @card_type end |
#country_code ⇒ String
Returns the current value of country_code.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def country_code @country_code end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def expiry_date @expiry_date end |
#issuer_code ⇒ String
Returns the current value of issuer_code.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def issuer_code @issuer_code end |
#issuer_name ⇒ String
Returns the current value of issuer_name.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def issuer_name @issuer_name end |
#issuing_country_code ⇒ String
Returns the current value of issuing_country_code.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def issuing_country_code @issuing_country_code end |
#pan_length_max ⇒ Integer
Returns the current value of pan_length_max.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def pan_length_max @pan_length_max end |
#pan_length_min ⇒ Integer
Returns the current value of pan_length_min.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def pan_length_min @pan_length_min end |
#pan_luhn_check ⇒ true/false
Returns the current value of pan_luhn_check.
29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_essentials.rb', line 29 def pan_luhn_check @pan_luhn_check 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_essentials.rb', line 91 def from_hash(hash) super if hash.has_key? 'bin' @bin = hash['bin'] end 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? 'cardNumber' @card_number = hash['cardNumber'] 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? '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? 'expiryDate' @expiry_date = hash['expiryDate'] 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? '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 end |
#to_h ⇒ Hash
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_essentials.rb', line 68 def to_h hash = super hash['bin'] = @bin unless @bin.nil? 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['cardNumber'] = @card_number unless @card_number.nil? hash['cardPanType'] = @card_pan_type unless @card_pan_type.nil? hash['cardProductCode'] = @card_product_code unless @card_product_code.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['expiryDate'] = @expiry_date unless @expiry_date.nil? hash['issuerCode'] = @issuer_code unless @issuer_code.nil? hash['issuerName'] = @issuer_name unless @issuer_name.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 end |