Skip to content

Commit 16cae4b

Browse files
author
brianmc
committed
updated shipping profile samples
1 parent cdeeab0 commit 16cae4b

4 files changed

Lines changed: 18 additions & 17 deletions

File tree

CustomerProfiles/create-customer-shipping-address.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
request = CreateCustomerShippingAddressRequest.new
1313

1414
request.address = CustomerAddressType.new('John','Doe')
15-
request.customerProfileId = '35803770'
16-
response = transaction.create_customer_shipping_adddress(request)
15+
request.customerProfileId = '35894174'
16+
response = transaction.create_customer_shipping_profile(request)
1717

1818

1919
if response.messages.resultCode == MessageTypeEnum::Ok

CustomerProfiles/delete-customer-shipping-address.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
request = DeleteCustomerShippingAddressRequest.new
1313
request.customerProfileId = '36551110'
14-
request.customerAddressId = '36551110'
14+
request.customerAddressId = '35894174'
1515

16-
response = transaction.delete_customer_shipping_address(request)
16+
response = transaction.delete_customer_shipping_profile(request)
1717

1818

1919
if response.messages.resultCode == MessageTypeEnum::Ok
20-
puts "Successfully deleted shipping address with customer payment profile id #{request.customerPaymentProfileId}"
20+
puts "Successfully deleted shipping address with customer shipping profile id #{request.customerAddressId}"
2121
else
2222
puts response.messages.messages[0].text
23-
raise "Failed to delete payment profile with profile id #{request.customerPaymentProfileId}"
23+
raise "Failed to delete payment profile with profile id #{request.customerAddressId}"
2424
end

CustomerProfiles/get-customer-shipping-address.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111

1212
request = GetCustomerShippingAddressRequest.new
13-
request.customerProfileId = '37115969'
14-
request.customerAddressId = '37115971'
13+
request.customerProfileId = '35894174'
14+
request.customerAddressId = '35745790'
1515

16-
response = transaction.get_customer_shipping_address(request)
16+
response = transaction.get_customer_shipping_profile(request)
1717

1818

1919
if response.messages.resultCode == MessageTypeEnum::Ok

CustomerProfiles/update-customer-shipping-address.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@
1010

1111

1212
request = UpdateCustomerShippingAddressRequest.new
13-
request.profile = CustomerProfileExType.new
1413

14+
15+
request.address = CustomerAddressExType.new('John','Doe','Anet','800 N 106th')
16+
1517
#Edit this part to select a specific customer
16-
request.profile.customerProfileId = "35704713"
17-
request.profile.merchantCustomerId = "mycustomer"
18-
request.profile.description = "john doe"
19-
request.profile.email = "email@email.com"
20-
response = transaction.update_customer_profile(request)
18+
request.address.customerAddressId = "35745790"
19+
request.customerProfileId = '35894174'
20+
21+
response = transaction.update_customer_shipping_profile(request)
2122

2223

2324
if response.messages.resultCode == MessageTypeEnum::Ok
24-
puts "Successfully updated customer with customer profile id #{request.profile.customerProfileId}"
25+
puts "Successfully updated customer with customer profile id #{request.address.customerAddressId}"
2526
else
2627
puts response.messages.messages[0].text
27-
raise "Failed to update customer with customer profile id #{request.profile.customerProfileId}"
28+
raise "Failed to update customer with customer profile id #{request.address.customerAddressId}"
2829
end

0 commit comments

Comments
 (0)