Class: AdvancedBilling::CreatePaymentProfile
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::CreatePaymentProfile
- Defined in:
- lib/advanced_billing/models/create_payment_profile.rb
Overview
CreatePaymentProfile Model.
Instance Attribute Summary collapse
-
#bank_account_holder_type ⇒ BankAccountHolderType
Defaults to personal.
-
#bank_account_number ⇒ String
(Required when creating with ACH, GoCardless, Stripe BECS or BACS Direct Debit, and bank_iban is blank) The customerʼs bank account number.
-
#bank_account_type ⇒ BankAccountType
Defaults to checking.
-
#bank_branch_code ⇒ String
(Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code.
-
#bank_iban ⇒ String
(Optional when creating with GoCardless, required with Stripe Direct Debit).
-
#bank_name ⇒ String
(Required when creating with ACH or GoCardless, optional with Stripe Direct Debit).
-
#bank_routing_number ⇒ String
(Required when creating with ACH. Optional when creating a subscription with GoCardless).
-
#billing_address ⇒ String
The credit card or bank account billing street address (i.e. 123 Main St.).
-
#billing_address_2 ⇒ String
Second line of the customer’s billing address i.e.
-
#billing_city ⇒ String
The credit card or bank account billing address city (i.e. “Boston”).
-
#billing_country ⇒ String
The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”).
-
#billing_state ⇒ String
The credit card or bank account billing address state (i.e. MA).
-
#billing_zip ⇒ String
The credit card or bank account billing address zip code (i.e. 12345).
-
#card_type ⇒ CardType
The type of card used.
-
#chargify_token ⇒ String
Token received after sending billing information using Maxio.js (formerly Chargify.js).
-
#current_vault ⇒ AllVaults
The vault that stores the payment profile with the provided ‘vault_token`.
-
#customer_id ⇒ Integer
(Required when creating a new payment profile) The Chargify customer id.
-
#customer_vault_token ⇒ String
(only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token.
-
#cvv ⇒ String
The 3- or 4-digit Card Verification Value.
-
#expiration_month ⇒ Object
(Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e.
-
#expiration_year ⇒ Object
(Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e.
-
#first_name ⇒ String
First name on card or bank account.
-
#full_number ⇒ String
The full credit card number.
-
#gateway_handle ⇒ String
This attribute is only available if MultiGateway feature is enabled for your Site.
-
#id ⇒ Integer
Token received after sending billing information using Maxio.js (formerly Chargify.js).
-
#last_four ⇒ String
(Optional) Used for creating subscription with payment profile imported using vault_token, for proper display in Advanced Billing UI.
-
#last_name ⇒ String
Last name on card or bank account.
-
#masked_card_number ⇒ String
Last name on card or bank account.
-
#payment_method_nonce ⇒ String
used by merchants that implemented BraintreeBlue javaScript libraries on their own.
-
#payment_type ⇒ PaymentType
Token received after sending billing information using Maxio.js (formerly Chargify.js).
-
#paypal_email ⇒ String
used by merchants that implemented BraintreeBlue javaScript libraries on their own.
-
#vault_token ⇒ String
The “token” provided by your vault storage for an already stored payment profile.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(chargify_token: SKIP, id: SKIP, payment_type: SKIP, first_name: SKIP, last_name: SKIP, masked_card_number: SKIP, full_number: SKIP, card_type: SKIP, expiration_month: SKIP, expiration_year: SKIP, billing_address: SKIP, billing_address_2: SKIP, billing_city: SKIP, billing_state: SKIP, billing_country: SKIP, billing_zip: SKIP, current_vault: SKIP, vault_token: SKIP, customer_vault_token: SKIP, customer_id: SKIP, paypal_email: SKIP, payment_method_nonce: SKIP, gateway_handle: SKIP, cvv: SKIP, bank_name: SKIP, bank_iban: SKIP, bank_routing_number: SKIP, bank_account_number: SKIP, bank_branch_code: SKIP, bank_account_type: SKIP, bank_account_holder_type: SKIP, last_four: SKIP, additional_properties: {}) ⇒ CreatePaymentProfile
constructor
A new instance of CreatePaymentProfile.
-
#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, #get_additional_properties, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(chargify_token: SKIP, id: SKIP, payment_type: SKIP, first_name: SKIP, last_name: SKIP, masked_card_number: SKIP, full_number: SKIP, card_type: SKIP, expiration_month: SKIP, expiration_year: SKIP, billing_address: SKIP, billing_address_2: SKIP, billing_city: SKIP, billing_state: SKIP, billing_country: SKIP, billing_zip: SKIP, current_vault: SKIP, vault_token: SKIP, customer_vault_token: SKIP, customer_id: SKIP, paypal_email: SKIP, payment_method_nonce: SKIP, gateway_handle: SKIP, cvv: SKIP, bank_name: SKIP, bank_iban: SKIP, bank_routing_number: SKIP, bank_account_number: SKIP, bank_branch_code: SKIP, bank_account_type: SKIP, bank_account_holder_type: SKIP, last_four: SKIP, additional_properties: {}) ⇒ CreatePaymentProfile
Returns a new instance of CreatePaymentProfile.
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 267 def initialize(chargify_token: SKIP, id: SKIP, payment_type: SKIP, first_name: SKIP, last_name: SKIP, masked_card_number: SKIP, full_number: SKIP, card_type: SKIP, expiration_month: SKIP, expiration_year: SKIP, billing_address: SKIP, billing_address_2: SKIP, billing_city: SKIP, billing_state: SKIP, billing_country: SKIP, billing_zip: SKIP, current_vault: SKIP, vault_token: SKIP, customer_vault_token: SKIP, customer_id: SKIP, paypal_email: SKIP, payment_method_nonce: SKIP, gateway_handle: SKIP, cvv: SKIP, bank_name: SKIP, bank_iban: SKIP, bank_routing_number: SKIP, bank_account_number: SKIP, bank_branch_code: SKIP, bank_account_type: SKIP, bank_account_holder_type: SKIP, last_four: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end @chargify_token = chargify_token unless chargify_token == SKIP @id = id unless id == SKIP @payment_type = payment_type unless payment_type == SKIP @first_name = first_name unless first_name == SKIP @last_name = last_name unless last_name == SKIP @masked_card_number = masked_card_number unless masked_card_number == SKIP @full_number = full_number unless full_number == SKIP @card_type = card_type unless card_type == SKIP @expiration_month = expiration_month unless expiration_month == SKIP @expiration_year = expiration_year unless expiration_year == SKIP @billing_address = billing_address unless billing_address == SKIP @billing_address_2 = billing_address_2 unless billing_address_2 == SKIP @billing_city = billing_city unless billing_city == SKIP @billing_state = billing_state unless billing_state == SKIP @billing_country = billing_country unless billing_country == SKIP @billing_zip = billing_zip unless billing_zip == SKIP @current_vault = current_vault unless current_vault == SKIP @vault_token = vault_token unless vault_token == SKIP @customer_vault_token = customer_vault_token unless customer_vault_token == SKIP @customer_id = customer_id unless customer_id == SKIP @paypal_email = paypal_email unless paypal_email == SKIP @payment_method_nonce = payment_method_nonce unless payment_method_nonce == SKIP @gateway_handle = gateway_handle unless gateway_handle == SKIP @cvv = cvv unless cvv == SKIP @bank_name = bank_name unless bank_name == SKIP @bank_iban = bank_iban unless bank_iban == SKIP @bank_routing_number = bank_routing_number unless bank_routing_number == SKIP @bank_account_number = bank_account_number unless bank_account_number == SKIP @bank_branch_code = bank_branch_code unless bank_branch_code == SKIP @bank_account_type = bank_account_type unless bank_account_type == SKIP @bank_account_holder_type = bank_account_holder_type unless bank_account_holder_type == SKIP @last_four = last_four unless last_four == SKIP end |
Instance Attribute Details
#bank_account_holder_type ⇒ BankAccountHolderType
Defaults to personal
177 178 179 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 177 def bank_account_holder_type @bank_account_holder_type end |
#bank_account_number ⇒ String
(Required when creating with ACH, GoCardless, Stripe BECS or BACS Direct Debit, and bank_iban is blank) The customerʼs bank account number
164 165 166 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 164 def bank_account_number @bank_account_number end |
#bank_account_type ⇒ BankAccountType
Defaults to checking
173 174 175 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 173 def bank_account_type @bank_account_type end |
#bank_branch_code ⇒ String
(Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided
169 170 171 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 169 def bank_branch_code @bank_branch_code end |
#bank_iban ⇒ String
(Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided
153 154 155 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 153 def bank_iban @bank_iban end |
#bank_name ⇒ String
(Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides
147 148 149 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 147 def bank_name @bank_name end |
#bank_routing_number ⇒ String
(Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API
159 160 161 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 159 def bank_routing_number @bank_routing_number end |
#billing_address ⇒ String
The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway.
65 66 67 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 65 def billing_address @billing_address end |
#billing_address_2 ⇒ String
Second line of the customer’s billing address i.e. Apt. 100
69 70 71 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 69 def billing_address_2 @billing_address_2 end |
#billing_city ⇒ String
The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway.
74 75 76 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 74 def billing_city @billing_city end |
#billing_country ⇒ String
The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.
91 92 93 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 91 def billing_country @billing_country end |
#billing_state ⇒ String
The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.
82 83 84 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 82 def billing_state @billing_state end |
#billing_zip ⇒ String
The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway.
96 97 98 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 96 def billing_zip @billing_zip end |
#card_type ⇒ CardType
The type of card used.
48 49 50 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 48 def card_type @card_type end |
#chargify_token ⇒ String
Token received after sending billing information using Maxio.js (formerly Chargify.js).
15 16 17 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 15 def chargify_token @chargify_token end |
#current_vault ⇒ AllVaults
The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.
101 102 103 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 101 def current_vault @current_vault end |
#customer_id ⇒ Integer
(Required when creating a new payment profile) The Chargify customer id.
115 116 117 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 115 def customer_id @customer_id end |
#customer_vault_token ⇒ String
(only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token
111 112 113 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 111 def customer_vault_token @customer_vault_token end |
#cvv ⇒ String
The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway.
142 143 144 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 142 def cvv @cvv end |
#expiration_month ⇒ Object
(Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5
54 55 56 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 54 def expiration_month @expiration_month end |
#expiration_year ⇒ Object
(Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012
60 61 62 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 60 def expiration_year @expiration_year end |
#first_name ⇒ String
First name on card or bank account. If omitted, the first_name from customer attributes will be used.
30 31 32 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 30 def first_name @first_name end |
#full_number ⇒ String
The full credit card number
44 45 46 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 44 def full_number @full_number end |
#gateway_handle ⇒ String
This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](chargify.zendesk.com/hc/en-us/articles/4407761759643# connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed.
137 138 139 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 137 def gateway_handle @gateway_handle end |
#id ⇒ Integer
Token received after sending billing information using Maxio.js (formerly Chargify.js).
20 21 22 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 20 def id @id end |
#last_four ⇒ String
(Optional) Used for creating subscription with payment profile imported using vault_token, for proper display in Advanced Billing UI
182 183 184 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 182 def last_four @last_four end |
#last_name ⇒ String
Last name on card or bank account. If omitted, the last_name from customer attributes will be used.
35 36 37 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 35 def last_name @last_name end |
#masked_card_number ⇒ String
Last name on card or bank account. If omitted, the last_name from customer attributes will be used.
40 41 42 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 40 def masked_card_number @masked_card_number end |
#payment_method_nonce ⇒ String
used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead.
125 126 127 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 125 def payment_method_nonce @payment_method_nonce end |
#payment_type ⇒ PaymentType
Token received after sending billing information using Maxio.js (formerly Chargify.js).
25 26 27 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 25 def payment_type @payment_type end |
#paypal_email ⇒ String
used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead.
120 121 122 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 120 def paypal_email @paypal_email end |
#vault_token ⇒ String
The “token” provided by your vault storage for an already stored payment profile
106 107 108 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 106 def vault_token @vault_token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 321 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. chargify_token = hash.key?('chargify_token') ? hash['chargify_token'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP first_name = hash.key?('first_name') ? hash['first_name'] : SKIP last_name = hash.key?('last_name') ? hash['last_name'] : SKIP masked_card_number = hash.key?('masked_card_number') ? hash['masked_card_number'] : SKIP full_number = hash.key?('full_number') ? hash['full_number'] : SKIP card_type = hash.key?('card_type') ? hash['card_type'] : SKIP expiration_month = hash.key?('expiration_month') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:CreatePaymentProfileExpirationMonth), hash['expiration_month'] ) : SKIP expiration_year = hash.key?('expiration_year') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:CreatePaymentProfileExpirationYear), hash['expiration_year'] ) : SKIP billing_address = hash.key?('billing_address') ? hash['billing_address'] : SKIP billing_address_2 = hash.key?('billing_address_2') ? hash['billing_address_2'] : SKIP billing_city = hash.key?('billing_city') ? hash['billing_city'] : SKIP billing_state = hash.key?('billing_state') ? hash['billing_state'] : SKIP billing_country = hash.key?('billing_country') ? hash['billing_country'] : SKIP billing_zip = hash.key?('billing_zip') ? hash['billing_zip'] : SKIP current_vault = hash.key?('current_vault') ? hash['current_vault'] : SKIP vault_token = hash.key?('vault_token') ? hash['vault_token'] : SKIP customer_vault_token = hash.key?('customer_vault_token') ? hash['customer_vault_token'] : SKIP customer_id = hash.key?('customer_id') ? hash['customer_id'] : SKIP paypal_email = hash.key?('paypal_email') ? hash['paypal_email'] : SKIP payment_method_nonce = hash.key?('payment_method_nonce') ? hash['payment_method_nonce'] : SKIP gateway_handle = hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP cvv = hash.key?('cvv') ? hash['cvv'] : SKIP bank_name = hash.key?('bank_name') ? hash['bank_name'] : SKIP bank_iban = hash.key?('bank_iban') ? hash['bank_iban'] : SKIP bank_routing_number = hash.key?('bank_routing_number') ? hash['bank_routing_number'] : SKIP bank_account_number = hash.key?('bank_account_number') ? hash['bank_account_number'] : SKIP bank_branch_code = hash.key?('bank_branch_code') ? hash['bank_branch_code'] : SKIP bank_account_type = hash.key?('bank_account_type') ? hash['bank_account_type'] : SKIP bank_account_holder_type = hash.key?('bank_account_holder_type') ? hash['bank_account_holder_type'] : SKIP last_four = hash.key?('last_four') ? hash['last_four'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } # Create object from extracted values. CreatePaymentProfile.new(chargify_token: chargify_token, id: id, payment_type: payment_type, first_name: first_name, last_name: last_name, masked_card_number: masked_card_number, full_number: full_number, card_type: card_type, expiration_month: expiration_month, expiration_year: expiration_year, billing_address: billing_address, billing_address_2: billing_address_2, billing_city: billing_city, billing_state: billing_state, billing_country: billing_country, billing_zip: billing_zip, current_vault: current_vault, vault_token: vault_token, customer_vault_token: customer_vault_token, customer_id: customer_id, paypal_email: paypal_email, payment_method_nonce: payment_method_nonce, gateway_handle: gateway_handle, cvv: cvv, bank_name: bank_name, bank_iban: bank_iban, bank_routing_number: bank_routing_number, bank_account_number: bank_account_number, bank_branch_code: bank_branch_code, bank_account_type: bank_account_type, bank_account_holder_type: bank_account_holder_type, last_four: last_four, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
185 186 187 188 189 190 191 192 193 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 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 185 def self.names @_hash = {} if @_hash.nil? @_hash['chargify_token'] = 'chargify_token' @_hash['id'] = 'id' @_hash['payment_type'] = 'payment_type' @_hash['first_name'] = 'first_name' @_hash['last_name'] = 'last_name' @_hash['masked_card_number'] = 'masked_card_number' @_hash['full_number'] = 'full_number' @_hash['card_type'] = 'card_type' @_hash['expiration_month'] = 'expiration_month' @_hash['expiration_year'] = 'expiration_year' @_hash['billing_address'] = 'billing_address' @_hash['billing_address_2'] = 'billing_address_2' @_hash['billing_city'] = 'billing_city' @_hash['billing_state'] = 'billing_state' @_hash['billing_country'] = 'billing_country' @_hash['billing_zip'] = 'billing_zip' @_hash['current_vault'] = 'current_vault' @_hash['vault_token'] = 'vault_token' @_hash['customer_vault_token'] = 'customer_vault_token' @_hash['customer_id'] = 'customer_id' @_hash['paypal_email'] = 'paypal_email' @_hash['payment_method_nonce'] = 'payment_method_nonce' @_hash['gateway_handle'] = 'gateway_handle' @_hash['cvv'] = 'cvv' @_hash['bank_name'] = 'bank_name' @_hash['bank_iban'] = 'bank_iban' @_hash['bank_routing_number'] = 'bank_routing_number' @_hash['bank_account_number'] = 'bank_account_number' @_hash['bank_branch_code'] = 'bank_branch_code' @_hash['bank_account_type'] = 'bank_account_type' @_hash['bank_account_holder_type'] = 'bank_account_holder_type' @_hash['last_four'] = 'last_four' @_hash end |
.nullables ⇒ Object
An array for nullable fields
261 262 263 264 265 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 261 def self.nullables %w[ billing_address_2 ] end |
.optionals ⇒ Object
An array for optional fields
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 256 257 258 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 223 def self.optionals %w[ chargify_token id payment_type first_name last_name masked_card_number full_number card_type expiration_month expiration_year billing_address billing_address_2 billing_city billing_state billing_country billing_zip current_vault vault_token customer_vault_token customer_id paypal_email payment_method_nonce gateway_handle cvv bank_name bank_iban bank_routing_number bank_account_number bank_branch_code bank_account_type bank_account_holder_type last_four ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
416 417 418 419 420 421 422 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 416 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 445 def inspect class_name = self.class.name.split('::').last "<#{class_name} chargify_token: #{@chargify_token.inspect}, id: #{@id.inspect},"\ " payment_type: #{@payment_type.inspect}, first_name: #{@first_name.inspect}, last_name:"\ " #{@last_name.inspect}, masked_card_number: #{@masked_card_number.inspect}, full_number:"\ " #{@full_number.inspect}, card_type: #{@card_type.inspect}, expiration_month:"\ " #{@expiration_month.inspect}, expiration_year: #{@expiration_year.inspect},"\ " billing_address: #{@billing_address.inspect}, billing_address_2:"\ " #{@billing_address_2.inspect}, billing_city: #{@billing_city.inspect}, billing_state:"\ " #{@billing_state.inspect}, billing_country: #{@billing_country.inspect}, billing_zip:"\ " #{@billing_zip.inspect}, current_vault: #{@current_vault.inspect}, vault_token:"\ " #{@vault_token.inspect}, customer_vault_token: #{@customer_vault_token.inspect},"\ " customer_id: #{@customer_id.inspect}, paypal_email: #{@paypal_email.inspect},"\ " payment_method_nonce: #{@payment_method_nonce.inspect}, gateway_handle:"\ " #{@gateway_handle.inspect}, cvv: #{@cvv.inspect}, bank_name: #{@bank_name.inspect},"\ " bank_iban: #{@bank_iban.inspect}, bank_routing_number: #{@bank_routing_number.inspect},"\ " bank_account_number: #{@bank_account_number.inspect}, bank_branch_code:"\ " #{@bank_branch_code.inspect}, bank_account_type: #{@bank_account_type.inspect},"\ " bank_account_holder_type: #{@bank_account_holder_type.inspect}, last_four:"\ " #{@last_four.inspect}, additional_properties: #{get_additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/advanced_billing/models/create_payment_profile.rb', line 425 def to_s class_name = self.class.name.split('::').last "<#{class_name} chargify_token: #{@chargify_token}, id: #{@id}, payment_type:"\ " #{@payment_type}, first_name: #{@first_name}, last_name: #{@last_name},"\ " masked_card_number: #{@masked_card_number}, full_number: #{@full_number}, card_type:"\ " #{@card_type}, expiration_month: #{@expiration_month}, expiration_year:"\ " #{@expiration_year}, billing_address: #{@billing_address}, billing_address_2:"\ " #{@billing_address_2}, billing_city: #{@billing_city}, billing_state: #{@billing_state},"\ " billing_country: #{@billing_country}, billing_zip: #{@billing_zip}, current_vault:"\ " #{@current_vault}, vault_token: #{@vault_token}, customer_vault_token:"\ " #{@customer_vault_token}, customer_id: #{@customer_id}, paypal_email: #{@paypal_email},"\ " payment_method_nonce: #{@payment_method_nonce}, gateway_handle: #{@gateway_handle}, cvv:"\ " #{@cvv}, bank_name: #{@bank_name}, bank_iban: #{@bank_iban}, bank_routing_number:"\ " #{@bank_routing_number}, bank_account_number: #{@bank_account_number}, bank_branch_code:"\ " #{@bank_branch_code}, bank_account_type: #{@bank_account_type}, bank_account_holder_type:"\ " #{@bank_account_holder_type}, last_four: #{@last_four}, additional_properties:"\ " #{get_additional_properties}>" end |