Class: AdvancedBilling::CreatedPaymentProfile

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/advanced_billing/models/created_payment_profile.rb

Overview

CreatedPaymentProfile Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(id = SKIP, first_name = SKIP, last_name = SKIP, masked_card_number = SKIP, card_type = SKIP, expiration_month = SKIP, expiration_year = SKIP, customer_id = SKIP, current_vault = SKIP, vault_token = SKIP, billing_address = SKIP, billing_city = SKIP, billing_state = SKIP, billing_zip = SKIP, billing_country = SKIP, customer_vault_token = SKIP, billing_address_2 = SKIP, payment_type = SKIP, bank_name = SKIP, masked_bank_routing_number = SKIP, masked_bank_account_number = SKIP, bank_account_type = SKIP, bank_account_holder_type = SKIP, verified = SKIP, site_gateway_setting_id = SKIP, gateway_handle = SKIP) ⇒ CreatedPaymentProfile

Returns a new instance of CreatedPaymentProfile.



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
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 207

def initialize(id = SKIP, first_name = SKIP, last_name = SKIP,
               masked_card_number = SKIP, card_type = SKIP,
               expiration_month = SKIP, expiration_year = SKIP,
               customer_id = SKIP, current_vault = SKIP, vault_token = SKIP,
               billing_address = SKIP, billing_city = SKIP,
               billing_state = SKIP, billing_zip = SKIP,
               billing_country = SKIP, customer_vault_token = SKIP,
               billing_address_2 = SKIP, payment_type = SKIP,
               bank_name = SKIP, masked_bank_routing_number = SKIP,
                = SKIP,  = SKIP,
                = SKIP, verified = SKIP,
               site_gateway_setting_id = SKIP, gateway_handle = SKIP)
  @id = id unless id == 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
  @card_type = card_type unless card_type == SKIP
  @expiration_month = expiration_month unless expiration_month == SKIP
  @expiration_year = expiration_year unless expiration_year == SKIP
  @customer_id = customer_id unless customer_id == SKIP
  @current_vault = current_vault unless current_vault == SKIP
  @vault_token = vault_token unless vault_token == SKIP
  @billing_address = billing_address unless billing_address == SKIP
  @billing_city = billing_city unless billing_city == SKIP
  @billing_state = billing_state unless billing_state == SKIP
  @billing_zip = billing_zip unless billing_zip == SKIP
  @billing_country = billing_country unless billing_country == SKIP
  @customer_vault_token = customer_vault_token unless customer_vault_token == SKIP
  @billing_address_2 = billing_address_2 unless billing_address_2 == SKIP
  @payment_type = payment_type unless payment_type == SKIP
  @bank_name = bank_name unless bank_name == SKIP
  unless masked_bank_routing_number == SKIP
    @masked_bank_routing_number =
      masked_bank_routing_number
  end
  unless  == SKIP
    @masked_bank_account_number =
      
  end
  @bank_account_type =  unless  == SKIP
  @bank_account_holder_type =  unless  == SKIP
  @verified = verified unless verified == SKIP
  @site_gateway_setting_id = site_gateway_setting_id unless site_gateway_setting_id == SKIP
  @gateway_handle = gateway_handle unless gateway_handle == SKIP
end

Instance Attribute Details

#bank_account_holder_typeString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


117
118
119
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 117

def 
  @bank_account_holder_type
end

#bank_account_typeString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


112
113
114
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 112

def 
  @bank_account_type
end

#bank_nameString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


97
98
99
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 97

def bank_name
  @bank_name
end

#billing_addressString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


57
58
59
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 57

def billing_address
  @billing_address
end

#billing_address_2String

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


87
88
89
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 87

def billing_address_2
  @billing_address_2
end

#billing_cityString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


62
63
64
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 62

def billing_city
  @billing_city
end

#billing_countryString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


77
78
79
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 77

def billing_country
  @billing_country
end

#billing_stateString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


67
68
69
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 67

def billing_state
  @billing_state
end

#billing_zipString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


72
73
74
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 72

def billing_zip
  @billing_zip
end

#card_typeString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 30

def card_type
  @card_type
end

#current_vaultCurrentVault

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:



47
48
49
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 47

def current_vault
  @current_vault
end

#customer_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


42
43
44
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 42

def customer_id
  @customer_id
end

#customer_vault_tokenString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


82
83
84
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 82

def customer_vault_token
  @customer_vault_token
end

#expiration_monthInteger

TODO: Write general description for this method

Returns:

  • (Integer)


34
35
36
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 34

def expiration_month
  @expiration_month
end

#expiration_yearInteger

TODO: Write general description for this method

Returns:

  • (Integer)


38
39
40
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 38

def expiration_year
  @expiration_year
end

#first_nameString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 18

def first_name
  @first_name
end

#gateway_handleString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


132
133
134
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 132

def gateway_handle
  @gateway_handle
end

#idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


14
15
16
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 14

def id
  @id
end

#last_nameString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 22

def last_name
  @last_name
end

#masked_bank_account_numberString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


107
108
109
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 107

def 
  @masked_bank_account_number
end

#masked_bank_routing_numberString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


102
103
104
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 102

def masked_bank_routing_number
  @masked_bank_routing_number
end

