Skip to content

feat(customer_v2): add route for customer retrieve v2 #5516

Merged
likhinbopanna merged 125 commits intomainfrom
5842-customer-v2-refactor-get-customer
Aug 22, 2024
Merged

feat(customer_v2): add route for customer retrieve v2 #5516
likhinbopanna merged 125 commits intomainfrom
5842-customer-v2-refactor-get-customer

Conversation

@sahkal
Copy link
Contributor

@sahkal sahkal commented Aug 2, 2024

Type of Change

  • New feature

Description

add route for customer retrieve v2

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Test by creating customer and retrieving customer for v1 endpoint

Create Customer

curl --location 'http://localhost:8080/customers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_4TX9SFsxcLII74mKvo51F1ZzfIL9aOZWGE7t2Qz2Sp0TU9SWOthR75Lx9nEH37yg' \
--data-raw '{
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "First customer",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "address" : {
        "city":"siliguri"
    }
}'

Retrieve Customer

curl --location 'http://localhost:8080/customers/cus_Ucv56NVAJwH2hr6yG5A9' \
--header 'Accept: application/json' \
--header 'api-key: dev_4TX9SFsxcLII74mKvo51F1ZzfIL9aOZWGE7t2Qz2Sp0TU9SWOthR75Lx9nEH37yg'

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

Narayanbhat166 and others added 30 commits July 12, 2024 18:55
fixed ci checks
…1-customer-v2-refactor-customer-create-end-point
…#5329)

Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in>
@hyperswitch-bot hyperswitch-bot bot removed the M-database-changes Metadata: This PR involves database schema changes label Aug 15, 2024
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Aug 15, 2024
})
}

#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]


#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
#[instrument(skip_all)]
#[cfg(all(feature = "v2", feature = "customer_v2"))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[cfg(all(feature = "v2", feature = "customer_v2"))]

@sahkal sahkal requested a review from jarnura August 20, 2024 09:14
@sahkal sahkal removed request for a team August 21, 2024 07:59
jarnura
jarnura previously approved these changes Aug 21, 2024
@sahkal sahkal dismissed stale reviews from su-shivanshmathur and jarnura via aada81b August 22, 2024 12:55
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 22, 2024
Merged via the queue into main with commit 914cab0 Aug 22, 2024
@likhinbopanna likhinbopanna deleted the 5842-customer-v2-refactor-get-customer branch August 22, 2024 15:19
pixincreate added a commit that referenced this pull request Aug 23, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(connector): [Adyen] add dispute flows for adyen connector (#5514)
  chore(version): 2024.08.23.0
  feat(router): [cybersource] add disable_avs and disable_cvn flag in connector metadata  (#5667)
  feat(customer_v2): add route for customer retrieve v2  (#5516)
  chore(version): 2024.08.22.1
  fix(router): [Adyen]  prevent partial submission of billing address and add required fields for all payment methods (#5660)
  docs(README): Adding Contributors guide (#5184)
  Docs: Adding redirect url details (#5507)
  feat(global_id): create a `GlobalId` domain type (#5644)
  feat(router): collect customer address details based on business profile config regardless of connector required fields (#5418)
  feat: add new routes for profile level list apis (#5589)
  refactor(core):  Refactor fallback routing behaviour in payments for v2 (#5642)
  refactor(router): add connector_transaction_id, send response body and use admin_api_auth_with_merchant_id for payments manual update flow (#5658)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core flows api-v2 C-refactor Category: Refactor M-api-contract-changes Metadata: This PR involves API contract changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants