Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/api_resources/simulations/test_ach_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_path_params_acknowledge(self, client: Increase) -> None:
def test_method_create_notification_of_change(self, client: Increase) -> None:
ach_transfer = client.simulations.ach_transfers.create_notification_of_change(
ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
)
assert_matches_type(ACHTransfer, ach_transfer, path=["response"])
Expand All @@ -68,7 +68,7 @@ def test_method_create_notification_of_change(self, client: Increase) -> None:
def test_raw_response_create_notification_of_change(self, client: Increase) -> None:
response = client.simulations.ach_transfers.with_raw_response.create_notification_of_change(
ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
)

Expand All @@ -81,7 +81,7 @@ def test_raw_response_create_notification_of_change(self, client: Increase) -> N
def test_streaming_response_create_notification_of_change(self, client: Increase) -> None:
with client.simulations.ach_transfers.with_streaming_response.create_notification_of_change(
ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
) as response:
assert not response.is_closed
Expand All @@ -97,7 +97,7 @@ def test_path_params_create_notification_of_change(self, client: Increase) -> No
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"):
client.simulations.ach_transfers.with_raw_response.create_notification_of_change(
ach_transfer_id="",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
)

Expand Down Expand Up @@ -269,7 +269,7 @@ async def test_path_params_acknowledge(self, async_client: AsyncIncrease) -> Non
async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None:
ach_transfer = await async_client.simulations.ach_transfers.create_notification_of_change(
ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
)
assert_matches_type(ACHTransfer, ach_transfer, path=["response"])
Expand All @@ -278,7 +278,7 @@ async def test_method_create_notification_of_change(self, async_client: AsyncInc
async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None:
response = await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change(
ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
)

Expand All @@ -291,7 +291,7 @@ async def test_raw_response_create_notification_of_change(self, async_client: As
async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None:
async with async_client.simulations.ach_transfers.with_streaming_response.create_notification_of_change(
ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
) as response:
assert not response.is_closed
Expand All @@ -307,7 +307,7 @@ async def test_path_params_create_notification_of_change(self, async_client: Asy
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"):
await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change(
ach_transfer_id="",
change_code="incorrect_account_number",
change_code="incorrect_routing_number",
corrected_data="123456789",
)

Expand Down
20 changes: 10 additions & 10 deletions tests/api_resources/simulations/test_card_disputes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class TestCardDisputes:
def test_method_action(self, client: Increase) -> None:
card_dispute = client.simulations.card_disputes.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
)
assert_matches_type(CardDispute, card_dispute, path=["response"])

@parametrize
def test_method_action_with_all_params(self, client: Increase) -> None:
card_dispute = client.simulations.card_disputes.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
explanation="This was a valid recurring transaction",
)
assert_matches_type(CardDispute, card_dispute, path=["response"])
Expand All @@ -38,7 +38,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None:
def test_raw_response_action(self, client: Increase) -> None:
response = client.simulations.card_disputes.with_raw_response.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
)

assert response.is_closed is True
Expand All @@ -50,7 +50,7 @@ def test_raw_response_action(self, client: Increase) -> None:
def test_streaming_response_action(self, client: Increase) -> None:
with client.simulations.card_disputes.with_streaming_response.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -65,7 +65,7 @@ def test_path_params_action(self, client: Increase) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"):
client.simulations.card_disputes.with_raw_response.action(
card_dispute_id="",
status="pending_user_information",
status="rejected",
)


Expand All @@ -76,15 +76,15 @@ class TestAsyncCardDisputes:
async def test_method_action(self, async_client: AsyncIncrease) -> None:
card_dispute = await async_client.simulations.card_disputes.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
)
assert_matches_type(CardDispute, card_dispute, path=["response"])

@parametrize
async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None:
card_dispute = await async_client.simulations.card_disputes.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
explanation="This was a valid recurring transaction",
)
assert_matches_type(CardDispute, card_dispute, path=["response"])
Expand All @@ -93,7 +93,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease)
async def test_raw_response_action(self, async_client: AsyncIncrease) -> None:
response = await async_client.simulations.card_disputes.with_raw_response.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
)

assert response.is_closed is True
Expand All @@ -105,7 +105,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None:
async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None:
async with async_client.simulations.card_disputes.with_streaming_response.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="pending_user_information",
status="rejected",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -120,5 +120,5 @@ async def test_path_params_action(self, async_client: AsyncIncrease) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"):
await async_client.simulations.card_disputes.with_raw_response.action(
card_dispute_id="",
status="pending_user_information",
status="rejected",
)
16 changes: 8 additions & 8 deletions tests/api_resources/simulations/test_physical_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class TestPhysicalCards:
def test_method_advance_shipment(self, client: Increase) -> None:
physical_card = client.simulations.physical_cards.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
shipment_status="pending",
shipment_status="shipped",
)
assert_matches_type(PhysicalCard, physical_card, path=["response"])

