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.
-
#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.
-
#stored_credential ⇒ CardStoredCredential
Provides additional details to process a payment using a ‘card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
-
#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, stored_credential: SKIP, billing_address: SKIP, country_code: SKIP) ⇒ ApplePayCardResponse
constructor
A new instance of ApplePayCardResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
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, stored_credential: SKIP, billing_address: SKIP, country_code: SKIP) ⇒ ApplePayCardResponse
Returns a new instance of ApplePayCardResponse.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 127 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, stored_credential: 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 @stored_credential = stored_credential unless stored_credential == 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).
74 75 76 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 74 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. Note: 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.
82 83 84 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 82 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 |
#stored_credential ⇒ CardStoredCredential
Provides additional details to process a payment using a ‘card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file). Parameter compatibility: `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`. `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`. Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
65 66 67 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 65 def stored_credential @stored_credential 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.
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 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 149 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'] stored_credential = CardStoredCredential.from_hash(hash['stored_credential']) if hash['stored_credential'] 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, stored_credential: stored_credential, billing_address: billing_address, country_code: country_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 85 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['stored_credential'] = 'stored_credential' @_hash['billing_address'] = 'billing_address' @_hash['country_code'] = 'country_code' @_hash end |
.nullables ⇒ Object
An array for nullable fields
123 124 125 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 123 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 104 def self.optionals %w[ name last_digits brand available_networks type authentication_result attributes from_request expiry bin_details stored_credential billing_address country_code ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 198 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, last_digits: #{@last_digits.inspect}, brand:"\ " #{@brand.inspect}, available_networks: #{@available_networks.inspect}, type:"\ " #{@type.inspect}, authentication_result: #{@authentication_result.inspect}, attributes:"\ " #{@attributes.inspect}, from_request: #{@from_request.inspect}, expiry:"\ " #{@expiry.inspect}, bin_details: #{@bin_details.inspect}, stored_credential:"\ " #{@stored_credential.inspect}, billing_address: #{@billing_address.inspect}, country_code:"\ " #{@country_code.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
187 188 189 190 191 192 193 194 195 |
# File 'lib/paypal_server_sdk/models/apple_pay_card_response.rb', line 187 def to_s class_name = self.class.name.split('::').last "<#{class_name} 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}, stored_credential:"\ " #{@stored_credential}, billing_address: #{@billing_address}, country_code:"\ " #{@country_code}>" end |