Class: GimmeGimme::FakeCimServer::CustomerPaymentProfile

Inherits:
Object
  • Object
show all
Includes:
RequestParser
Defined in:
lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RequestParser

#at

Constructor Details

#initialize(customer_payment_profile_id, document) ⇒ CustomerPaymentProfile

Returns a new instance of CustomerPaymentProfile.



200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 200

def initialize(customer_payment_profile_id, document)
  @document = document
  @customer_payment_profile_id  = customer_payment_profile_id

  @customer_profile_id  = at("customerProfileId").to_i
  @card_number          = at("cardNumber")
  @expiration_date      = at("expirationDate")
  @address              = at("address")
  @city                 = at("city")
  @state                = at("state")
  @zip                  = at("zip")
  @first_name           = at("firstName")
  @last_name            = at("lastName")
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def address
  @address
end

#card_numberObject (readonly)

Returns the value of attribute card_number.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def card_number
  @card_number
end

#cityObject (readonly)

Returns the value of attribute city.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def city
  @city
end

#customer_payment_profile_idObject (readonly)

Returns the value of attribute customer_payment_profile_id.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def customer_payment_profile_id
  @customer_payment_profile_id
end

#customer_profile_idObject (readonly)

Returns the value of attribute customer_profile_id.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def customer_profile_id
  @customer_profile_id
end

#expiration_dateObject (readonly)

Returns the value of attribute expiration_date.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def expiration_date
  @expiration_date
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def last_name
  @last_name
end

#stateObject (readonly)

Returns the value of attribute state.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def state
  @state
end

#zipObject (readonly)

Returns the value of attribute zip.



197
198
199
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 197

def zip
  @zip
end

Instance Method Details

#expiration_monthObject



215
216
217
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 215

def expiration_month
  expiration.month
end

#expiration_yearObject



219
220
221
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 219

def expiration_year
  expiration.year
end

#to_hashObject



229
230
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 229

def to_hash
end