Skip to content

Commit 0290400

Browse files
committed
chore: rename retrieve keyword to create
1 parent 4b393d0 commit 0290400

5 files changed

+20
-20
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Next Release
44

55
- Adds the following functions to assist ReferralCustomers add credit cards and bank accounts:
6-
- `BetaReferralCustomerService.retrieve_credit_card_client_secret`
7-
- `BetaReferralCustomerService.retrieve_bank_account_client_secret`
6+
- `BetaReferralCustomerService.create_credit_card_client_secret`
7+
- `BetaReferralCustomerService.create_bank_account_client_secret`
88
- `ReferralCustomerService.add_credit_card_from_stripe`
99
- `ReferralCustomerService.add_bank_account_from_stripe`
1010

easypost/services/beta_referral_customer_service.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def refund_by_payment_log(self, payment_log_id: str) -> Dict[str, Any]:
6969

7070
return convert_to_easypost_object(response=response)
7171

72-
def retrieve_credit_card_client_secret(self) -> Dict[str, Any]:
73-
"""Retrieves a client secret to use with Stripe when adding a credit card."""
72+
def create_credit_card_client_secret(self) -> Dict[str, Any]:
73+
"""Creates a client secret to use with Stripe when adding a credit card."""
7474
response = Requestor(self._client).request(
7575
method=RequestMethod.POST,
7676
url="/setup_intents",
@@ -79,8 +79,8 @@ def retrieve_credit_card_client_secret(self) -> Dict[str, Any]:
7979

8080
return convert_to_easypost_object(response=response)
8181

82-
def retrieve_bank_account_client_secret(self, return_url: Optional[str] = None) -> Dict[str, Any]:
83-
"""Retrieves a client secret to use with Stripe when adding a bank account."""
82+
def create_bank_account_client_secret(self, return_url: Optional[str] = None) -> Dict[str, Any]:
83+
"""Creates a client secret to use with Stripe when adding a bank account."""
8484
params = {"return_url": return_url}
8585

8686
response = Requestor(self._client).request(

tests/cassettes/test_beta_referral_customer_retrieve_bank_account_client_secret.yaml renamed to tests/cassettes/test_beta_referral_customer_create_bank_account_client_secret.yaml

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/cassettes/test_beta_referral_customer_retrieve_credit_card_client_secret.yaml renamed to tests/cassettes/test_beta_referral_customer_create_credit_card_client_secret.yaml

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/test_beta_referral_customer.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ def test_beta_referral_customer_refund_by_payment_log(referral_customer_prod_cli
4343

4444

4545
@pytest.mark.vcr()
46-
def test_beta_referral_customer_retrieve_credit_card_client_secret(referral_customer_prod_client):
46+
def test_beta_referral_customer_create_credit_card_client_secret(referral_customer_prod_client):
4747
"""This test requires a referral customer's production API key via REFERRAL_CUSTOMER_PROD_API_KEY."""
48-
response = referral_customer_prod_client.beta_referral_customer.retrieve_credit_card_client_secret()
48+
response = referral_customer_prod_client.beta_referral_customer.create_credit_card_client_secret()
4949

5050
assert str.startswith(response.client_secret, "seti_")
5151

5252

5353
@pytest.mark.vcr()
54-
def test_beta_referral_customer_retrieve_bank_account_client_secret(referral_customer_prod_client):
54+
def test_beta_referral_customer_create_bank_account_client_secret(referral_customer_prod_client):
5555
"""This test requires a referral customer's production API key via REFERRAL_CUSTOMER_PROD_API_KEY."""
56-
response = referral_customer_prod_client.beta_referral_customer.retrieve_bank_account_client_secret()
56+
response = referral_customer_prod_client.beta_referral_customer.create_bank_account_client_secret()
5757

5858
assert str.startswith(response.client_secret, "fcsess_client_secret_")

0 commit comments

Comments
 (0)