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

[DE-874] Release 4.0.0 #44

Merged
merged 1 commit into from
Jun 25, 2024
Merged

[DE-874] Release 4.0.0 #44

merged 1 commit into from
Jun 25, 2024

Conversation

michalpierog
Copy link
Contributor

@michalpierog michalpierog commented Jun 25, 2024

DE-874 Increase timeout to 120s by default
SUB-3996 Ability to create products using the product family handle
IN-3434 Add API endpoints for finding price points by handle. Move PricePoint methods from ComponentsController to ComponentPricePointsController

Summary by CodeRabbit

  • New Features

    • Introduced the ComponentPricePointsController for managing component price points.
    • Added detailed examples for using handles with IDs in product and price point identifiers.
  • Enhancements

    • Updated the SDK version to 4.0.0.
    • Increased default connection timeout value from 30 to 120.
    • Improved input parameter descriptions and examples in the documentation.
  • Documentation

    • Updated URLs and links to documentation reflecting the new version.
    • Added new documentation for component price points and related operations.

Copy link

swarmia bot commented Jun 25, 2024

✅  Linked to Task DE-874 · Release SDK 4.0

Copy link

coderabbitai bot commented Jun 25, 2024

Walkthrough

The updates primarily focus on upgrading the maxio-advanced-billing-sdk from 3.0.1 to 4.0.0. Key changes include updating version numbers, default timeout values, URLs, and documentation links. Specific functionality enhancements involve the introduction of the ComponentPricePointsController and modifications to methods handling product family and price points.

Changes

Files and Groups Summaries
Version and URLs
README.md Updated installation command, URLs, and documentation links to version 4.0.0.
pyproject.toml Incremented version from 3.0.1 to 4.0.0.

| Timeout Value |
| advancedbilling/configuration.py | Changed default timeout in the Configuration class from 30 to 120. |
| advancedbilling/advanced_billing_client.py | Adjusted timeout value in the __init__ method from 30 to 120. |
| doc/client.md | Documentation updated to reflect the new default timeout value of 120. |

| Controllers and Functional Updates |
| advancedbilling/advanced_billing_client.py | Imported ComponentPricePointsController and added new component_price_points property. |
| advancedbilling/controllers/__init__.py | Added component_price_points_controller to the list of controllers. |
| advancedbilling/controllers/base_controller.py | Updated the user agent string to reflect version 4.0.0. |
| advancedbilling/controllers/component_price_points_controller.py | New controller for managing component price points. |
| advancedbilling/controllers/components_controller.py | Removed methods and references related to component price points. |
| advancedbilling/controllers/product_families_controller.py | Updated product_family_id parameter to accept string type. |
| advancedbilling/controllers/product_price_points_controller.py | Enhanced descriptions and added examples for using handles with IDs. |
| advancedbilling/controllers/products_controller.py | Changed product_family_id type from int to str in create_product method. |
| advancedbilling/http/auth/basic_auth.py | Swapped the order of two lines within the __init__ method. |
| advancedbilling/utilities/union_type_lookup.py | Included new templates for component price point operations. |

| Documentation Updates |
| doc/controllers/component-price-points.md | New file documenting component price points management. |
| doc/controllers/components.md | Removed documentation for functions managing component price points. |
| doc/controllers/product-families.md | Modified parameter type for product_family_id from int to str. |
| doc/controllers/product-price-points.md | Clarified descriptions for retrieving product price points. |
| doc/controllers/products.md | Updated product_family_id type in create_product method documentation. |
| doc/models/containers/archive-component-price-point-component-id.md | New file documenting data type for archiving component price point with IDs. |
| doc/models/containers/archive-component-price-point-price-point-id.md,
doc/models/containers/read-component-price-point-component-id.md,
doc/models/containers/read-component-price-point-price-point-id.md,
doc/models/containers/update-component-price-point-component-id.md,
doc/models/containers/update-component-price-point-price-point-id.md | New files documenting the data types for component price point operations. |


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Outside diff range and nitpick comments (28)
doc/models/containers/read-component-price-point-component-id.md (1)

Line range hint 15-15: Remove extra blank line for markdown consistency.

There are multiple consecutive blank lines at the end of the document, which is flagged by Markdownlint.

- 
doc/models/containers/read-component-price-point-price-point-id.md (1)

Line range hint 15-15: Remove extra blank line for markdown consistency.

There are multiple consecutive blank lines at the end of the document, which is flagged by Markdownlint.

- 
Tools
LanguageTool

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Read Component Price Point Price Point Id ## Data Type int | str ## Cases...

doc/models/containers/update-component-price-point-component-id.md (1)

Line range hint 15-15: Remove extra blank line for markdown consistency.

There are multiple consecutive blank lines at the end of the document, which is flagged by Markdownlint.

- 
doc/models/containers/archive-component-price-point-component-id.md (1)

Line range hint 15-15: Remove extra blank line for markdown consistency.

There are multiple consecutive blank lines at the end of the document, which is flagged by Markdownlint.

- 
doc/models/containers/update-component-price-point-price-point-id.md (1)

Line range hint 15-15: Remove extra blank line for markdown consistency.

There are multiple consecutive blank lines at the end of the document, which is flagged by Markdownlint.

- 
Tools
LanguageTool

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Update Component Price Point Price Point Id ## Data Type int | str ## Cases...

doc/models/containers/archive-component-price-point-price-point-id.md (1)

Line range hint 15-15: Remove extra blank line.

There should be only one blank line between sections to adhere to Markdown best practices.

- 
Tools
LanguageTool

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Archive Component Price Point Price Point Id ## Data Type int | str ## Cases...

advancedbilling/http/auth/basic_auth.py (2)

Line range hint 1-1: Remove unnecessary UTF-8 encoding declaration.

The UTF-8 encoding declaration is redundant in Python files unless needed for compatibility reasons.

- # -*- coding: utf-8 -*-

Line range hint 28-29: Use f-string for better readability and performance.

Convert the old format method to an f-string for clarity and efficiency.

