Class: AdvancedBilling::GetOneTimeTokenPaymentProfile
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::GetOneTimeTokenPaymentProfile
- Defined in:
- lib/advanced_billing/models/get_one_time_token_payment_profile.rb
Overview
GetOneTimeTokenPaymentProfile Model.
Instance Attribute Summary collapse
-
#billing_address ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#billing_address_2 ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#billing_city ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#billing_country ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#billing_state ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#billing_zip ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#card_type ⇒ CardType
The type of card used.
-
#current_vault ⇒ CreditCardVault
The vault that stores the payment profile with the provided ‘vault_token`.
-
#customer_id ⇒ String
The type of card used.
-
#customer_vault_token ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#disabled ⇒ TrueClass | FalseClass
The vault that stores the payment profile with the provided ‘vault_token`.
-
#expiration_month ⇒ Float
The type of card used.
-
#expiration_year ⇒ Float
The type of card used.
-
#first_name ⇒ String
TODO: Write general description for this method.
-
#gateway_handle ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#id ⇒ String
TODO: Write general description for this method.
-
#last_name ⇒ String
TODO: Write general description for this method.
-
#masked_card_number ⇒ String
TODO: Write general description for this method.
-
#payment_type ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
-
#site_gateway_setting_id ⇒ Integer
The vault that stores the payment profile with the provided ‘vault_token`.
-
#vault_token ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`.
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(first_name:, last_name:, masked_card_number:, card_type:, expiration_month:, expiration_year:, current_vault:, vault_token:, billing_address:, billing_city:, billing_country:, billing_state:, billing_zip:, payment_type:, disabled:, site_gateway_setting_id:, id: SKIP, customer_id: SKIP, billing_address_2: SKIP, customer_vault_token: SKIP, gateway_handle: SKIP, additional_properties: {}) ⇒ GetOneTimeTokenPaymentProfile
constructor
A new instance of GetOneTimeTokenPaymentProfile.
Methods inherited from BaseModel
Constructor Details
#initialize(first_name:, last_name:, masked_card_number:, card_type:, expiration_month:, expiration_year:, current_vault:, vault_token:, billing_address:, billing_city:, billing_country:, billing_state:, billing_zip:, payment_type:, disabled:, site_gateway_setting_id:, id: SKIP, customer_id: SKIP, billing_address_2: SKIP, customer_vault_token: SKIP, gateway_handle: SKIP, additional_properties: {}) ⇒ GetOneTimeTokenPaymentProfile
Returns a new instance of GetOneTimeTokenPaymentProfile.
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 185 186 187 188 189 190 191 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 157 def initialize(first_name:, last_name:, masked_card_number:, card_type:, expiration_month:, expiration_year:, current_vault:, vault_token:, billing_address:, billing_city:, billing_country:, billing_state:, billing_zip:, payment_type:, disabled:, site_gateway_setting_id:, id: SKIP, customer_id: SKIP, billing_address_2: SKIP, customer_vault_token: SKIP, gateway_handle: SKIP, additional_properties: {}) @id = id unless id == SKIP @first_name = first_name @last_name = last_name @masked_card_number = masked_card_number @card_type = card_type @expiration_month = expiration_month @expiration_year = expiration_year @customer_id = customer_id unless customer_id == SKIP @current_vault = current_vault @vault_token = vault_token @billing_address = billing_address @billing_address_2 = billing_address_2 unless billing_address_2 == SKIP @billing_city = billing_city @billing_country = billing_country @billing_state = billing_state @billing_zip = billing_zip @payment_type = payment_type @disabled = disabled @site_gateway_setting_id = site_gateway_setting_id @customer_vault_token = customer_vault_token unless customer_vault_token == SKIP @gateway_handle = gateway_handle unless gateway_handle == SKIP # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end end |
Instance Attribute Details
#billing_address ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
57 58 59 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 57 def billing_address @billing_address end |
#billing_address_2 ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
62 63 64 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 62 def billing_address_2 @billing_address_2 end |
#billing_city ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
67 68 69 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 67 def billing_city @billing_city end |
#billing_country ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
72 73 74 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 72 def billing_country @billing_country end |
#billing_state ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
77 78 79 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 77 def billing_state @billing_state end |
#billing_zip ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
82 83 84 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 82 def billing_zip @billing_zip end |
#card_type ⇒ CardType
The type of card used.
30 31 32 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 30 def card_type @card_type end |
#current_vault ⇒ CreditCardVault
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
47 48 49 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 47 def current_vault @current_vault end |
#customer_id ⇒ String
The type of card used.
42 43 44 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 42 def customer_id @customer_id end |
#customer_vault_token ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
102 103 104 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 102 def customer_vault_token @customer_vault_token end |
#disabled ⇒ TrueClass | FalseClass
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
92 93 94 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 92 def disabled @disabled end |
#expiration_month ⇒ Float
The type of card used.
34 35 36 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 34 def expiration_month @expiration_month end |
#expiration_year ⇒ Float
The type of card used.
38 39 40 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 38 def expiration_year @expiration_year end |
#first_name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 18 def first_name @first_name end |
#gateway_handle ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
107 108 109 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 107 def gateway_handle @gateway_handle end |
#id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 14 def id @id end |
#last_name ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 22 def last_name @last_name end |
#masked_card_number ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 26 def masked_card_number @masked_card_number end |
#payment_type ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
87 88 89 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 87 def payment_type @payment_type end |
#site_gateway_setting_id ⇒ Integer
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
97 98 99 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 97 def site_gateway_setting_id @site_gateway_setting_id end |
#vault_token ⇒ String
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
52 53 54 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 52 def vault_token @vault_token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 194 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. first_name = hash.key?('first_name') ? hash['first_name'] : nil last_name = hash.key?('last_name') ? hash['last_name'] : nil masked_card_number = hash.key?('masked_card_number') ? hash['masked_card_number'] : nil card_type = hash.key?('card_type') ? hash['card_type'] : nil expiration_month = hash.key?('expiration_month') ? hash['expiration_month'] : nil expiration_year = hash.key?('expiration_year') ? hash['expiration_year'] : nil current_vault = hash.key?('current_vault') ? hash['current_vault'] : nil vault_token = hash.key?('vault_token') ? hash['vault_token'] : nil billing_address = hash.key?('billing_address') ? hash['billing_address'] : nil billing_city = hash.key?('billing_city') ? hash['billing_city'] : nil billing_country = hash.key?('billing_country') ? hash['billing_country'] : nil billing_state = hash.key?('billing_state') ? hash['billing_state'] : nil billing_zip = hash.key?('billing_zip') ? hash['billing_zip'] : nil payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil disabled = hash.key?('disabled') ? hash['disabled'] : nil site_gateway_setting_id = hash.key?('site_gateway_setting_id') ? hash['site_gateway_setting_id'] : nil id = hash.key?('id') ? hash['id'] : SKIP customer_id = hash.key?('customer_id') ? hash['customer_id'] : SKIP billing_address_2 = hash.key?('billing_address_2') ? hash['billing_address_2'] : SKIP customer_vault_token = hash.key?('customer_vault_token') ? hash['customer_vault_token'] : SKIP gateway_handle = hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. GetOneTimeTokenPaymentProfile.new(first_name: first_name, last_name: last_name, masked_card_number: masked_card_number, card_type: card_type, expiration_month: expiration_month, expiration_year: expiration_year, current_vault: current_vault, vault_token: vault_token, billing_address: billing_address, billing_city: billing_city, billing_country: billing_country, billing_state: billing_state, billing_zip: billing_zip, payment_type: payment_type, disabled: disabled, site_gateway_setting_id: site_gateway_setting_id, id: id, customer_id: customer_id, billing_address_2: billing_address_2, customer_vault_token: customer_vault_token, gateway_handle: gateway_handle, additional_properties: hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 110 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['first_name'] = 'first_name' @_hash['last_name'] = 'last_name' @_hash['masked_card_number'] = 'masked_card_number' @_hash['card_type'] = 'card_type' @_hash['expiration_month'] = 'expiration_month' @_hash['expiration_year'] = 'expiration_year' @_hash['customer_id'] = 'customer_id' @_hash['current_vault'] = 'current_vault' @_hash['vault_token'] = 'vault_token' @_hash['billing_address'] = 'billing_address' @_hash['billing_address_2'] = 'billing_address_2' @_hash['billing_city'] = 'billing_city' @_hash['billing_country'] = 'billing_country' @_hash['billing_state'] = 'billing_state' @_hash['billing_zip'] = 'billing_zip' @_hash['payment_type'] = 'payment_type' @_hash['disabled'] = 'disabled' @_hash['site_gateway_setting_id'] = 'site_gateway_setting_id' @_hash['customer_vault_token'] = 'customer_vault_token' @_hash['gateway_handle'] = 'gateway_handle' @_hash end |
.nullables ⇒ Object
An array for nullable fields
148 149 150 151 152 153 154 155 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 148 def self.nullables %w[ id customer_id customer_vault_token gateway_handle ] end |
.optionals ⇒ Object
An array for optional fields
137 138 139 140 141 142 143 144 145 |
# File 'lib/advanced_billing/models/get_one_time_token_payment_profile.rb', line 137 def self.optionals %w[ id customer_id billing_address_2 customer_vault_token gateway_handle ] end |