Class: PaypalServerSdk::SetupTokenRequestCard
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::SetupTokenRequestCard
- Defined in:
- lib/paypal_server_sdk/models/setup_token_request_card.rb
Overview
A Resource representing a request to vault a Card.
Instance Attribute Summary collapse
-
#billing_address ⇒ Address
The portable international postal address.
-
#brand ⇒ CardBrand
The card network or brand.
-
#experience_context ⇒ SetupTokenCardExperienceContext
Customizes the Vault creation flow experience for your customers.
-
#expiry ⇒ String
The year and month, in ISO-8601 ‘YYYY-MM` date format.
-
#name ⇒ String
The card holder’s name as it appears on the card.
-
#network_transaction_reference ⇒ Object
Customizes the Vault creation flow experience for your customers.
-
#number ⇒ String
The primary account number (PAN) for the payment card.
-
#security_code ⇒ String
The three- or four-digit security code of the card.
-
#verification_method ⇒ String
The verification method of the 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, number: SKIP, expiry: SKIP, security_code: SKIP, brand: SKIP, billing_address: SKIP, verification_method: SKIP, experience_context: SKIP, network_transaction_reference: SKIP) ⇒ SetupTokenRequestCard
constructor
A new instance of SetupTokenRequestCard.
Methods inherited from BaseModel
Constructor Details
#initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, brand: SKIP, billing_address: SKIP, verification_method: SKIP, experience_context: SKIP, network_transaction_reference: SKIP) ⇒ SetupTokenRequestCard
Returns a new instance of SetupTokenRequestCard.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 93 def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, brand: SKIP, billing_address: SKIP, verification_method: SKIP, experience_context: SKIP, network_transaction_reference: SKIP) @name = name unless name == SKIP @number = number unless number == SKIP @expiry = expiry unless expiry == SKIP @security_code = security_code unless security_code == SKIP @brand = brand unless brand == SKIP @billing_address = billing_address unless billing_address == SKIP @verification_method = verification_method unless verification_method == SKIP @experience_context = experience_context unless experience_context == SKIP unless network_transaction_reference == SKIP @network_transaction_reference = network_transaction_reference end end |
Instance Attribute Details
#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).
43 44 45 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 43 def billing_address @billing_address end |
#brand ⇒ CardBrand
The card network or brand. Applies to credit, debit, gift, and payment cards.
34 35 36 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 34 def brand @brand end |
#experience_context ⇒ SetupTokenCardExperienceContext
Customizes the Vault creation flow experience for your customers.
51 52 53 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 51 def experience_context @experience_context 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).
23 24 25 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 23 def expiry @expiry end |
#name ⇒ String
The card holder’s name as it appears on the card.
14 15 16 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 14 def name @name end |
#network_transaction_reference ⇒ Object
Customizes the Vault creation flow experience for your customers.
55 56 57 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 55 def network_transaction_reference @network_transaction_reference end |
#number ⇒ String
The primary account number (PAN) for the payment card.
18 19 20 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 18 def number @number end |
#security_code ⇒ String
The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when ‘payment_initiator=MERCHANT`.
29 30 31 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 29 def security_code @security_code end |
#verification_method ⇒ String
The verification method of the card.
47 48 49 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 47 def verification_method @verification_method end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 112 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP number = hash.key?('number') ? hash['number'] : SKIP expiry = hash.key?('expiry') ? hash['expiry'] : SKIP security_code = hash.key?('security_code') ? hash['security_code'] : SKIP brand = hash.key?('brand') ? hash['brand'] : SKIP billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] verification_method = hash.key?('verification_method') ? hash['verification_method'] : SKIP experience_context = SetupTokenCardExperienceContext.from_hash(hash['experience_context']) if hash['experience_context'] network_transaction_reference = hash.key?('network_transaction_reference') ? hash['network_transaction_reference'] : SKIP # Create object from extracted values. SetupTokenRequestCard.new(name: name, number: number, expiry: expiry, security_code: security_code, brand: brand, billing_address: billing_address, verification_method: verification_method, experience_context: experience_context, network_transaction_reference: network_transaction_reference) end |
.names ⇒ Object
A mapping from model property names to API property names.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 58 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['number'] = 'number' @_hash['expiry'] = 'expiry' @_hash['security_code'] = 'security_code' @_hash['brand'] = 'brand' @_hash['billing_address'] = 'billing_address' @_hash['verification_method'] = 'verification_method' @_hash['experience_context'] = 'experience_context' @_hash['network_transaction_reference'] = 'network_transaction_reference' @_hash end |
.nullables ⇒ Object
An array for nullable fields
89 90 91 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 89 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/paypal_server_sdk/models/setup_token_request_card.rb', line 74 def self.optionals %w[ name number expiry security_code brand billing_address verification_method experience_context network_transaction_reference ] end |