Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue to be able to order with BankAccount or CreditCard #390

Conversation

yomovh
Copy link
Contributor

@yomovh yomovh commented Feb 28, 2023

Description

The issue has been raised here

Type of change

  • [ x] Bug fix (non-breaking change which fixes an issue)

After investigation, the API route /me/paymentMean/bankAccount is deprecated and /me/paymentMean/creditCard will be soon.

The following /me/payment/method is replacing these.

The attribute payment_mean has been set as deprecated and the documentation has been updated accordingly.

Note that to simplify the implementation, the order now uses the default payment method defined by the account. The terraform user cannot choose a specific payment method.

How Has This Been Tested?

  • Test A: make testacc TESTARGS="-run TestAccDataSourceHostingPrivateDatabase_basic"
  • Test B: OVH_TESTACC_ORDER_CLOUD_PROJECT=1 make testacc TESTARGS="-run TestAccResourceCloudProject_basic"

with multiple configuration : credit card, bank account and Deferred payment account

Test Configuration:

  • Terraform version: terraform version: Terraform v1.3.7

Checklist:

  • [ x] My code follows the style guidelines of this project
  • [ x] I have performed a self-review of my code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [ x] I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings or issues
  • [ x] I have added acceptance tests that prove my fix is effective or that my feature works
  • [ x] New and existing acceptance tests pass locally with my changes
  • [ x] I ran succesfully go mod vendor if I added or modify go.mod file

…ted, creditcard will be soon) and update the order in order to use /me/payment/method default payment method which replaces it

tested with credit card, bank account and Deferred payment account
@yomovh yomovh requested a review from scraly February 28, 2023 15:28
@yomovh
Copy link
Contributor Author

yomovh commented Mar 6, 2023

Also fix #301

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add in the documentation the requirement to have a default payment mean :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add in the documentation the requirement to have a default payment mean :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add in the documentation the requirement to have a default payment mean :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add in the documentation the requirement to have a default payment mean :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add in the documentation the requirement to have a default payment mean :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add in the documentation the requirement to have a default payment mean :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not done in this one since the example for attach an ip to a vrack does not require to make an order.

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 23, 2023

CDS Report terraform-provider-ovh-check#1547.0 ✔
*

  • checks ✔

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 23, 2023

CDS Report terraform-provider-ovh-check#1546.0 ✔
*

  • checks ✔

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 23, 2023

CDS Report terraform-provider-ovh-testacc#1546.0 ✘
*

  • checks ✘

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 23, 2023

CDS Report terraform-provider-ovh-check#1547.0 ✔
*

  • checks ✔

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 23, 2023

CDS Report terraform-provider-ovh-testacc#1547.0 ■
*

  • checks ■

1 similar comment
@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 23, 2023

CDS Report terraform-provider-ovh-testacc#1547.0 ■
*

  • checks ■

Copy link
Collaborator

@scraly scraly left a comment

Choose a reason for hiding this comment

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

a little suggestion for all the documentation pages when needed :)
thanks

@@ -12,7 +12,7 @@ Orders a public cloud project.

## Important

This resource is in beta state. Use with caution.
-> __NOTE__ To order a product with terraform, your account needs to have a default payment method defined. This can be done in the [console](https://www.ovh.com/manager/#/dedicated/billing/payment/method) or via API with the [/me/payment/method](https://api.ovh.com/console/#/me/payment/method~GET) routes
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
-> __NOTE__ To order a product with terraform, your account needs to have a default payment method defined. This can be done in the [console](https://www.ovh.com/manager/#/dedicated/billing/payment/method) or via API with the [/me/payment/method](https://api.ovh.com/console/#/me/payment/method~GET) routes
-> __NOTE__ To order a product through Terraform, your account needs to have a default payment method defined. This can be done in the [OVHcloud Control Panel](https://www.ovh.com/manager/#/dedicated/billing/payment/method) or via API with the [/me/payment/method](https://api.ovh.com/console/#/me/payment/method~GET) endpoint.

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 24, 2023

CDS Report terraform-provider-ovh-check#1551.0 ✔
*

  • checks ✔

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 24, 2023

CDS Report terraform-provider-ovh-check#1550.0 ✔
*

  • checks ✔

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 24, 2023

CDS Report terraform-provider-ovh-testacc#1550.0 ✘
*

  • checks ✘

@ovh-cds
Copy link
Collaborator

ovh-cds commented Mar 24, 2023

CDS Report terraform-provider-ovh-testacc#1551.0 ✘
*

  • checks ✘

@scraly scraly added the 0.29.0 label Mar 24, 2023
@scraly scraly merged commit 3439655 into master Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'ovh_vrack' creation : 'default-payment-mean' does not work for 'payment_mean'
3 participants