Skip to content

Commit

Permalink
feat: Override payment method (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-daxiom authored Dec 21, 2024
1 parent f55b806 commit 903582f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion strr-api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "strr-api"
version = "0.0.30"
version = "0.0.31"
description = ""
authors = ["thorwolpert <thor@wolpert.ca>"]
license = "BSD 3-Clause"
Expand Down
3 changes: 3 additions & 0 deletions strr-api/src/strr_api/services/payment_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def _get_payment_request(self, application_json):

payload = {"filingInfo": {"filingTypes": [filing_type_dict]}, "businessInfo": {"corpType": "STRR"}}

if application_json.get("header", {}).get("paymentMethod") == "DIRECT_PAY":
payload["paymentInfo"] = {"methodOfPayment": "DIRECT_PAY"}

if UserService.is_automation_tester():
payload["skipPayment"] = True

Expand Down
4 changes: 2 additions & 2 deletions strr-api/tests/postman/strr-api.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "f863e644-049a-42ce-a09c-47f9bbaabb03",
"_postman_id": "629e451d-4185-4cba-9389-f42c174c2890",
"name": "strr-api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "31792407"
Expand Down Expand Up @@ -50,7 +50,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"registration\": {\n \"registrationType\": \"HOST\",\n \"primaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"First\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mickey\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-999-9999\",\n \"extension\": \"x64\",\n \"faxNumber\": \"604-777-7777\",\n \"emailAddress\": \"test@test.test\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"secondaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"Other\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mouse\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-888-8888\",\n \"extension\": \"\",\n \"faxNumber\": \"\",\n \"emailAddress\": \"test2@test.test\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"unitAddress\": {\n \"nickname\": \"My Rental Property\",\n \"country\": \"CA\",\n \"unitNumber\": \"\",\n \"streetNumber\": \"12166\",\n \"streetName\": \"GREENWELL ST MAPLE RIDGE\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 7N1\"\n },\n \"strRequirements\": {\n \"isBusinessLicenceRequired\": false,\n \"isPrincipalResidenceRequired\": true,\n \"isStrProhibited\": false,\n \"isStraaExempt\": null,\n \"organizationNm\": \"City of Maple Ridge\"\n },\n \"unitDetails\": {\n \"parcelIdentifier\": \"000-460-991\",\n \"businessLicense\": \"7777777\",\n \"businessLicenseExpiryDate\": \"2025-01-01\",\n \"propertyType\": \"SINGLE_FAMILY_HOME\",\n \"ownershipType\": \"OWN\",\n \"rentalUnitSpaceType\": \"ENTIRE_HOME\",\n \"hostResidence\": \"SAME_UNIT\",\n \"isUnitOnPrincipalResidenceProperty\": true,\n \"numberOfRoomsForRent\": 1,\n \"prExemptReason\": \"FRACTIONAL_OWNERSHIP\"\n },\n \"listingDetails\": [\n {\n \"url\": \"https://www.airbnb.ca/rooms/26359027\"\n }\n ],\n \"documents\": [\n {\n \"fileName\": \"Drivers License\",\n \"fileType\": \"pdf\",\n \"fileKey\": \"a1234\",\n \"documentType\": \"BC_DRIVERS_LICENSE\"\n }\n ]\n }\n}",
"raw": "{\n \"header\": {\n \"paymentMethod\": \"DIRECT_PAY\"\n },\n \"registration\": {\n \"registrationType\": \"HOST\",\n \"primaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"First\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mickey\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-999-9999\",\n \"extension\": \"x64\",\n \"faxNumber\": \"604-777-7777\",\n \"emailAddress\": \"test@test.test\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"secondaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"Other\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mouse\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-888-8888\",\n \"extension\": \"\",\n \"faxNumber\": \"\",\n \"emailAddress\": \"test2@test.test\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"unitAddress\": {\n \"nickname\": \"My Rental Property\",\n \"country\": \"CA\",\n \"unitNumber\": \"\",\n \"streetNumber\": \"12166\",\n \"streetName\": \"GREENWELL ST MAPLE RIDGE\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 7N1\"\n },\n \"strRequirements\": {\n \"isBusinessLicenceRequired\": false,\n \"isPrincipalResidenceRequired\": true,\n \"isStrProhibited\": false,\n \"isStraaExempt\": null,\n \"organizationNm\": \"City of Maple Ridge\"\n },\n \"unitDetails\": {\n \"parcelIdentifier\": \"000-460-991\",\n \"businessLicense\": \"7777777\",\n \"businessLicenseExpiryDate\": \"2025-01-01\",\n \"propertyType\": \"SINGLE_FAMILY_HOME\",\n \"ownershipType\": \"OWN\",\n \"rentalUnitSpaceType\": \"ENTIRE_HOME\",\n \"hostResidence\": \"SAME_UNIT\",\n \"isUnitOnPrincipalResidenceProperty\": true,\n \"numberOfRoomsForRent\": 1,\n \"prExemptReason\": \"FRACTIONAL_OWNERSHIP\"\n },\n \"listingDetails\": [\n {\n \"url\": \"https://www.airbnb.ca/rooms/26359027\"\n }\n ],\n \"documents\": [\n {\n \"fileName\": \"Drivers License\",\n \"fileType\": \"pdf\",\n \"fileKey\": \"a1234\",\n \"documentType\": \"BC_DRIVERS_LICENSE\"\n }\n ]\n }\n}",
"options": {
"raw": {
"language": "json"
Expand Down

0 comments on commit 903582f

Please sign in to comment.