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 |
---|---|
| Identifies if a new address will be created in the customer profile. |
| The ID of the credit card to edit. |
| The type of credit card to edit. |
| The credit card number. |
| The month the credit card expires. |
| The year the credit card expires. |
| The ID of the billing address repository. |
| The first name of the customer associated with this billing address. |
| The middle name or initial of the customer associated with this billing address. |
| The last name of the customer associated with this billing address. |
| The first address field of the billing address. |
| The second address field of the billing address. |
| The city of the billing address. |
| The state or province of the billing address. |
| The postal code of the billing address. |
| The country of the billing address. |
| The phone number associated with this billing address. |
| Boolean value that sets the address as the default billing address. |
| Boolean value that sets the address as the default shipping address. |
| If set to |
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"