#masked_card_numberString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 26

def masked_card_number
  @masked_card_number
end

#payment_typeString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


92
93
94
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 92

def payment_type
  @payment_type
end

#site_gateway_setting_idInteger

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (Integer)


127
128
129
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 127

def site_gateway_setting_id
  @site_gateway_setting_id
end

#vault_tokenString

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (String)


52
53
54
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 52

def vault_token
  @vault_token
end

#verifiedTrueClass | FalseClass

The vault that stores the payment profile with the provided ‘vault_token`. Use `bogus` for testing.

Returns:

  • (TrueClass | FalseClass)


122
123
124
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 122

def verified
  @verified
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



254
255
256
257
258
259
260
261
262
263
264
265
266
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
319
320
321
322
323
324
325
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 254

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : 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
  card_type = hash.key?('card_type') ? hash['card_type'] : SKIP
  expiration_month =
    hash.key?('expiration_month') ? hash['expiration_month'] : SKIP
  expiration_year =
    hash.key?('expiration_year') ? hash['expiration_year'] : SKIP
  customer_id = hash.key?('customer_id') ? hash['customer_id'] : SKIP
  current_vault = hash.key?('current_vault') ? hash['current_vault'] : SKIP
  vault_token = hash.key?('vault_token') ? hash['vault_token'] : SKIP
  billing_address =
    hash.key?('billing_address') ? hash['billing_address'] : SKIP
  billing_city = hash.key?('billing_city') ? hash['billing_city'] : SKIP
  billing_state = hash.key?('billing_state') ? hash['billing_state'] : SKIP
  billing_zip = hash.key?('billing_zip') ? hash['billing_zip'] : SKIP
  billing_country =
    hash.key?('billing_country') ? hash['billing_country'] : SKIP
  customer_vault_token =
    hash.key?('customer_vault_token') ? hash['customer_vault_token'] : SKIP
  billing_address_2 =
    hash.key?('billing_address_2') ? hash['billing_address_2'] : SKIP
  payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP
  bank_name = hash.key?('bank_name') ? hash['bank_name'] : SKIP
  masked_bank_routing_number =
    hash.key?('masked_bank_routing_number') ? hash['masked_bank_routing_number'] : SKIP
   =
    hash.key?('masked_bank_account_number') ? hash['masked_bank_account_number'] : SKIP
   =
    hash.key?('bank_account_type') ? hash['bank_account_type'] : SKIP
   =
    hash.key?('bank_account_holder_type') ? hash['bank_account_holder_type'] : SKIP
  verified = hash.key?('verified') ? hash['verified'] : SKIP
  site_gateway_setting_id =
    hash.key?('site_gateway_setting_id') ? hash['site_gateway_setting_id'] : SKIP
  gateway_handle =
    hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP

  # Create object from extracted values.
  CreatedPaymentProfile.new(id,
                            first_name,
                            last_name,
                            masked_card_number,
                            card_type,
                            expiration_month,
                            expiration_year,
                            customer_id,
                            current_vault,
                            vault_token,
                            billing_address,
                            billing_city,
                            billing_state,
                            billing_zip,
                            billing_country,
                            customer_vault_token,
                            billing_address_2,
                            payment_type,
                            bank_name,
                            masked_bank_routing_number,
                            ,
                            ,
                            ,
                            verified,
                            site_gateway_setting_id,
                            gateway_handle)
end

.namesObject

A mapping from model property names to API property names.



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
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 135

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_city'] = 'billing_city'
  @_hash['billing_state'] = 'billing_state'
  @_hash['billing_zip'] = 'billing_zip'
  @_hash['billing_country'] = 'billing_country'
  @_hash['customer_vault_token'] = 'customer_vault_token'
  @_hash['billing_address_2'] = 'billing_address_2'
  @_hash['payment_type'] = 'payment_type'
  @_hash['bank_name'] = 'bank_name'
  @_hash['masked_bank_routing_number'] = 'masked_bank_routing_number'
  @_hash['masked_bank_account_number'] = 'masked_bank_account_number'
  @_hash['bank_account_type'] = 'bank_account_type'
  @_hash['bank_account_holder_type'] = 'bank_account_holder_type'
  @_hash['verified'] = 'verified'
  @_hash['site_gateway_setting_id'] = 'site_gateway_setting_id'
  @_hash['gateway_handle'] = 'gateway_handle'
  @_hash
end

.nullablesObject

An array for nullable fields



199
200
201
202
203
204
205
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 199

def self.nullables
  %w[
    masked_card_number
    customer_vault_token
    billing_address_2
  ]
end

.optionalsObject

An array for optional fields



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
192
193
194
195
196
# File 'lib/advanced_billing/models/created_payment_profile.rb', line 167

def self.optionals
  %w[
    id
    first_name
    last_name
    masked_card_number
    card_type
    expiration_month
    expiration_year
    customer_id
    current_vault
    vault_token
    billing_address
    billing_city
    billing_state
    billing_zip
    billing_country
    customer_vault_token
    billing_address_2
    payment_type
    bank_name
    masked_bank_routing_number
    masked_bank_account_number
    bank_account_type
    bank_account_holder_type
    verified
    site_gateway_setting_id
    gateway_handle
  ]
end