-            auth_params = {"Authorization": "Basic {}".format(
+            auth_params = {"Authorization": f"Basic {
                AuthHelper.get_base64_encoded_value(basic_auth_credentials.username, basic_auth_credentials.password))}
advancedbilling/controllers/base_controller.py (2)

Line range hint 1-1: Remove unnecessary UTF-8 encoding declaration.

As previously noted, this declaration is redundant and can be removed for cleaner code.

- # -*- coding: utf-8 -*-

Line range hint 16-16: Remove unnecessary inheritance from object.

In Python 3, all classes implicitly inherit from object, making this explicit declaration redundant.

- class BaseController(object):
+ class BaseController:
doc/client.md (1)

Line range hint 75-75: Remove extra blank line.

To maintain a clean and consistent format in Markdown documents, it is advisable to avoid multiple consecutive blank lines.

- 
advancedbilling/configuration.py (1)

Line range hint 1-1: Remove unnecessary UTF-8 encoding declaration

As per the static analysis hint, the UTF-8 encoding declaration is unnecessary for Python files unless they contain non-ASCII characters, which this file does not.

-# -*- coding: utf-8 -*-
advancedbilling/advanced_billing_client.py (1)

Line range hint 74-74: Unnecessary inheritance from object

Python 3 classes do not need to explicitly inherit from object. This is a holdover from Python 2 and can be safely removed to clean up the code.

- class AdvancedBillingClient(object):
+ class AdvancedBillingClient:
advancedbilling/controllers/product_families_controller.py (1)

Line range hint 32-32: Mutable default argument in method definitions

Using mutable default arguments in Python functions is a common source of bugs. Instead, use None as the default value and initialize the dictionary inside the function.

- def list_products_for_product_family(self, options=dict()):
+ def list_products_for_product_family(self, options=None):
+     if options is None:
+         options = {}
- def list_product_families(self, options=dict()):
+ def list_product_families(self, options=None):
+     if options is None:
+         options = {}

Also applies to: 204-204

doc/controllers/products.md (2)

Line range hint 297-297: Grammar Correction: Change "chose" to "choose".

The verb should be "choose" to correctly form the infinitive "to choose", aligning with standard English grammar rules.

- This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product.
+ This will restrict the option to choose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product.

Line range hint 486-486: Add a comma for clarity.

In the list of query parameters, the absence of a comma after "query" makes the sentence unclear. Adding a comma would enhance readability.

- You can specify timezone in query - otherwise your site's time zone will be used.
+ You can specify timezone in query, - otherwise your site's time zone will be used.

Also applies to: 488-488

advancedbilling/controllers/products_controller.py (3)

Line range hint 1-1: Remove unnecessary encoding declaration.

The UTF-8 encoding declaration is redundant in Python 3 and can be safely removed to clean up the file.

- # -*- coding: utf-8 -*-

Line range hint 27-27: Simplify super() call.

The call to super() in Python 3 should not include the class and self. Simplifying this improves readability and adheres to modern Python practices.

- super(ProductsController, self).__init__(config)
+ super().__init__(config)

Line range hint 267-267: Avoid mutable default arguments.

Using mutable default arguments can lead to unexpected behavior. Replace the mutable default dictionary with None and initialize it within the function if necessary.

- def list_products(self, options=dict()):
+ def list_products(self, options=None):
+     if options is None:
+         options = {}
advancedbilling/utilities/union_type_lookup.py (1)

Line range hint 1-1: Remove unnecessary UTF-8 encoding declaration.

The UTF-8 encoding declaration is unnecessary in Python files unless they contain non-ASCII characters, which is not the case here.

- # -*- coding: utf-8 -*-
advancedbilling/controllers/product_price_points_controller.py (4)

Line range hint 1-1: Remove unnecessary UTF-8 encoding declaration.

The UTF-8 encoding declaration is not needed in Python files unless they contain non-ASCII characters, which is not the case here.

-# -*- coding: utf-8 -*-

Line range hint 35-35: Use simplified super() call.

In Python 3, super() can be called without arguments to make the code cleaner and more maintainable.

- super(ProductPricePointsController, self).__init__(config)
+ super().__init__(config)

Line range hint 91-91: Avoid mutable default arguments.

Using mutable data structures like dictionaries as default arguments can lead to unexpected behavior because they can be modified across multiple function calls.

- def list_product_price_points(self, options=dict()):
+ def list_product_price_points(self, options=None):
+     if options is None:
+         options = {}

Line range hint 628-628: Avoid mutable default arguments.

Similar to the previous issue, using mutable defaults can lead to bugs. Initialize with None and set inside the function.

- def list_all_product_price_points(self, options=dict()):
+ def list_all_product_price_points(self, options=None):
+     if options is None:
+         options = {}
advancedbilling/controllers/components_controller.py (4)

Line range hint 1-1: Remove unnecessary UTF-8 encoding declaration.

The Python interpreter defaults to UTF-8 encoding, making this declaration redundant in Python 3 files.

-# -*- coding: utf-8 -*-

Line range hint 29-29: Use Python 3 style super() call.

The use of super(ComponentsController, self) is redundant in Python 3. Simplify this to super().

- super(ComponentsController, self).__init__(config)
+ super().__init__(config)

Line range hint 707-707: Avoid using mutable default arguments.

Using mutable defaults in function arguments can lead to unexpected behavior. Initialize options within the function instead.

- def list_components(self, options=dict()):
+ def list_components(self, options=None):
+     if options is None:
+         options = {}

Line range hint 941-941: Avoid using mutable default arguments.

Using mutable defaults in function arguments can lead to unexpected behavior. Initialize options within the function instead.

- def list_components_for_product_family(self, options=dict()):
+ def list_components_for_product_family(self, options=None):
+     if options is None:
+         options = {}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fe41131 and ef2ff40.

Files selected for processing (25)
  • README.md (3 hunks)
  • advancedbilling/advanced_billing_client.py (3 hunks)
  • advancedbilling/configuration.py (1 hunks)
  • advancedbilling/controllers/init.py (1 hunks)
  • advancedbilling/controllers/base_controller.py (1 hunks)
  • advancedbilling/controllers/component_price_points_controller.py (1 hunks)
  • advancedbilling/controllers/components_controller.py (4 hunks)
  • advancedbilling/controllers/product_families_controller.py (1 hunks)
  • advancedbilling/controllers/product_price_points_controller.py (3 hunks)
  • advancedbilling/controllers/products_controller.py (1 hunks)
  • advancedbilling/http/auth/basic_auth.py (1 hunks)
  • advancedbilling/utilities/union_type_lookup.py (1 hunks)
  • doc/client.md (2 hunks)
  • doc/controllers/component-price-points.md (1 hunks)
  • doc/controllers/components.md (3 hunks)
  • doc/controllers/product-families.md (2 hunks)
  • doc/controllers/product-price-points.md (1 hunks)
  • doc/controllers/products.md (2 hunks)
  • doc/models/containers/archive-component-price-point-component-id.md (1 hunks)
  • doc/models/containers/archive-component-price-point-price-point-id.md (1 hunks)
  • doc/models/containers/read-component-price-point-component-id.md (1 hunks)
  • doc/models/containers/read-component-price-point-price-point-id.md (1 hunks)
  • doc/models/containers/update-component-price-point-component-id.md (1 hunks)
  • doc/models/containers/update-component-price-point-price-point-id.md (1 hunks)
  • pyproject.toml (1 hunks)
Files skipped from review due to trivial changes (1)
  • pyproject.toml
Additional context used
Markdownlint
doc/models/containers/read-component-price-point-component-id.md

15-15: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

doc/models/containers/read-component-price-point-price-point-id.md

15-15: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

doc/models/containers/update-component-price-point-component-id.md

15-15: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

doc/models/containers/archive-component-price-point-component-id.md

15-15: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

doc/models/containers/update-component-price-point-price-point-id.md

15-15: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

doc/models/containers/archive-component-price-point-price-point-id.md

15-15: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

doc/client.md

75-75: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines

README.md

132-132: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


26-26: null (MD034, no-bare-urls)
Bare URL used


38-38: null (MD034, no-bare-urls)
Bare URL used


24-24: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


48-48: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style


48-48: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style


49-49: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style


49-49: Expected: underscore; Actual: asterisk (MD049, emphasis-style)
Emphasis style

doc/controllers/product-families.md

18-18: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


167-167: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


225-225: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


288-288: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


333-333: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


19-19: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


168-168: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


226-226: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


289-289: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document

doc/controllers/products.md

204-204: Expected: h2; Actual: h3 (MD001, heading-increment)
Heading levels should only increment by one level at a time


25-25: Expected: asterisk; Actual: plus (MD004, ul-style)
Unordered list style


26-26: Expected: asterisk; Actual: plus (MD004, ul-style)
Unordered list style


206-206: Expected: asterisk; Actual: plus (MD004, ul-style)
Unordered list style


20-20: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


127-127: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


199-199: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


292-292: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


372-372: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


469-469: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


572-572: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


21-21: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


128-128: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


200-200: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


293-293: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


373-373: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


470-470: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document

doc/controllers/product-price-points.md

25-25: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


110-110: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


175-175: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


250-250: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


315-315: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


384-384: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


447-447: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


538-538: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


642-642: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


723-723: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


797-797: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


885-885: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


26-26: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


111-111: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


176-176: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


251-251: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


316-316: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


385-385: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


448-448: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


539-539: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


643-643: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


724-724: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


798-798: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document

doc/controllers/component-price-points.md

25-25: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


98-98: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


152-152: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


243-243: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


364-364: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


436-436: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


472-472: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


548-548: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


618-618: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


694-694: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


766-766: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


857-857: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


26-26: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


99-99: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


153-153: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


244-244: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


365-365: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


437-437: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


473-473: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


549-549: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


619-619: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


695-695: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


767-767: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document

doc/controllers/components.md

145-145: Expected: h2; Actual: h4 (MD001, heading-increment)
Heading levels should only increment by one level at a time


26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


138-138: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


259-259: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


360-360: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


494-494: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


598-598: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


657-657: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


725-725: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


808-808: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


876-876: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1019-1019: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1097-1097: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1242-1242: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


139-139: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


260-260: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


361-361: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


495-495: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


599-599: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


658-658: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


726-726: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


809-809: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


877-877: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


1020-1020: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


1098-1098: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document

LanguageTool
doc/models/containers/read-component-price-point-price-point-id.md

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Read Component Price Point Price Point Id ## Data Type int | str ## Cases...

doc/models/containers/update-component-price-point-price-point-id.md

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Update Component Price Point Price Point Id ## Data Type int | str ## Cases...

doc/models/containers/archive-component-price-point-price-point-id.md

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Archive Component Price Point Price Point Id ## Data Type int | str ## Cases...

doc/client.md

[uncategorized] ~59-~59: The Latin adjective/adverb “pro forma” is spelled as two words. (PRO_RATA)
Context: ...| Gets ProductPricePointsController | | proforma_invoices | Gets ProformaInvoicesControl...

README.md

[uncategorized] ~8-~8: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...d format, but XML is also provided as a backwards compatible option for Merchants who require it. #...


[uncategorized] ~102-~102: The Latin adjective/adverb “pro forma” is spelled as two words. (PRO_RATA)
Context: ...controllers/product-price-points.md) * [Proforma Invoices](https://www.github.com/maxio-...

doc/controllers/product-families.md

[uncategorized] ~19-~19: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_OF)
Context: ...milies.md#read-product-family) # List Products for Product Family This method allows ...


