Class: PaypalServerSdk::ApplePayCardResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::ApplePayCardResponse
- Defined in:
- lib/paypal_server_sdk/models/apple_pay_card_response.rb
Overview
The Card from Apple Pay Wallet used to fund the payment.
Instance Attribute Summary collapse
-
#attributes ⇒ CardAttributesResponse
Additional attributes associated with the use of this card.
-
#authentication_result ⇒ AuthenticationResponse
Results of Authentication such as 3D Secure.
-
#available_networks ⇒ Array[CardBrand]
Array of brands or networks associated with the card.
-
#billing_address ⇒ Address
The portable international postal address.
-
#bin_details ⇒ BinDetails
Bank Identification Number (BIN) details used to fund a payment.
-
#brand ⇒ CardBrand
The card network or brand.
-
#country_code ⇒ String
The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is
GB
and notUK
as used in the top-level domain names for that country. -
#expiry ⇒ String
The year and month, in ISO-8601 ‘YYYY-MM` date format.
-
#from_request ⇒ CardFromRequest
Representation of card details as received in the request.
-
#last_digits ⇒ String
The last digits of the payment card.
-
#name ⇒ String
The card holder’s name as it appears on the card.
-
#type ⇒ CardType
Type of card.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(name: SKIP, last_digits: SKIP, brand: SKIP, available_networks: SKIP, type: SKIP, authentication_result: SKIP, attributes: SKIP, from_request: SKIP, expiry: SKIP, bin_details: SKIP, billing_address: SKIP, country_code: SKIP) ⇒ ApplePayCardResponse
constructor
A new instance of ApplePayCardResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(name: SKIP, last_digits: SKIP, brand: SKIP, available_networks: SKIP, type: SKIP, authentication_result: SKIP, attributes: SKIP, from_request: SKIP, expiry: SKIP, bin_details: SKIP, billing_address: SKIP, country_code: SKIP) ⇒ ApplePayCardResponse
Returns a new instance of ApplePayCardResponse.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 113 def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, available_networks: SKIP, type: SKIP, authentication_result: SKIP, attributes: SKIP, from_request: SKIP, expiry: SKIP, bin_details: SKIP, billing_address: SKIP, country_code: SKIP) @name = name unless name == SKIP @last_digits = last_digits unless last_digits == SKIP @brand = brand unless brand == SKIP @available_networks = available_networks unless available_networks == SKIP @type = type unless type == SKIP @authentication_result = authentication_result unless authentication_result == SKIP @attributes = attributes unless attributes == SKIP @from_request = from_request unless from_request == SKIP @expiry = expiry unless expiry == SKIP @bin_details = bin_details unless bin_details == SKIP @billing_address = billing_address unless billing_address == SKIP @country_code = country_code unless country_code == SKIP end |
Instance Attribute Details
#attributes ⇒ CardAttributesResponse
Additional attributes associated with the use of this card.
39 40 41 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 39 def attributes @attributes end |
#authentication_result ⇒ AuthenticationResponse
Results of Authentication such as 3D Secure.
35 36 37 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 35 def authentication_result @authentication_result end |
#available_networks ⇒ Array[CardBrand]
Array of brands or networks associated with the card.
27 28 29 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 27 def available_networks @available_networks end |
#billing_address ⇒ Address
The portable international postal address. Maps to [AddressValidationMetadata](github.com/googlei18n/libaddressinput/ wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](www.w3.org/TR/html51/sec-forms.html#autofilling-form-co ntrols-the-autocomplete-attribute).
61 62 63 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 61 def billing_address @billing_address end |
#bin_details ⇒ BinDetails
Bank Identification Number (BIN) details used to fund a payment.
52 53 54 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 52 def bin_details @bin_details end |
#brand ⇒ CardBrand
The card network or brand. Applies to credit, debit, gift, and payment cards.
23 24 25 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 23 def brand @brand end |
#country_code ⇒ String
The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.<blockquote><strong>Note:</strong> The country code for Great Britain is GB
and not UK
as used in the top-level domain names for that country. Use the ‘C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.</blockquote>
70 71 72 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 70 def country_code @country_code end |
#expiry ⇒ String
The year and month, in ISO-8601 ‘YYYY-MM` date format. See [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6).
48 49 50 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 48 def expiry @expiry end |
#from_request ⇒ CardFromRequest
Representation of card details as received in the request.
43 44 45 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 43 def from_request @from_request end |
#last_digits ⇒ String
The last digits of the payment card.
18 19 20 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 18 def last_digits @last_digits end |
#name ⇒ String
The card holder’s name as it appears on the card.
14 15 16 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 14 def name @name end |
#type ⇒ CardType
Type of card. i.e Credit, Debit and so on.
31 32 33 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 31 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 133 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP brand = hash.key?('brand') ? hash['brand'] : SKIP available_networks = hash.key?('available_networks') ? hash['available_networks'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if hash['authentication_result'] attributes = CardAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] from_request = CardFromRequest.from_hash(hash['from_request']) if hash['from_request'] expiry = hash.key?('expiry') ? hash['expiry'] : SKIP bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] country_code = hash.key?('country_code') ? hash['country_code'] : SKIP # Create object from extracted values. ApplePayCardResponse.new(name: name, last_digits: last_digits, brand: brand, available_networks: available_networks, type: type, authentication_result: authentication_result, attributes: attributes, from_request: from_request, expiry: expiry, bin_details: bin_details, billing_address: billing_address, country_code: country_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 73 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['last_digits'] = 'last_digits' @_hash['brand'] = 'brand' @_hash['available_networks'] = 'available_networks' @_hash['type'] = 'type' @_hash['authentication_result'] = 'authentication_result' @_hash['attributes'] = 'attributes' @_hash['from_request'] = 'from_request' @_hash['expiry'] = 'expiry' @_hash['bin_details'] = 'bin_details' @_hash['billing_address'] = 'billing_address' @_hash['country_code'] = 'country_code' @_hash end |
.nullables ⇒ Object
An array for nullable fields
109 110 111 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 109 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 91 def self.optionals %w[ name last_digits brand available_networks type authentication_result attributes from_request expiry bin_details billing_address country_code ] end |