@parametrize
def test_raw_response_advance_shipment(self, client: Increase) -> None:
response = client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
shipment_status="pending",
shipment_status="shipped",
)

assert response.is_closed is True
Expand All @@ -41,7 +41,7 @@ def test_raw_response_advance_shipment(self, client: Increase) -> None:
def test_streaming_response_advance_shipment(self, client: Increase) -> None:
with client.simulations.physical_cards.with_streaming_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
shipment_status="pending",
shipment_status="shipped",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -56,7 +56,7 @@ def test_path_params_advance_shipment(self, client: Increase) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"):
client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="",
shipment_status="pending",
shipment_status="shipped",
)


Expand All @@ -67,15 +67,15 @@ class TestAsyncPhysicalCards:
async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None:
physical_card = await async_client.simulations.physical_cards.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
shipment_status="pending",
shipment_status="shipped",
)
assert_matches_type(PhysicalCard, physical_card, path=["response"])

@parametrize
async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None:
response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
shipment_status="pending",
shipment_status="shipped",
)

assert response.is_closed is True
Expand All @@ -87,7 +87,7 @@ async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease)
async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None:
async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
shipment_status="pending",
shipment_status="shipped",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -102,5 +102,5 @@ async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -
with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"):
await async_client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="",
shipment_status="pending",
shipment_status="shipped",
)
8 changes: 4 additions & 4 deletions tests/api_resources/test_account_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def test_method_update(self, client: Increase) -> None:
def test_method_update_with_all_params(self, client: Increase) -> None:
account_number = client.account_numbers.update(
account_number_id="account_number_v18nkfqm6afpsrvy82b2",
inbound_ach={"debit_status": "allowed"},
inbound_ach={"debit_status": "blocked"},
inbound_checks={"status": "allowed"},
name="x",
status="active",
status="disabled",
)
assert_matches_type(AccountNumber, account_number, path=["response"])

Expand Down Expand Up @@ -292,10 +292,10 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None:
async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None:
account_number = await async_client.account_numbers.update(
account_number_id="account_number_v18nkfqm6afpsrvy82b2",
inbound_ach={"debit_status": "allowed"},
inbound_ach={"debit_status": "blocked"},
inbound_checks={"status": "allowed"},
name="x",
status="active",
status="disabled",
)
assert_matches_type(AccountNumber, account_number, path=["response"])

Expand Down
24 changes: 12 additions & 12 deletions tests/api_resources/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
"name": "Ian Crease",
"confirmed_no_us_tax_id": True,
},
"prongs": ["ownership"],
"prongs": ["control"],
"company_title": "CEO",
}
],
Expand Down Expand Up @@ -516,7 +516,7 @@ def test_method_create_beneficial_owner(self, client: Increase) -> None:
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
)
assert_matches_type(Entity, entity, path=["response"])
Expand Down Expand Up @@ -561,7 +561,7 @@ def test_method_create_beneficial_owner_with_all_params(self, client: Increase)
"name": "Ian Crease",
"confirmed_no_us_tax_id": True,
},
"prongs": ["ownership"],
"prongs": ["control"],
"company_title": "CEO",
},
)
Expand All @@ -584,7 +584,7 @@ def test_raw_response_create_beneficial_owner(self, client: Increase) -> None:
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
)

Expand All @@ -610,7 +610,7 @@ def test_streaming_response_create_beneficial_owner(self, client: Increase) -> N
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
) as response:
assert not response.is_closed
Expand Down Expand Up @@ -639,7 +639,7 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None:
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
)

Expand Down Expand Up @@ -895,7 +895,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
"name": "Ian Crease",
"confirmed_no_us_tax_id": True,
},
"prongs": ["ownership"],
"prongs": ["control"],
"company_title": "CEO",
}
],
Expand Down Expand Up @@ -1334,7 +1334,7 @@ async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease)
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
)
assert_matches_type(Entity, entity, path=["response"])
Expand Down Expand Up @@ -1379,7 +1379,7 @@ async def test_method_create_beneficial_owner_with_all_params(self, async_client
"name": "Ian Crease",
"confirmed_no_us_tax_id": True,
},
"prongs": ["ownership"],
"prongs": ["control"],
"company_title": "CEO",
},
)
Expand All @@ -1402,7 +1402,7 @@ async def test_raw_response_create_beneficial_owner(self, async_client: AsyncInc
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
)

Expand All @@ -1428,7 +1428,7 @@ async def test_streaming_response_create_beneficial_owner(self, async_client: As
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
) as response:
assert not response.is_closed
Expand Down Expand Up @@ -1457,7 +1457,7 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr
},
"name": "Ian Crease",
},
"prongs": ["ownership"],
"prongs": ["control"],
},
)

Expand Down
Loading