[grammar] ~21-~21: Did you mean “retrieving”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ... for Product Family This method allows to retrieve a list of Products belonging to a Produ...


[uncategorized] ~39-~39: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...s products with a timestamp at or after exact time provided in query. You can specify...


[grammar] ~228-~228: Did you mean “retrieving”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...st Product Families This method allows to retrieve a list of Product Families for a site. ...


[uncategorized] ~242-~242: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...s products with a timestamp at or after exact time provided in query. You can specify...


[grammar] ~291-~291: Did you mean “retrieving”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...Read Product Family This method allows to retrieve a Product Family via the `product_famil...

doc/controllers/products.md

[grammar] ~297-~297: The verb after “to” should be in the base form as part of the to-infinitive. A verb can take many forms, but the base form is always used in the to-infinitive. (TO_NON_BASE)
Context: ...thly. This will restrict the option to chose the product for purchase via the Billin...


[grammar] ~375-~375: Did you mean “retrieving”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...d Product by Handle This method allows to retrieve a Product object by its api_handle. ...


[grammar] ~472-~472: Did you mean “retrieving”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...` # List Products This method allows to retrieve a list of Products belonging to a Site....


[uncategorized] ~486-~486: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...ry. You can specify timezone in query - otherwise your site''s time zone will be used. If...


[uncategorized] ~488-~488: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...ry. You can specify timezone in query - otherwise your site''s time zone will be used. If...

doc/controllers/product-price-points.md

[style] ~127-~127: Consider removing “of” to be more concise (ALL_OF_THE)
Context: ...he flag is set to false, it will return all of the defined prices for each currency. | | `...


[style] ~180-~180: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ...int. Note: Custom product price points are not able to be updated. ```python def update_produ...


[style] ~180-~180: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ...om product price points are not able to be updated. ```python def update_product_price_po...


[uncategorized] ~194-~194: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | | body | [`UpdateProductPric...


[uncategorized] ~267-~267: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | | currency_prices | bool |...


[style] ~268-~268: Consider removing “of” to be more concise (ALL_OF_THE)
Context: ...he flag is set to false, it will return all of the defined prices for each currency. | ##...


[uncategorized] ~331-~331: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | ## Response Type [`ProductPr...


[style] ~452-~452: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ...uct. Note: Custom product price points are not able to be set as the default for a product. `...


[style] ~452-~452: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ...om product price points are not able to be set as the default for a product. ```pytho...


[style] ~649-~649: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ...nd/or setup fee. Note: Currency Prices are not able to be created for custom product price poi...


[style] ~649-~649: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ... Note: Currency Prices are not able to be created for custom product price points. ```py...


[style] ~730-~730: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ...nd/or setup fee. Note: Currency Prices are not able to be updated for custom product price poi...


[style] ~730-~730: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ... Note: Currency Prices are not able to be updated for custom product price points. ```py...

doc/controllers/component-price-points.md

[style] ~32-~32: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ...rice points. Note: Custom price points are not able to be set as the default for a component. ...


[style] ~32-~32: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ...te: Custom price points are not able to be set as the default for a component. ```pyt...


[style] ~161-~161: Consider removing “of” to be more concise (ALL_OF_THE)
Context: ...he flag is set to false, it will return all of the defined prices for each currency. ```p...


[grammar] ~367-~367: Did you mean to use the possessive pronoun “its”? (IT_S_ITS)
Context: ...ice Point When updating a price point, it's prices can be updated as well by creati...


[uncategorized] ~387-~387: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | | body | [`UpdateComponentPr...


[uncategorized] ~452-~452: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | ## Response Type [`Component...


[uncategorized] ~488-~488: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | ## Response Type [`Component...


[style] ~625-~625: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ... given currency. Note: Currency Prices are not able to be created for custom price points. ``...


[style] ~625-~625: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ... Note: Currency Prices are not able to be created for custom price points. ```python def...


[style] ~699-~699: As a shorter alternative for ‘able to’, consider using “can not”. (BE_ABLE_TO)
Context: ...n your settings. Note: Currency Prices are not able to be updated for custom price points. ``...


[style] ~699-~699: Avoid the passive voice after ‘to be able to’. (ABLE_TO_PASSIVE)
Context: ... Note: Currency Prices are not able to be updated for custom price points. ```python def...


[grammar] ~769-~769: Did you mean “retrieving”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...ponent Price Points This method allows to retrieve a list of Components Price Points belon...

doc/controllers/components.md

[uncategorized] ~14-~14: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ....md#create-metered-component) * [Create Quantity Based Component](../../doc/controllers/compon...


[uncategorized] ~17-~17: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...eate-prepaid-usage-component) * [Create Event Based Component](../../doc/controllers/compon...


[uncategorized] ~29-~29: Possible missing article found. (AI_HYDRA_LEO_MISSING_A)
Context: ...t** under the specified product family. Metered component can then be added and “alloca...


[style] ~31-~31: Google renamed their advertising platform to “Google Ads”. (GOOGLE_PRODUCTS)
Context: ... end of the billing period (think daily Google Adwords clicks or monthly cell phone minutes). ...


[grammar] ~33-~33: Using ‘plenty’ without ‘of’ is considered to be informal. (PLENTY_OF_NOUNS)
Context: ...nge unless you change it, then you want quantity components, instead. For more information on comp...


[uncategorized] ~139-~139: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...ist-response-exception.md) | # Create Quantity Based Component This request will create a c...


[uncategorized] ~141-~141: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...t** under the specified product family. Quantity Based component can then be added and “alloca...


[uncategorized] ~143-~143: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...ted” for a subscription. When defining Quantity Based component, You can choose one of 2 type...


[grammar] ~264-~264: This noun is usually spelled with a hyphen. (THE_ADD_ON)
Context: ...nk $99/month for tech support or a flat add on shipping fee). For more information on...


[uncategorized] ~363-~363: Possible missing article found. (AI_HYDRA_LEO_MISSING_A)
Context: ...t** under the specified product family. Prepaid component can then be added and “alloca...


[uncategorized] ~365-~365: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case. (AMOUNTOF_TO_NUMBEROF)
Context: ...charge at the end of the period for the amount of units used, prepaid components are c...


[uncategorized] ~495-~495: This expression is usually spelled with a hyphen. (BASED_HYPHEN)
Context: ...ist-response-exception.md) | # Create Event Based Component This request will create a c...


[uncategorized] ~601-~601: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...You can identify your components with a handle so you don't have to save or reference ...


[uncategorized] ~894-~894: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...omponents with a timestamp at or before exact time provided in query. You can specify...


[uncategorized] ~894-~894: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...amp at or before exact time provided in query. You can specify timezone in query - ot...


[uncategorized] ~1118-~1118: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...omponents with a timestamp at or before exact time provided in query. You can specify...


[uncategorized] ~1118-~1118: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...amp at or before exact time provided in query. You can specify timezone in query - ot...

Ruff
advancedbilling/http/auth/basic_auth.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


28-29: Use f-string instead of format call (UP032)

Convert to f-string

advancedbilling/controllers/base_controller.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


16-16: Class BaseController inherits from object (UP004)

Remove object inheritance

advancedbilling/configuration.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment

advancedbilling/advanced_billing_client.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


74-74: Class AdvancedBillingClient inherits from object (UP004)

Remove object inheritance

advancedbilling/controllers/product_families_controller.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


29-29: Use super() instead of super(__class__, self) (UP008)

Remove __super__ parameters


32-32: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function


204-204: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function

advancedbilling/controllers/products_controller.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


27-27: Use super() instead of super(__class__, self) (UP008)

Remove __super__ parameters


267-267: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function

advancedbilling/utilities/union_type_lookup.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment

advancedbilling/controllers/product_price_points_controller.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


35-35: Use super() instead of super(__class__, self) (UP008)

Remove __super__ parameters


91-91: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function


628-628: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function

advancedbilling/controllers/component_price_points_controller.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


33-33: Use super() instead of super(__class__, self) (UP008)

Remove __super__ parameters


140-140: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function


616-616: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function

advancedbilling/controllers/components_controller.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment


29-29: Use super() instead of super(__class__, self) (UP008)

Remove __super__ parameters


555-555: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function


715-715: Do not use mutable data structures for argument defaults (B006)

Replace with None; initialize within function

Additional comments not posted (53)
doc/models/containers/read-component-price-point-component-id.md (1)

6-13: Documentation is clear and concise.

The documentation effectively explains the dual data type support (int | str) for the component ID, which aligns with the PR's objectives to enhance flexibility in ID handling.

doc/models/containers/read-component-price-point-price-point-id.md (1)

6-13: Documentation is clear and concise.

The documentation effectively explains the dual data type support (int | str) for the price point ID, which aligns with the PR's objectives to enhance flexibility in ID handling.

doc/models/containers/update-component-price-point-component-id.md (1)

6-13: Documentation is clear and concise.

The documentation effectively explains the dual data type support (int | str) for the component ID, which aligns with the PR's objectives to enhance flexibility in ID handling.

doc/models/containers/archive-component-price-point-component-id.md (1)

6-13: Documentation is clear and concise.

The documentation effectively explains the dual data type support (int | str) for the component ID, which aligns with the PR's objectives to enhance flexibility in ID handling.

doc/models/containers/update-component-price-point-price-point-id.md (1)

6-13: Documentation is clear and concise.

The documentation effectively explains the dual data type support (int | str) for the price point ID, which aligns with the PR's objectives to enhance flexibility in ID handling.

doc/models/containers/archive-component-price-point-price-point-id.md (1)

6-14: Clarify data type and cases.

The documentation clearly specifies that the price_point_id can be either an int or a str, which is well-documented under the Data Type and Cases sections.

advancedbilling/controllers/__init__.py (1)

8-8: Addition of ComponentPricePointsController.

The inclusion of component_price_points_controller in the list of controllers aligns with the architectural changes mentioned in the PR, facilitating the management of component price points separately from other components.

advancedbilling/http/auth/basic_auth.py (1)

48-48: Initialization of username and password.

The initialization of _username and _password is straightforward and follows best practices for encapsulation in Python.

advancedbilling/controllers/base_controller.py (1)

33-33: Updated user agent string.

The user agent string has been updated to reflect the new SDK version, aligning with the PR's objectives to keep versioning consistent across the SDK.

doc/client.md (2)

14-14: Updated timeout and retry configurations.

The documentation has been updated to reflect the new default timeout value and detailed retry configurations, which improves clarity for SDK users.


47-47: Addition of ComponentPricePointsController in documentation.

The documentation now includes the newly introduced ComponentPricePointsController, ensuring that the SDK's documentation is up-to-date with the codebase changes.

advancedbilling/configuration.py (1)

51-51: Increase in default timeout value

The timeout parameter has been increased from 30 to 120 seconds, which aligns with the PR objectives to handle longer response times from the server. This is a significant increase and should be adequately communicated in the release notes or documentation to inform users of the potential impact on API call behaviors.

README.md (3)

34-34: Updated SDK version in installation command

The pip installation command has been updated to the new SDK version 4.0.0. This change is necessary to ensure users install the latest version of the SDK that includes all recent updates and features.


38-38: Updated URL to the new SDK version

The URL pointing to the PyPi repository has been updated to reflect the new SDK version 4.0.0. This update ensures that users are directed to the correct version of the SDK on the PyPi website.
[APROVED]

Tools
Markdownlint

38-38: null (MD034, no-bare-urls)
Bare URL used


54-54: Updated default timeout value in the API client documentation

The default timeout value in the API client documentation has been updated from 30 to 120 seconds. This update is consistent with the changes in the actual SDK configuration and helps prevent discrepancies between the documentation and the actual behavior of the SDK.

advancedbilling/advanced_billing_client.py (3)

25-26: Import of new controller for component price points

The ComponentPricePointsController has been imported and added to the list of controllers. This change is in line with the PR objectives to handle component price points separately from the ComponentsController.


95-97: Lazy property for component price points

A new lazy property for accessing the ComponentPricePointsController is correctly added. This ensures that the controller is instantiated only when it is actually needed, which is a good practice for resource management.


205-205: Increase in default timeout value

The timeout parameter in the client initialization has been increased to 120 seconds, consistent with the changes in the configuration file. This ensures that the client and the configuration are synchronized in terms of how they handle timeouts.

doc/controllers/product-families.md (2)

32-32: Updated parameter type for product_family_id

The parameter product_family_id has been changed from int to str to allow both numeric IDs and string handles. This change supports more flexible usage scenarios and aligns with the PR objectives.


52-52: Example usage updated to reflect new parameter types

The example usage has been updated to reflect the new parameter types and provide a clearer understanding of how to use the method with the updated parameters.

advancedbilling/controllers/product_families_controller.py (1)

45-46: Updated parameter handling for product_family_id

The method list_products_for_product_family now accepts product_family_id as a string with the possibility of being prefixed with handle:. This update is crucial for supporting the new feature of handling IDs and handles interchangeably.

doc/controllers/products.md (1)

38-38: Updated parameter type from int to str.

The change in parameter type for product_family_id to accept both numeric IDs and string handles (prefixed with handle:) aligns with the PR's objectives to enhance flexibility in product family identification.

doc/controllers/component-price-points.md (5)

3-5: Clarification on variable initialization

It might be helpful to add a brief comment explaining what component_price_points_controller is used for, especially for new developers or those unfamiliar with the codebase.


9-9: Clear Class Name Declaration

The class name ComponentPricePointsController is clearly declared, which is good for maintainability and understanding the scope of the class.


34-38: Method Signature Review

The method signature for promote_component_price_point_to_default is clear and follows standard Python practices. Parameters are well-defined, enhancing readability.


42-45: Parameter Documentation

The parameter documentation is thorough, providing clear tags and descriptions. This is crucial for developers to understand the required inputs and their types.


387-388: Clarification on Parameter Types

The use of int | str in the parameter type documentation is a good practice for type flexibility. However, it might be beneficial to add a brief explanation or example of when to use each type to aid understanding.

Also applies to: 452-453, 488-489

Tools
LanguageTool

[uncategorized] ~387-~387: “of” seems less likely than “off” (as in: go/turn off, off the coast). (AI_HYDRA_LEO_CP_OF_OFF)
Context: ... Required | This is a container for one-of cases. | | body | [`UpdateComponentPr...

advancedbilling/utilities/union_type_lookup.py (1)

79-114: Review of Union Type Templates for Component Price Points

The additions to the UnionTypeLookUp class introduce several OneOf type templates for handling both integer and string types for component and price point IDs. This change aligns with the PR's objective to support both numeric IDs and string handles, enhancing flexibility in API parameter handling.

The implementation uses LeafType correctly to define possible types for the IDs, which should work seamlessly with the rest of the system expecting these types. The use of OneOf indicates that either type can be valid, which is a clear and correct implementation for the scenario where IDs can be either integers or strings.

advancedbilling/controllers/component_price_points_controller.py (2)

33-33: Simplify super() call.

The use of super() can be simplified by removing explicit parameters which are redundant in Python 3.
[REFACTOR_Suggestion]

- super(ComponentPricePointsController, self).__init__(config)
+ super().__init__(config)
Tools
Ruff

33-33: Use super() instead of super(__class__, self) (UP008)

Remove __super__ parameters


275-344: Validate method parameter types.

For the update_component_price_point method, ensure that the component_id and price_point_id are validated against the correct types (int or str). This is crucial for maintaining type safety and preventing runtime errors.

advancedbilling/controllers/components_controller.py (10)

Line range hint 55-126: Well-documented and correctly implemented method for creating metered components.

This method is a good example of clear documentation and proper API usage within the SDK.


Line range hint 128-199: Consistently well-implemented method for creating quantity-based components.

Like the previous method, this one also maintains a high standard of documentation and implementation.


Line range hint 201-272: Consistent and correct implementation for creating on/off components.

This method follows the established pattern of the controller, ensuring consistency and maintainability.


Line range hint 274-345: Proper implementation for creating prepaid usage components.

The method correctly implements the functionality with comprehensive documentation and error handling.


Line range hint 347-418: Correct implementation for creating event-based components.

This method is well-documented and aligns with the SDK's standards for API interaction and error handling.


Line range hint 420-480: Well-implemented method for finding components by handle.

The method is straightforward and well-documented, facilitating easy retrieval of component details.


Line range hint 482-555: Correctly implemented method for reading components.

This method provides flexibility in accessing component details by ID or handle, which is well-documented and implemented.


Line range hint 557-631: Well-implemented method for updating product family components.

This method is correctly implemented with comprehensive error handling and documentation.


Line range hint 633-705: Properly implemented method for archiving components.

The method is straightforward and well-documented, aligning with the SDK's standards.


Line range hint 867-939: Correctly implemented method for updating components.

This method is well-documented and correctly implements the functionality for updating components.

doc/controllers/components.md (13)

Line range hint 14-14: Correct spelling for "Create Quantity Based Component"

The phrase "Quantity Based" should be hyphenated to "Quantity-Based" to maintain consistency and correct grammatical form.

- [Create Quantity Based Component](../../doc/controllers/components.md#create-quantity-based-component)
+ [Create Quantity-Based Component](../../doc/controllers/components.md#create-quantity-based-component)
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 17-17: Correct spelling for "Create Event Based Component"

The phrase "Event Based" should be hyphenated to "Event-Based" to maintain consistency and correct grammatical form.

- [Create Event Based Component](../../doc/controllers/components.md#create-event-based-component)
+ [Create Event-Based Component](../../doc/controllers/components.md#create-event-based-component)
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 29-29: Add an article before "Metered component"

To improve readability and grammatical correctness, add the article "a" before "Metered component".

- Metered component can then be added and “allocated” for a subscription.
+ A metered component can then be added and “allocated” for a subscription.
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 31-31: Update product name to "Google Ads"

The reference to "Google Adwords" should be updated to "Google Ads" to reflect the current branding.

- (think daily Google Adwords clicks or monthly cell phone minutes)
+ (think daily Google Ads clicks or monthly cell phone minutes)
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 33-33: Improve phrasing for clarity

The phrase "plenty of" is informal and vague. Consider rephrasing for clarity and formality.

- then you want quantity components, instead.
+ then you would prefer quantity components.
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 139-139: Correct spelling for "Create Quantity Based Component"

The phrase "Quantity Based" should be hyphenated to "Quantity-Based" to maintain consistency and correct grammatical form.

Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 141-141: Add an article before "Quantity Based component"

To improve readability and grammatical correctness, add the article "a" before "Quantity Based component".

- Quantity Based component can then be added and “allocated” for a subscription.
+ A Quantity-Based component can then be added and “allocated” for a subscription.
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 143-143: Correct spelling for "Quantity Based component"

The phrase "Quantity Based" should be hyphenated to "Quantity-Based" to maintain consistency and correct grammatical form.

Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 264-264: Add an article before "Prepaid component"

To improve readability and grammatical correctness, add the article "a" before "Prepaid component".

- Prepaid component can then be added and “allocated” for a subscription.
+ A prepaid component can then be added and “allocated” for a subscription.
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 365-365: Use "number" instead of "amount" for countable nouns

The phrase "amount of units" should be corrected to "number of units" because units are countable.

- charge at the end of the period for the amount of units used, prepaid components are
+ charge at the end of the period for the number of units used, prepaid components are
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 495-495: Correct spelling for "Create Event Based Component"

The phrase "Event Based" should be hyphenated to "Event-Based" to maintain consistency and correct grammatical form.

Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 601-601: Add a comma for clarity

Adding a comma after "handle" can improve the readability of the sentence.

- You can identify your components with a handle so you don't have to save or reference
+ You can identify your components with a handle, so you don't have to save or reference
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document


Line range hint 894-894: Add the article "the" for clarity

Including the article "the" before "exact time" and "query" can improve clarity and correctness.

- at or before exact time provided in query. You can specify
+ at or before the exact time provided in the query. You can specify
Tools
Markdownlint

26-26: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


27-27: null (MD025, single-title, single-h1)
Multiple top-level headings in the same document

@@ -250,7 +250,7 @@ print(result)

# Read Product Price Point

Use this endpoint to retrieve details for a specific product price point.
Use this endpoint to retrieve details for a specific product price point. You can achieve this by using either the product price point ID or handle.
Copy link

Choose a reason for hiding this comment

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

Clarify the use of product price point ID or handle in the documentation.

The description "Use this endpoint to retrieve details for a specific product price point. You can achieve this by using either the product price point ID or handle." could be enhanced by explicitly stating how to use either the ID or the handle in the request. This would improve clarity and usability of the documentation.

- Use this endpoint to retrieve details for a specific product price point. You can achieve this by using either the product price point ID or handle.
+ Use this endpoint to retrieve details for a specific product price point by specifying either the `price_point_id` (integer) or `price_point_handle` (string) in the request.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Use this endpoint to retrieve details for a specific product price point. You can achieve this by using either the product price point ID or handle.
Use this endpoint to retrieve details for a specific product price point by specifying either the `price_point_id` (integer) or `price_point_handle` (string) in the request.

Comment on lines +90 to +137
def create_component_price_point(self,
component_id,
body=None):
"""Does a POST request to /components/{component_id}/price_points.json.

This endpoint can be used to create a new price point for an existing
component.

Args:
component_id (int): The Chargify id of the component
body (CreateComponentPricePointRequest, optional): TODO: type
description here.

Returns:
ComponentPricePointResponse: Response from the API. OK

Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.

"""

return super().new_api_call_builder.request(
RequestBuilder().server(Server.DEFAULT)
.path('/components/{component_id}/price_points.json')
.http_method(HttpMethodEnum.POST)
.template_param(Parameter()
.key('component_id')
.value(component_id)
.is_required(True)
.should_encode(True))
.header_param(Parameter()
.key('Content-Type')
.value('application/json'))
.body_param(Parameter()
.value(body))
.header_param(Parameter()
.key('accept')
.value('application/json'))
.body_serializer(APIHelper.json_serialize)
.auth(Single('BasicAuth'))
).response(
ResponseHandler()
.deserializer(APIHelper.json_deserialize)
.deserialize_into(ComponentPricePointResponse.from_dictionary)
).execute()
Copy link

Choose a reason for hiding this comment

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

Clarify the type description in method documentation.

The create_component_price_point method accepts a body parameter, but the type description is marked as TODO. This should be updated to accurately reflect the expected type, enhancing the API documentation's usefulness and accuracy.

Comment on lines +225 to +273
def bulk_create_component_price_points(self,
component_id,
body=None):
"""Does a POST request to /components/{component_id}/price_points/bulk.json.

Use this endpoint to create multiple component price points in one
request.

Args:
component_id (str): The Chargify id of the component for which you
want to fetch price points.
body (CreateComponentPricePointsRequest, optional): TODO: type
description here.

Returns:
ComponentPricePointsResponse: Response from the API. OK

Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.

"""

return super().new_api_call_builder.request(
RequestBuilder().server(Server.DEFAULT)
.path('/components/{component_id}/price_points/bulk.json')
.http_method(HttpMethodEnum.POST)
.template_param(Parameter()
.key('component_id')
.value(component_id)
.is_required(True)
.should_encode(True))
.header_param(Parameter()
.key('Content-Type')
.value('application/json'))
.body_param(Parameter()
.value(body))
.header_param(Parameter()
.key('accept')
.value('application/json'))
.body_serializer(APIHelper.json_serialize)
.auth(Single('BasicAuth'))
).response(
ResponseHandler()
.deserializer(APIHelper.json_deserialize)
.deserialize_into(ComponentPricePointsResponse.from_dictionary)
).execute()
Copy link

Choose a reason for hiding this comment

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

Clarify the type description in method documentation.

Similar to the previous comment, the bulk_create_component_price_point method has a body parameter with an incomplete type description. Providing complete information will improve clarity and prevent misuse of the API.

@@ -0,0 +1,692 @@
# -*- coding: utf-8 -*-
Copy link

Choose a reason for hiding this comment

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

Remove unnecessary encoding declaration.

The UTF-8 encoding declaration is redundant in Python 3 files where UTF-8 is the default encoding.

-# -*- coding: utf-8 -*-
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# -*- coding: utf-8 -*-
Tools
Ruff

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment

Comment on lines +35 to +88
def promote_component_price_point_to_default(self,
component_id,
price_point_id):
"""Does a PUT request to /components/{component_id}/price_points/{price_point_id}/default.json.

Sets a new default price point for the component. This new default
will apply to all new subscriptions going forward - existing
subscriptions will remain on their current price point.
See [Price Points
Documentation](https://chargify.zendesk.com/hc/en-us/articles/440775586
5883#price-points) for more information on price points and moving
subscriptions between price points.
Note: Custom price points are not able to be set as the default for a
component.

Args:
component_id (int): The Chargify id of the component to which the
price point belongs
price_point_id (int): The Chargify id of the price point

Returns:
ComponentResponse: Response from the API. OK

Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.

"""

return super().new_api_call_builder.request(
RequestBuilder().server(Server.DEFAULT)
.path('/components/{component_id}/price_points/{price_point_id}/default.json')
.http_method(HttpMethodEnum.PUT)
.template_param(Parameter()
.key('component_id')
.value(component_id)
.is_required(True)
.should_encode(True))
.template_param(Parameter()
.key('price_point_id')
.value(price_point_id)
.is_required(True)
.should_encode(True))
.header_param(Parameter()
.key('accept')
.value('application/json'))
.auth(Single('BasicAuth'))
).response(
ResponseHandler()
.deserializer(APIHelper.json_deserialize)
.deserialize_into(ComponentResponse.from_dictionary)
).execute()
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Ensure consistency in API documentation.

The method promote_component_price_point_to_default documentation should consistently describe the type of component_id and price_point_id as they can be either int or str (prefixed with handle:), as seen in other methods. This ensures clarity and consistency across the API.

  • File: advancedbilling/controllers/component_price_points_controller.py
  • Lines: 35-88
Analysis chain

Ensure consistency in API documentation.

The method promote_component_price_point_to_default documentation should consistently describe the type of component_id and price_point_id as they can be either int or str (prefixed with handle:), as seen in other methods. This ensures clarity and consistency across the API.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Check consistency in API documentation for component_id and price_point_id across different methods.
rg --type py 'component_id \(int \| str\)' advancedbilling/controllers/component_price_points_controller.py

Length of output: 343


# Update Component Price Point

When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones.
Copy link

Choose a reason for hiding this comment

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

Grammar Correction: Possessive Pronoun

There's a minor grammatical issue in the description. It should use the possessive pronoun "its" instead of "it's".

- When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones.
+ When updating a price point, its prices can be updated as well by creating new prices or editing / removing existing ones.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones.
When updating a price point, its prices can be updated as well by creating new prices or editing / removing existing ones.
Tools
LanguageTool

[grammar] ~367-~367: Did you mean to use the possessive pronoun “its”? (IT_S_ITS)
Context: ...ice Point When updating a price point, it's prices can be updated as well by creati...

Comment on lines +13 to +23
* [Promote Component Price Point to Default](../../doc/controllers/component-price-points.md#promote-component-price-point-to-default)
* [Create Component Price Point](../../doc/controllers/component-price-points.md#create-component-price-point)
* [List Component Price Points](../../doc/controllers/component-price-points.md#list-component-price-points)
* [Bulk Create Component Price Points](../../doc/controllers/component-price-points.md#bulk-create-component-price-points)
* [Update Component Price Point](../../doc/controllers/component-price-points.md#update-component-price-point)
* [Read Component Price Point](../../doc/controllers/component-price-points.md#read-component-price-point)
* [Archive Component Price Point](../../doc/controllers/component-price-points.md#archive-component-price-point)
* [Unarchive Component Price Point](../../doc/controllers/component-price-points.md#unarchive-component-price-point)
* [Create Currency Prices](../../doc/controllers/component-price-points.md#create-currency-prices)
* [Update Currency Prices](../../doc/controllers/component-price-points.md#update-currency-prices)
* [List All Component Price Points](../../doc/controllers/component-price-points.md#list-all-component-price-points)
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Documentation Linking

The links provided in the methods list need attention:

  • The first link (https://chargify.zendesk.com/hc/en-us/articles/4407755865883#price-points) is broken and returns a 404 status code.
  • The second link redirects to https://github.com/maxio-com/ab-python-sdk/blob/4.0.0/doc/controllers/component-price-points.md, which does not include the specific section anchor.

Please update these links to ensure they are active and correctly redirect to their respective sections.

Analysis chain

Documentation Linking

The links provided in the methods list are helpful for navigation. Ensure all links are active and correctly redirect to their respective sections to enhance usability.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all documentation links are active and correct.

# Test: Fetch each link and check HTTP status code. Expect: HTTP 200 OK for each.
curl -o /dev/null -s -w "%{http_code}\n" https://chargify.zendesk.com/hc/en-us/articles/4407755865883#price-points
curl -o /dev/null -s -w "%{http_code}\n" https://www.github.com/maxio-com/ab-python-sdk/tree/4.0.0/doc/controllers/component-price-points.md#create-component-price-point

Length of output: 296



Script:

#!/bin/bash
# Description: Verify the final redirection URL for the second link.

# Test: Fetch the final URL after redirection.
curl -o /dev/null -s -w "%{url_effective}\n" -L https://www.github.com/maxio-com/ab-python-sdk/tree/4.0.0/doc/controllers/component-price-points.md#create-component-price-point

Length of output: 274

@@ -0,0 +1,14 @@

# Archive Component Price Point Price Point Id
Copy link

Choose a reason for hiding this comment

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

Remove duplicate phrase.

Consider revising the title to avoid repetition of "Price Point."

- # Archive Component Price Point Price Point Id
+ # Archive Component Price Point Id
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Archive Component Price Point Price Point Id
# Archive Component Price Point Id
Tools
LanguageTool

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Archive Component Price Point Price Point Id ## Data Type int | str ## Cases...

@@ -0,0 +1,14 @@

# Read Component Price Point Price Point Id
Copy link

Choose a reason for hiding this comment

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

Consider revising the header for clarity.

The header "Read Component Price Point Price Point Id" might be clearer if simplified to avoid repetition.

-# Read Component Price Point Price Point Id
+# Read Component Price Point by ID
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Read Component Price Point Price Point Id
# Read Component Price Point by ID
Tools
LanguageTool

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Read Component Price Point Price Point Id ## Data Type int | str ## Cases...

@@ -0,0 +1,14 @@

# Update Component Price Point Price Point Id
Copy link

Choose a reason for hiding this comment

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

Consider revising the header for clarity.

The header "Update Component Price Point Price Point Id" might be clearer if simplified to avoid repetition.

-# Update Component Price Point Price Point Id
+# Update Component Price Point by ID
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Update Component Price Point Price Point Id
# Update Component Price Point by ID
Tools
LanguageTool

[grammar] ~2-~2: This phrase is duplicated. You should probably use “Price Point” only once. (PHRASE_REPETITION)
Context: # Update Component Price Point Price Point Id ## Data Type int | str ## Cases...

@michalpierog michalpierog merged commit c458534 into main Jun 25, 2024
1 check passed
@michalpierog michalpierog deleted the publish branch June 25, 2024 10:56
@michalpierog michalpierog changed the title DE-874 Release 4.0.0 [DE-874] Release 4.0.0 Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants