Class: GimmeGimme::FakeCimServer::CustomerProfile

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_profile_id, document) ⇒ CustomerProfile

Returns a new instance of CustomerProfile.



173
174
175
176
177
178
179
180
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 173

def initialize(customer_profile_id, document)
  @document = document

  @customer_profile_id = customer_profile_id

  @customer_type        = at("customerType")
  @merchant_customer_id = at("merchantCustomerId")
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def address
  @address
end

#card_numberObject (readonly)

Returns the value of attribute card_number.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def card_number
  @card_number
end

#cityObject (readonly)

Returns the value of attribute city.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def city
  @city
end

#customer_payment_profile_idObject

Returns the value of attribute customer_payment_profile_id.



171
172
173
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 171

def customer_payment_profile_id
  @customer_payment_profile_id
end

#customer_profile_idObject (readonly)

Returns the value of attribute customer_profile_id.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def customer_profile_id
  @customer_profile_id
end

#customer_typeObject (readonly)

Returns the value of attribute customer_type.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def customer_type
  @customer_type
end

#expiration_dateObject (readonly)

Returns the value of attribute expiration_date.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def expiration_date
  @expiration_date
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def last_name
  @last_name
end

#merchant_customer_idObject (readonly)

Returns the value of attribute merchant_customer_id.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def merchant_customer_id
  @merchant_customer_id
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def phone_number
  @phone_number
end

#stateObject (readonly)

Returns the value of attribute state.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def state
  @state
end

#zipObject (readonly)

Returns the value of attribute zip.



168
169
170
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 168

def zip
  @zip
end

Instance Method Details

#to_hashObject



184
185
186
187
188
189
190
191
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 184

def to_hash
  {
    :profile => {
      :customerProfileId => customer_profile_id,
      :paymentProfiles   => { :customerPaymentProfileId => customer_payment_profile_id }
    }
  }
end