The UpdateCreditCard actor-chain is used to add a new credit card within a customer profile. This chain can be used to add a credit card to an existing customer address, or associated it with a new address.

Parameter

Description

createNewAddress

Identifies if a new address will be created in the customer profile.

creditCardId

The ID of the credit card to edit.

creditCardType

The type of credit card to edit.

creditCardNumber

The credit card number.

expirationMonth

The month the credit card expires.

expirationYear

The year the credit card expires.

billingAddressRepositoryId

The ID of the billing address repository.

firstName

The first name of the customer associated with this billing address.

middleName

The middle name or initial of the customer associated with this billing address.

lastName

The last name of the customer associated with this billing address.

address1

The first address field of the billing address.

address2

The second address field of the billing address.

city

The city of the billing address.

state

The state or province of the billing address.

postalCode

The postal code of the billing address.

country

The country of the billing address.

phoneNumber

The phone number associated with this billing address.

setBillingAddress

Boolean value that sets the address as the default billing address.

setShippingAddress

Boolean value that sets the address as the default shipping address.

defaultCreditCardSetDefault

If set to true, this becomes the default credit card.

Update Credit Card in Customer Profile Example

The following example shows how to update a credit card with an existing address. The createNewAddress parameter is set to false, indicating that the call should not create a new address.

curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{
"createNewAddress":"false", "creditCardId":\"usercc99050003\",
"billingAddressRepositoryId":\"380016\", "creditCardType":"Visa",
"creditCardNumber":"4111111111111111", "expirationMonth":"1",
"expirationYear":"2022" }" "http://localhost:8280/rest/model/atg/commerce/
custsvc/repository/CreditCardActor/updateCreditCard"

The following example shows how to update a credit card with a new address. The createNewAddress parameter is set to true, indicating that the call should create a new address.

curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{
"createNewAddress":"true", "creditCardId":\"usercc99050003\",
"billingAddressRepositoryId":\"380016\", "creditCardType":
"visa","creditCardNumber": "4111111111111111","expirationMonth":
"1","expirationYear": "2023", "firstName":"John", "lastName":"Smith",
"address1": \"1 Main Street\", "city":"Cambridge", "state":"MA", "country":"USA",
"postalCode": "12468" }" "http://localhost:8280/rest/model/atg/commerce/
custsvc/repository/CreditCardActor/updateCreditCard"

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices