From 22819cb024d7ed2e76ed619bafb8e5f21874258e Mon Sep 17 00:00:00 2001 From: cb-alish Date: Tue, 21 Jul 2026 12:46:47 +0530 Subject: [PATCH] Releasing v2.77.0 --- CHANGELOG.md | 82 +++++++++++++++++ Gemfile.lock | 2 +- VERSION | 2 +- chargebee.gemspec | 9 +- lib/chargebee.rb | 7 +- lib/chargebee/models/addon.rb | 14 +-- lib/chargebee/models/address.rb | 4 +- lib/chargebee/models/alert.rb | 24 +++-- lib/chargebee/models/alert_status.rb | 4 +- lib/chargebee/models/async_response.rb | 18 ++++ lib/chargebee/models/async_response_list.rb | 10 ++ lib/chargebee/models/attached_item.rb | 10 +- lib/chargebee/models/business_entity.rb | 4 +- lib/chargebee/models/card.rb | 10 +- lib/chargebee/models/column_definition.rb | 10 ++ lib/chargebee/models/comment.rb | 8 +- lib/chargebee/models/configuration.rb | 2 +- lib/chargebee/models/coupon.rb | 18 ++-- lib/chargebee/models/coupon_code.rb | 8 +- lib/chargebee/models/coupon_set.rb | 14 +-- lib/chargebee/models/credit_note.rb | 39 ++++---- lib/chargebee/models/credit_note_estimate.rb | 2 +- lib/chargebee/models/currency.rb | 12 +-- lib/chargebee/models/customer.rb | 52 +++++------ lib/chargebee/models/customer_entitlement.rb | 2 +- lib/chargebee/models/differential_price.rb | 10 +- lib/chargebee/models/entitlement.rb | 4 +- lib/chargebee/models/entitlement_override.rb | 4 +- lib/chargebee/models/estimate.rb | 40 ++++---- lib/chargebee/models/event.rb | 4 +- lib/chargebee/models/export.rb | 36 ++++---- lib/chargebee/models/feature.rb | 18 ++-- lib/chargebee/models/gift.rb | 14 +-- lib/chargebee/models/grant_block.rb | 6 +- lib/chargebee/models/hosted_page.rb | 44 ++++----- lib/chargebee/models/in_app_subscription.rb | 8 +- lib/chargebee/models/invoice.rb | 92 ++++++++++--------- lib/chargebee/models/invoice_estimate.rb | 2 +- lib/chargebee/models/item.rb | 10 +- lib/chargebee/models/item_entitlement.rb | 8 +- lib/chargebee/models/item_family.rb | 10 +- lib/chargebee/models/item_price.rb | 14 +-- .../models/ledger_account_balance.rb | 2 +- lib/chargebee/models/ledger_operation.rb | 19 ++-- lib/chargebee/models/meter.rb | 18 ++++ lib/chargebee/models/metered_feature.rb | 46 ++++++++++ lib/chargebee/models/non_subscription.rb | 2 +- lib/chargebee/models/offer_event.rb | 2 +- lib/chargebee/models/offer_fulfillment.rb | 6 +- .../models/omnichannel_one_time_order.rb | 4 +- .../models/omnichannel_subscription.rb | 8 +- .../models/omnichannel_subscription_item.rb | 2 +- lib/chargebee/models/order.rb | 24 ++--- lib/chargebee/models/payment_intent.rb | 13 ++- .../models/payment_schedule_scheme.rb | 6 +- lib/chargebee/models/payment_source.rb | 32 +++---- lib/chargebee/models/payment_voucher.rb | 8 +- lib/chargebee/models/personalized_offer.rb | 2 +- lib/chargebee/models/plan.rb | 14 +-- lib/chargebee/models/portal_session.rb | 8 +- lib/chargebee/models/price_variant.rb | 10 +- lib/chargebee/models/pricing_page_session.rb | 4 +- lib/chargebee/models/promotional_credit.rb | 10 +- lib/chargebee/models/promotional_grant.rb | 2 +- lib/chargebee/models/purchase.rb | 4 +- lib/chargebee/models/quote.rb | 54 +++++------ lib/chargebee/models/quote_line_group.rb | 2 +- lib/chargebee/models/quoted_charge.rb | 4 +- lib/chargebee/models/ramp.rb | 12 +-- lib/chargebee/models/recorded_purchase.rb | 4 +- lib/chargebee/models/resource_migration.rb | 2 +- lib/chargebee/models/rule.rb | 2 +- lib/chargebee/models/site_migration_detail.rb | 2 +- lib/chargebee/models/subscription.rb | 74 +++++++-------- .../models/subscription_entitlement.rb | 4 +- lib/chargebee/models/time_machine.rb | 6 +- lib/chargebee/models/transaction.rb | 22 ++--- lib/chargebee/models/unbilled_charge.rb | 12 +-- lib/chargebee/models/usage.rb | 10 +- lib/chargebee/models/usage_charge.rb | 2 +- lib/chargebee/models/usage_event.rb | 4 +- lib/chargebee/models/usage_file.rb | 4 +- lib/chargebee/models/usage_summary.rb | 2 +- lib/chargebee/models/virtual_bank_account.rb | 12 +-- lib/chargebee/models/webhook_endpoint.rb | 10 +- lib/chargebee/result.rb | 47 ++++++++-- 86 files changed, 739 insertions(+), 489 deletions(-) create mode 100644 lib/chargebee/models/async_response.rb create mode 100644 lib/chargebee/models/async_response_list.rb create mode 100644 lib/chargebee/models/column_definition.rb create mode 100644 lib/chargebee/models/meter.rb create mode 100644 lib/chargebee/models/metered_feature.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eaf661..947170a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,85 @@ +### v2.77.0 (2026-07-21) +* * * +### New Resources: +- [`AsyncResponse`](https://apidocs.chargebee.com/docs/api/async_responses) has been added. +- [`AsyncResponseList`](https://apidocs.chargebee.com/docs/api/async_response_lists) has been added. +- [`ColumnDefinition`](https://apidocs.chargebee.com/docs/api/column_definitions) has been added. +- [`Meter`](https://apidocs.chargebee.com/docs/api/meters) has been added. +- [`MeteredFeature`](https://apidocs.chargebee.com/docs/api/metered_features) has been added. + + +### New Attributes: +- [`currency_code`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#currency_code) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`threshold`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#threshold) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`filter_conditions`](https://apidocs.chargebee.com/docs/api/alerts/alert-object#filter_conditions) has been added to [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`exchange_rates`](https://apidocs.chargebee.com/docs/api/credit_notes/credit-note-object#exchange_rates) has been added to [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes). +- [`metered`](https://apidocs.chargebee.com/docs/api/features/feature-object#metered) has been added to [`Feature`](https://apidocs.chargebee.com/docs/api/features). +- [`exchange_rates`](https://apidocs.chargebee.com/docs/api/invoices/invoice-object#exchange_rates) has been added to [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`payment_intent_metadata`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata) has been added to [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). + + +### New Parameters: +- [`metered`](https://apidocs.chargebee.com/docs/api/features/list-features#metered) has been added as query parameter to [`list_features`](https://apidocs.chargebee.com/docs/api/features/list-features) in [`Feature`](https://apidocs.chargebee.com/docs/api/features). +- [`decommissioned`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions#decommissioned) has been added as query parameter to [`list_subscriptions`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions) in [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions). +- [`currency_code`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#currency_code) has been added as request body parameter to [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) in [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). +- [`line_items.proration_mode`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note#line_items_proration_mode) has been added as request body parameter to [`import_credit_note`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note) in [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes). +- [`item_prices.description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#item_prices_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates). +- [`item_prices.entity_description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#item_prices_entity_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates). +- [`charges.entity_description`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate#charges_entity_description) has been added as request body parameter to [`create_invoice_for_items_estimate`](https://apidocs.chargebee.com/docs/api/estimates/create-invoice-for-items-estimate) in [`Estimate`](https://apidocs.chargebee.com/docs/api/estimates). +- [`subscription.decommissioned`](https://apidocs.chargebee.com/docs/api/exports/export-subscriptions#subscription_decommissioned) has been added as request body parameter to [`export_subscriptions`](https://apidocs.chargebee.com/docs/api/exports/export-subscriptions) in [`Export`](https://apidocs.chargebee.com/docs/api/exports). +- [`item_prices.description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#item_prices_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`item_prices.entity_description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#item_prices_entity_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`charges.entity_description`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#charges_entity_description) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`create_pending_invoice`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges#create_pending_invoice) has been added as request body parameter to [`create_invoice_for_items_and_one-time_charges`](https://apidocs.chargebee.com/docs/api/invoices/create-invoice-for-items-and-one-time-charges) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`line_items.proration_mode`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice#line_items_proration_mode) has been added as request body parameter to [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`paid_at`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice#paid_at) has been added as request body parameter to [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) in [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- [`discounts_to_add.quantity`](https://apidocs.chargebee.com/docs/api/ramps/create-a-ramp#discounts_to_add_quantity) has been added as request body parameter to [`create_a_ramp`](https://apidocs.chargebee.com/docs/api/ramps/create-a-ramp) in [`Ramp`](https://apidocs.chargebee.com/docs/api/ramps). +- [`discounts_to_add.quantity`](https://apidocs.chargebee.com/docs/api/ramps/update-a-subscription-ramp#discounts_to_add_quantity) has been added as request body parameter to [`update_a_subscription_ramp`](https://apidocs.chargebee.com/docs/api/ramps/update-a-subscription-ramp) in [`Ramp`](https://apidocs.chargebee.com/docs/api/ramps). +- [`customer.email`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_email) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases). +- [`customer.first_name`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_first_name) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases). +- [`customer.last_name`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase#customer_last_name) has been added as request body parameter to [`record_a_purchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases/record-a-purchase) in [`RecordedPurchase`](https://apidocs.chargebee.com/docs/api/recorded_purchases). + + +### Parameter Updates: +- [`metered_feature_id`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert#metered_feature_id) has been changed from required to optional in [`create_an_alert`](https://apidocs.chargebee.com/docs/api/alerts/create-an-alert) of [`Alert`](https://apidocs.chargebee.com/docs/api/alerts). + + +### New Events: +- [`payment_source_business_entity_changed`](https://apidocs.chargebee.com/docs/api/events/webhook/payment_source_business_entity_changed) has been added. + + +### Deleted Attributes: +- `start_balance` has been removed from [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations). +- `end_balance` has been removed from [`LedgerOperation`](https://apidocs.chargebee.com/docs/api/ledger_operations). + + +### New Enums: +- `real_time_payments` has been added as a new value enum `DunningType`. +- `payment_source_business_entity_changed` has been added as a new value enum `EventType`. +- `paynow`, `bizum`, and `promptpay` have been added as new values enum `PaymentMethod`. +- `paynow`, `bizum`, and `promptpay` have been added as new values enum `PaymentMethodType`. +- `active`, `archived`, and `deleted` have been added as new values enum `Status`. +- `zero_rated`, `region_non_taxable`, `product_exempt`, `high_value_physical_goods`, `zero_value_item`, and `tax_not_configured_external_provider` have been added as new values enum `TaxOverrideReason`. +- `paynow`, `bizum`, `promptpay`, `simple`, `compound`, and `spend_exceeded` have been added as new values enum `Type`. +- `success` and `failed` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/async_responses/async-response-object#status) in [`AsyncResponse`](https://apidocs.chargebee.com/docs/api/async_responses). +- `number` and `string` have been added as new values to enum attribute [`data_type`](https://apidocs.chargebee.com/docs/api/column_definitions/column-definition-object#data_type) in [`ColumnDefinition`](https://apidocs.chargebee.com/docs/api/column_definitions). +- `simple` and `compound` have been added as new values to enum attribute [`type`](https://apidocs.chargebee.com/docs/api/meters/meter-object#type) in [`Meter`](https://apidocs.chargebee.com/docs/api/meters). +- `active`, `archived`, and `deleted` have been added as new values to enum attribute [`status`](https://apidocs.chargebee.com/docs/api/meters/meter-object#status) in [`Meter`](https://apidocs.chargebee.com/docs/api/meters). +- `paynow`, `bizum`, and `promptpay` have been added as new values to enum attribute [`payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `paynow`, `bizum`, and `promptpay` have been added as new values to enum attribute [`active_payment_attempt.payment_method_type`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#active_payment_attempt_payment_method_type) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `cb_js`, `components_fields`, `checkout_v3`, `paynow_v3`, `portal_v3`, `gift_v3`, `checkout_v4`, `payment_component`, `pc_inapp_v4`, and `pc_fpc_v4` have been added as new values to enum attribute [`payment_intent_metadata.source`](https://apidocs.chargebee.com/docs/api/payment_intents/payment-intent-object#payment_intent_metadata_source) in [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `adjusted_term`, `service_period_revision`, `delta`, and `reset` have been added as new values to enum request body parameter `line_items.proration_mode` in [`import_credit_note`](https://apidocs.chargebee.com/docs/api/credit_notes/import-credit-note) of [`CreditNote`](https://apidocs.chargebee.com/docs/api/credit_notes). +- `true` and `false` have been added as new values to enum query parameter `metered.is` in [`list_features`](https://apidocs.chargebee.com/docs/api/features/list-features) of [`Feature`](https://apidocs.chargebee.com/docs/api/features). +- `adjusted_term`, `service_period_revision`, `delta`, and `reset` have been added as new values to enum request body parameter `line_items.proration_mode` in [`import_invoice`](https://apidocs.chargebee.com/docs/api/invoices/import-invoice) of [`Invoice`](https://apidocs.chargebee.com/docs/api/invoices). +- `updated_at`, `name`, `created_at`, and `id` have been added as new values to enum query parameter `sort_by.asc` in [`list_all_available_meters`](https://apidocs.chargebee.com/docs/api/meters/list-all-available-meters) of [`Meter`](https://apidocs.chargebee.com/docs/api/meters). +- `updated_at`, `name`, `created_at`, and `id` have been added as new values to enum query parameter `sort_by.desc` in [`list_all_available_meters`](https://apidocs.chargebee.com/docs/api/meters/list-all-available-meters) of [`Meter`](https://apidocs.chargebee.com/docs/api/meters). +- `number` and `string` have been added as new values to enum request body parameter `column_definitions.data_type` in [`create_a_metered_feature`](https://apidocs.chargebee.com/docs/api/metered_features/create-a-metered-feature) of [`MeteredFeature`](https://apidocs.chargebee.com/docs/api/metered_features). +- `paynow`, `bizum`, and `promptpay` have been added as new values to enum request body parameter `payment_method_type` in [`update_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/update-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `paynow`, `bizum`, and `promptpay` have been added as new values to enum request body parameter `payment_method_type` in [`create_a_payment_intent`](https://apidocs.chargebee.com/docs/api/payment_intents/create-a-payment-intent) of [`PaymentIntent`](https://apidocs.chargebee.com/docs/api/payment_intents). +- `true` and `false` have been added as new values to enum query parameter `decommissioned.is` in [`list_subscriptions`](https://apidocs.chargebee.com/docs/api/subscriptions/list-subscriptions) of [`Subscription`](https://apidocs.chargebee.com/docs/api/subscriptions). + + + ### v2.76.0 (2026-07-02) * * * diff --git a/Gemfile.lock b/Gemfile.lock index 3d56d36..18c4a70 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - chargebee (2.76.0) + chargebee (2.77.0) cgi (>= 0.1.0, < 1.0.0) GEM diff --git a/VERSION b/VERSION index 9445334..581bd1a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.76.0 +2.77.0 diff --git a/chargebee.gemspec b/chargebee.gemspec index 54cf22d..62cf007 100644 --- a/chargebee.gemspec +++ b/chargebee.gemspec @@ -4,8 +4,8 @@ Gem::Specification.new do |s| s.rubygems_version = '1.3.5' s.required_ruby_version = '>= 1.9.3' s.name = 'chargebee' - s.version = '2.76.0' - s.date = '2026-07-02' + s.version = '2.77.0' + s.date = '2026-07-21' s.summary = "Ruby client for Chargebee API." s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com." s.metadata = { @@ -47,6 +47,8 @@ Gem::Specification.new do |s| lib/chargebee/models/advance_invoice_schedule.rb lib/chargebee/models/alert.rb lib/chargebee/models/alert_status.rb + lib/chargebee/models/async_response.rb + lib/chargebee/models/async_response_list.rb lib/chargebee/models/attached_item.rb lib/chargebee/models/attribute.rb lib/chargebee/models/billing_configuration.rb @@ -54,6 +56,7 @@ Gem::Specification.new do |s| lib/chargebee/models/business_entity.rb lib/chargebee/models/business_entity_transfer.rb lib/chargebee/models/card.rb + lib/chargebee/models/column_definition.rb lib/chargebee/models/comment.rb lib/chargebee/models/configuration.rb lib/chargebee/models/contact.rb @@ -98,6 +101,8 @@ Gem::Specification.new do |s| lib/chargebee/models/ledger_account_balance.rb lib/chargebee/models/ledger_operation.rb lib/chargebee/models/metadata.rb + lib/chargebee/models/meter.rb + lib/chargebee/models/metered_feature.rb lib/chargebee/models/model.rb lib/chargebee/models/non_subscription.rb lib/chargebee/models/offer_event.rb diff --git a/lib/chargebee.rb b/lib/chargebee.rb index da2a81c..7ebe7db 100644 --- a/lib/chargebee.rb +++ b/lib/chargebee.rb @@ -21,6 +21,8 @@ require File.dirname(__FILE__) + '/chargebee/models/advance_invoice_schedule' require File.dirname(__FILE__) + '/chargebee/models/alert' require File.dirname(__FILE__) + '/chargebee/models/alert_status' +require File.dirname(__FILE__) + '/chargebee/models/async_response' +require File.dirname(__FILE__) + '/chargebee/models/async_response_list' require File.dirname(__FILE__) + '/chargebee/models/attached_item' require File.dirname(__FILE__) + '/chargebee/models/attribute' require File.dirname(__FILE__) + '/chargebee/models/billing_configuration' @@ -28,6 +30,7 @@ require File.dirname(__FILE__) + '/chargebee/models/business_entity' require File.dirname(__FILE__) + '/chargebee/models/business_entity_transfer' require File.dirname(__FILE__) + '/chargebee/models/card' +require File.dirname(__FILE__) + '/chargebee/models/column_definition' require File.dirname(__FILE__) + '/chargebee/models/comment' require File.dirname(__FILE__) + '/chargebee/models/configuration' require File.dirname(__FILE__) + '/chargebee/models/contact' @@ -71,6 +74,8 @@ require File.dirname(__FILE__) + '/chargebee/models/ledger_account_balance' require File.dirname(__FILE__) + '/chargebee/models/ledger_operation' require File.dirname(__FILE__) + '/chargebee/models/metadata' +require File.dirname(__FILE__) + '/chargebee/models/meter' +require File.dirname(__FILE__) + '/chargebee/models/metered_feature' require File.dirname(__FILE__) + '/chargebee/models/non_subscription' require File.dirname(__FILE__) + '/chargebee/models/offer_event' require File.dirname(__FILE__) + '/chargebee/models/offer_fulfillment' @@ -129,7 +134,7 @@ module ChargeBee - VERSION = '2.76.0' + VERSION = '2.77.0' @@default_env = nil @@verify_ca_certs = true diff --git a/lib/chargebee/models/addon.rb b/lib/chargebee/models/addon.rb index 7a5caef..f0888fe 100644 --- a/lib/chargebee/models/addon.rb +++ b/lib/chargebee/models/addon.rb @@ -28,7 +28,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("addons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "create") + Request.send('post', uri_path("addons"), params, env, headers,nil, false, jsonKeys, options, "addon", "create") end def self.update(id, params, env=nil, headers={}) @@ -38,21 +38,21 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("addons",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "update") + Request.send('post', uri_path("addons",id.to_s), params, env, headers,nil, false, jsonKeys, options, "addon", "update") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("addons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "list") + Request.send_list_request('get', uri_path("addons"), params, env, headers,nil, false, jsonKeys, options, "addon", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("addons",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "retrieve") + Request.send('get', uri_path("addons",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "addon", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -61,7 +61,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("addons",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "delete") + Request.send('post', uri_path("addons",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "addon", "delete") end def self.copy(params, env=nil, headers={}) @@ -70,7 +70,7 @@ def self.copy(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("addons","copy"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "copy") + Request.send('post', uri_path("addons","copy"), params, env, headers,nil, false, jsonKeys, options, "addon", "copy") end def self.unarchive(id, env=nil, headers={}) @@ -79,7 +79,7 @@ def self.unarchive(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("addons",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "addon", telemetry_operation: "unarchive") + Request.send('post', uri_path("addons",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, "addon", "unarchive") end end # ~Addon diff --git a/lib/chargebee/models/address.rb b/lib/chargebee/models/address.rb index bfa0f35..af4869a 100644 --- a/lib/chargebee/models/address.rb +++ b/lib/chargebee/models/address.rb @@ -11,7 +11,7 @@ def self.retrieve(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("addresses"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "address", telemetry_operation: "retrieve") + Request.send('get', uri_path("addresses"), params, env, headers,nil, false, jsonKeys, options, "address", "retrieve") end def self.update(params, env=nil, headers={}) @@ -20,7 +20,7 @@ def self.update(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("addresses"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "address", telemetry_operation: "update") + Request.send('post', uri_path("addresses"), params, env, headers,nil, false, jsonKeys, options, "address", "update") end end # ~Address diff --git a/lib/chargebee/models/alert.rb b/lib/chargebee/models/alert.rb index 732ae15..0a04dbb 100644 --- a/lib/chargebee/models/alert.rb +++ b/lib/chargebee/models/alert.rb @@ -1,8 +1,16 @@ module ChargeBee class Alert < Model - attr_accessor :id, :type, :name, :description, :metered_feature_id, :subscription_id, :status, - :meta, :created_at, :updated_at + class Threshold < Model + attr_accessor :mode, :value + end + + class FilterCondition < Model + attr_accessor :field, :operator, :value + end + + attr_accessor :id, :type, :name, :description, :metered_feature_id, :currency_code, :subscription_id, + :status, :meta, :created_at, :updated_at, :threshold, :filter_conditions # OPERATIONS #----------- @@ -13,21 +21,21 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("alerts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alert", telemetry_operation: "create") + Request.send('post', uri_path("alerts"), params, env, headers,nil, false, jsonKeys, options, "alert", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("alerts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alert", telemetry_operation: "retrieve") + Request.send('get', uri_path("alerts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "alert", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("alerts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alert", telemetry_operation: "list") + Request.send_list_request('get', uri_path("alerts"), params, env, headers,nil, false, jsonKeys, options, "alert", "list") end def self.update(id, params={}, env=nil, headers={}) @@ -36,7 +44,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("alerts",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alert", telemetry_operation: "update") + Request.send('post', uri_path("alerts",id.to_s), params, env, headers,nil, false, jsonKeys, options, "alert", "update") end def self.delete(id, env=nil, headers={}) @@ -45,14 +53,14 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("alerts",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alert", telemetry_operation: "delete") + Request.send('post', uri_path("alerts",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "alert", "delete") end def self.application_alerts_for_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"applicable_alerts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alert", telemetry_operation: "applicationAlertsForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"applicable_alerts"), params, env, headers,nil, false, jsonKeys, options, "alert", "applicationAlertsForSubscription") end end # ~Alert diff --git a/lib/chargebee/models/alert_status.rb b/lib/chargebee/models/alert_status.rb index 61f2db6..4a50684 100644 --- a/lib/chargebee/models/alert_status.rb +++ b/lib/chargebee/models/alert_status.rb @@ -10,14 +10,14 @@ def self.alert_statuses_for_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"alert_statuses"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alertStatus", telemetry_operation: "alertStatusesForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"alert_statuses"), params, env, headers,nil, false, jsonKeys, options, "alertStatus", "alertStatusesForSubscription") end def self.alert_statuses_for_alert(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("alerts",id.to_s,"alert_statuses"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "alertStatus", telemetry_operation: "alertStatusesForAlert") + Request.send('get', uri_path("alerts",id.to_s,"alert_statuses"), params, env, headers,nil, false, jsonKeys, options, "alertStatus", "alertStatusesForAlert") end end # ~AlertStatus diff --git a/lib/chargebee/models/async_response.rb b/lib/chargebee/models/async_response.rb new file mode 100644 index 0000000..7941392 --- /dev/null +++ b/lib/chargebee/models/async_response.rb @@ -0,0 +1,18 @@ +module ChargeBee + class AsyncResponse < Model + + class RequestAsyncApi < Model + attr_accessor :id, :resource, :operation_type, :method, :uri, :idempotency_key + end + + class Error < Model + attr_accessor :message, :type, :api_error_code, :error_code, :error_msg, :http_status_code + end + + attr_accessor :api_version, :created_at, :completed_at, :status, :request, :error_detail, :result + + # OPERATIONS + #----------- + + end # ~AsyncResponse +end # ~ChargeBee \ No newline at end of file diff --git a/lib/chargebee/models/async_response_list.rb b/lib/chargebee/models/async_response_list.rb new file mode 100644 index 0000000..bca1d8b --- /dev/null +++ b/lib/chargebee/models/async_response_list.rb @@ -0,0 +1,10 @@ +module ChargeBee + class AsyncResponseList < Model + + attr_accessor :list + + # OPERATIONS + #----------- + + end # ~AsyncResponseList +end # ~ChargeBee \ No newline at end of file diff --git a/lib/chargebee/models/attached_item.rb b/lib/chargebee/models/attached_item.rb index d650f4b..be91bd0 100644 --- a/lib/chargebee/models/attached_item.rb +++ b/lib/chargebee/models/attached_item.rb @@ -14,7 +14,7 @@ def self.create(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("items",id.to_s,"attached_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "attachedItem", telemetry_operation: "create") + Request.send('post', uri_path("items",id.to_s,"attached_items"), params, env, headers,nil, false, jsonKeys, options, "attachedItem", "create") end def self.update(id, params, env=nil, headers={}) @@ -23,14 +23,14 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("attached_items",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "attachedItem", telemetry_operation: "update") + Request.send('post', uri_path("attached_items",id.to_s), params, env, headers,nil, false, jsonKeys, options, "attachedItem", "update") end def self.retrieve(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("attached_items",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "attachedItem", telemetry_operation: "retrieve") + Request.send('get', uri_path("attached_items",id.to_s), params, env, headers,nil, false, jsonKeys, options, "attachedItem", "retrieve") end def self.delete(id, params, env=nil, headers={}) @@ -39,14 +39,14 @@ def self.delete(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("attached_items",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "attachedItem", telemetry_operation: "delete") + Request.send('post', uri_path("attached_items",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "attachedItem", "delete") end def self.list(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("items",id.to_s,"attached_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "attachedItem", telemetry_operation: "list") + Request.send_list_request('get', uri_path("items",id.to_s,"attached_items"), params, env, headers,nil, false, jsonKeys, options, "attachedItem", "list") end end # ~AttachedItem diff --git a/lib/chargebee/models/business_entity.rb b/lib/chargebee/models/business_entity.rb index b0002f3..c07b51d 100644 --- a/lib/chargebee/models/business_entity.rb +++ b/lib/chargebee/models/business_entity.rb @@ -12,14 +12,14 @@ def self.create_transfers(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("business_entities","transfers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "businessEntity", telemetry_operation: "createTransfers") + Request.send('post', uri_path("business_entities","transfers"), params, env, headers,nil, false, jsonKeys, options, "businessEntity", "createTransfers") end def self.get_transfers(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("business_entities","transfers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "businessEntity", telemetry_operation: "getTransfers") + Request.send('get', uri_path("business_entities","transfers"), params, env, headers,nil, false, jsonKeys, options, "businessEntity", "getTransfers") end end # ~BusinessEntity diff --git a/lib/chargebee/models/card.rb b/lib/chargebee/models/card.rb index 0b7e507..016be06 100644 --- a/lib/chargebee/models/card.rb +++ b/lib/chargebee/models/card.rb @@ -14,7 +14,7 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("cards",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "card", telemetry_operation: "retrieve") + Request.send('get', uri_path("cards",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "card", "retrieve") end def self.update_card_for_customer(id, params, env=nil, headers={}) @@ -23,7 +23,7 @@ def self.update_card_for_customer(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"credit_card"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "card", telemetry_operation: "updateCardForCustomer") + Request.send('post', uri_path("customers",id.to_s,"credit_card"), params, env, headers,nil, false, jsonKeys, options, "card", "updateCardForCustomer") end def self.switch_gateway_for_customer(id, params, env=nil, headers={}) @@ -32,7 +32,7 @@ def self.switch_gateway_for_customer(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"switch_gateway"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "card", telemetry_operation: "switchGatewayForCustomer") + Request.send('post', uri_path("customers",id.to_s,"switch_gateway"), params, env, headers,nil, false, jsonKeys, options, "card", "switchGatewayForCustomer") end def self.copy_card_for_customer(id, params, env=nil, headers={}) @@ -41,7 +41,7 @@ def self.copy_card_for_customer(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"copy_card"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "card", telemetry_operation: "copyCardForCustomer") + Request.send('post', uri_path("customers",id.to_s,"copy_card"), params, env, headers,nil, false, jsonKeys, options, "card", "copyCardForCustomer") end def self.delete_card_for_customer(id, env=nil, headers={}) @@ -50,7 +50,7 @@ def self.delete_card_for_customer(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"delete_card"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "card", telemetry_operation: "deleteCardForCustomer") + Request.send('post', uri_path("customers",id.to_s,"delete_card"), {}, env, headers,nil, false, jsonKeys, options, "card", "deleteCardForCustomer") end end # ~Card diff --git a/lib/chargebee/models/column_definition.rb b/lib/chargebee/models/column_definition.rb new file mode 100644 index 0000000..ce685d9 --- /dev/null +++ b/lib/chargebee/models/column_definition.rb @@ -0,0 +1,10 @@ +module ChargeBee + class ColumnDefinition < Model + + attr_accessor :column_name, :data_type + + # OPERATIONS + #----------- + + end # ~ColumnDefinition +end # ~ChargeBee \ No newline at end of file diff --git a/lib/chargebee/models/comment.rb b/lib/chargebee/models/comment.rb index 0e8bd7b..8419bcd 100644 --- a/lib/chargebee/models/comment.rb +++ b/lib/chargebee/models/comment.rb @@ -12,21 +12,21 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("comments"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "comment", telemetry_operation: "create") + Request.send('post', uri_path("comments"), params, env, headers,nil, false, jsonKeys, options, "comment", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("comments",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "comment", telemetry_operation: "retrieve") + Request.send('get', uri_path("comments",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "comment", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("comments"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "comment", telemetry_operation: "list") + Request.send_list_request('get', uri_path("comments"), params, env, headers,nil, false, jsonKeys, options, "comment", "list") end def self.delete(id, env=nil, headers={}) @@ -35,7 +35,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("comments",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "comment", telemetry_operation: "delete") + Request.send('post', uri_path("comments",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "comment", "delete") end end # ~Comment diff --git a/lib/chargebee/models/configuration.rb b/lib/chargebee/models/configuration.rb index 37da895..2abfe54 100644 --- a/lib/chargebee/models/configuration.rb +++ b/lib/chargebee/models/configuration.rb @@ -10,7 +10,7 @@ def self.list(env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("configurations"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "configuration", telemetry_operation: "list") + Request.send_list_request('get', uri_path("configurations"), {}, env, headers,nil, false, jsonKeys, options, "configuration", "list") end end # ~Configuration diff --git a/lib/chargebee/models/coupon.rb b/lib/chargebee/models/coupon.rb index d8ade8b..6c4cdc7 100644 --- a/lib/chargebee/models/coupon.rb +++ b/lib/chargebee/models/coupon.rb @@ -30,7 +30,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "create") + Request.send('post', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, "coupon", "create") end def self.create_for_items(params, env=nil, headers={}) @@ -44,7 +44,7 @@ def self.create_for_items(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons","create_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "createForItems") + Request.send('post', uri_path("coupons","create_for_items"), params, env, headers,nil, false, jsonKeys, options, "coupon", "createForItems") end def self.update_for_items(id, params, env=nil, headers={}) @@ -58,21 +58,21 @@ def self.update_for_items(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons",id.to_s,"update_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "updateForItems") + Request.send('post', uri_path("coupons",id.to_s,"update_for_items"), params, env, headers,nil, false, jsonKeys, options, "coupon", "updateForItems") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "list") + Request.send_list_request('get', uri_path("coupons"), params, env, headers,nil, false, jsonKeys, options, "coupon", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("coupons",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "retrieve") + Request.send('get', uri_path("coupons",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "coupon", "retrieve") end def self.update(id, params={}, env=nil, headers={}) @@ -82,7 +82,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "update") + Request.send('post', uri_path("coupons",id.to_s), params, env, headers,nil, false, jsonKeys, options, "coupon", "update") end def self.delete(id, env=nil, headers={}) @@ -91,7 +91,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "delete") + Request.send('post', uri_path("coupons",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "coupon", "delete") end def self.copy(params, env=nil, headers={}) @@ -100,7 +100,7 @@ def self.copy(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons","copy"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "copy") + Request.send('post', uri_path("coupons","copy"), params, env, headers,nil, false, jsonKeys, options, "coupon", "copy") end def self.unarchive(id, env=nil, headers={}) @@ -109,7 +109,7 @@ def self.unarchive(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupons",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "coupon", telemetry_operation: "unarchive") + Request.send('post', uri_path("coupons",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, "coupon", "unarchive") end end # ~Coupon diff --git a/lib/chargebee/models/coupon_code.rb b/lib/chargebee/models/coupon_code.rb index 030be46..9f0d4ef 100644 --- a/lib/chargebee/models/coupon_code.rb +++ b/lib/chargebee/models/coupon_code.rb @@ -13,21 +13,21 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "create") + Request.send('post', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, "couponCode", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("coupon_codes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "retrieve") + Request.send('get', uri_path("coupon_codes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "couponCode", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "list") + Request.send_list_request('get', uri_path("coupon_codes"), params, env, headers,nil, false, jsonKeys, options, "couponCode", "list") end def self.archive(id, env=nil, headers={}) @@ -36,7 +36,7 @@ def self.archive(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_codes",id.to_s,"archive"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponCode", telemetry_operation: "archive") + Request.send('post', uri_path("coupon_codes",id.to_s,"archive"), {}, env, headers,nil, false, jsonKeys, options, "couponCode", "archive") end end # ~CouponCode diff --git a/lib/chargebee/models/coupon_set.rb b/lib/chargebee/models/coupon_set.rb index 0507e0a..7f320c1 100644 --- a/lib/chargebee/models/coupon_set.rb +++ b/lib/chargebee/models/coupon_set.rb @@ -13,7 +13,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "create") + Request.send('post', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "create") end def self.add_coupon_codes(id, params={}, env=nil, headers={}) @@ -22,21 +22,21 @@ def self.add_coupon_codes(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "addCouponCodes") + Request.send('post', uri_path("coupon_sets",id.to_s,"add_coupon_codes"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "addCouponCodes") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "list") + Request.send_list_request('get', uri_path("coupon_sets"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "retrieve") + Request.send('get', uri_path("coupon_sets",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "couponSet", "retrieve") end def self.update(id, params={}, env=nil, headers={}) @@ -46,7 +46,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "update") + Request.send('post', uri_path("coupon_sets",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, "couponSet", "update") end def self.delete(id, env=nil, headers={}) @@ -55,7 +55,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "delete") + Request.send('post', uri_path("coupon_sets",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "couponSet", "delete") end def self.delete_unused_coupon_codes(id, env=nil, headers={}) @@ -64,7 +64,7 @@ def self.delete_unused_coupon_codes(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "couponSet", telemetry_operation: "deleteUnusedCouponCodes") + Request.send('post', uri_path("coupon_sets",id.to_s,"delete_unused_coupon_codes"), {}, env, headers,nil, false, jsonKeys, options, "couponSet", "deleteUnusedCouponCodes") end end # ~CouponSet diff --git a/lib/chargebee/models/credit_note.rb b/lib/chargebee/models/credit_note.rb index e96954f..3cea6a6 100644 --- a/lib/chargebee/models/credit_note.rb +++ b/lib/chargebee/models/credit_note.rb @@ -2,7 +2,7 @@ module ChargeBee class CreditNote < Model class LineItem < Model - attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id + attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode end class LineItemTier < Model @@ -41,6 +41,10 @@ class Allocation < Model attr_accessor :invoice_id, :allocated_amount, :allocated_at, :invoice_date, :invoice_status, :tax_application end + class ExchangeRate < Model + attr_accessor :currency_code, :rate + end + class ShippingAddress < Model attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status end @@ -63,8 +67,9 @@ class SiteDetailsAtCreation < Model :channel, :line_items_next_offset, :sub_total, :sub_total_in_local_currency, :total_in_local_currency, :local_currency_code, :round_off_amount, :fractional_correction, :notes, :line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes, :line_item_addresses, :discounts, :taxes, :tax_origin, - :linked_refunds, :allocations, :deleted, :tax_category, :local_currency_exchange_rate, :create_reason_code, - :vat_number_prefix, :business_entity_id, :shipping_address, :billing_address, :einvoice, :site_details_at_creation + :linked_refunds, :allocations, :deleted, :tax_category, :local_currency_exchange_rate, :exchange_rates, + :create_reason_code, :vat_number_prefix, :business_entity_id, :shipping_address, :billing_address, + :einvoice, :site_details_at_creation # OPERATIONS #----------- @@ -75,14 +80,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "create") + Request.send('post', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "create") end def self.retrieve(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("credit_notes",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "retrieve") + Request.send('get', uri_path("credit_notes",id.to_s), params, env, headers,nil, false, jsonKeys, options, "creditNote", "retrieve") end def self.pdf(id, params={}, env=nil, headers={}) @@ -91,14 +96,14 @@ def self.pdf(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "pdf") + Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "pdf") end def self.download_einvoice(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("credit_notes",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "downloadEinvoice") + Request.send('get', uri_path("credit_notes",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "downloadEinvoice") end def self.refund(id, params={}, env=nil, headers={}) @@ -107,7 +112,7 @@ def self.refund(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "refund") + Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "refund") end def self.record_refund(id, params, env=nil, headers={}) @@ -116,7 +121,7 @@ def self.record_refund(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "recordRefund") + Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "recordRefund") end def self.void_credit_note(id, params={}, env=nil, headers={}) @@ -125,14 +130,14 @@ def self.void_credit_note(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "voidCreditNote") + Request.send('post', uri_path("credit_notes",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "voidCreditNote") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "list") + Request.send_list_request('get', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "list") end # @deprecated This method is deprecated and will be removed in a future version. @@ -140,7 +145,7 @@ def self.credit_notes_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "creditNotesForCustomer") + Request.send('get', uri_path("customers",id.to_s,"credit_notes"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "creditNotesForCustomer") end def self.delete(id, params={}, env=nil, headers={}) @@ -149,7 +154,7 @@ def self.delete(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "delete") + Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "delete") end def self.remove_tax_withheld_refund(id, params, env=nil, headers={}) @@ -158,7 +163,7 @@ def self.remove_tax_withheld_refund(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"remove_tax_withheld_refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "removeTaxWithheldRefund") + Request.send('post', uri_path("credit_notes",id.to_s,"remove_tax_withheld_refund"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "removeTaxWithheldRefund") end def self.resend_einvoice(id, env=nil, headers={}) @@ -167,7 +172,7 @@ def self.resend_einvoice(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "resendEinvoice") + Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "resendEinvoice") end def self.send_einvoice(id, env=nil, headers={}) @@ -176,7 +181,7 @@ def self.send_einvoice(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "sendEinvoice") + Request.send('post', uri_path("credit_notes",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "creditNote", "sendEinvoice") end def self.import_credit_note(params, env=nil, headers={}) @@ -185,7 +190,7 @@ def self.import_credit_note(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "creditNote", telemetry_operation: "importCreditNote") + Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers,nil, false, jsonKeys, options, "creditNote", "importCreditNote") end end # ~CreditNote diff --git a/lib/chargebee/models/credit_note_estimate.rb b/lib/chargebee/models/credit_note_estimate.rb index 2062429..a54b30c 100644 --- a/lib/chargebee/models/credit_note_estimate.rb +++ b/lib/chargebee/models/credit_note_estimate.rb @@ -2,7 +2,7 @@ module ChargeBee class CreditNoteEstimate < Model class LineItem < Model - attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id + attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode end class LineItemTier < Model diff --git a/lib/chargebee/models/currency.rb b/lib/chargebee/models/currency.rb index f7940e9..bf0ef12 100644 --- a/lib/chargebee/models/currency.rb +++ b/lib/chargebee/models/currency.rb @@ -10,14 +10,14 @@ def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("currencies","list"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "list") + Request.send_list_request('get', uri_path("currencies","list"), params, env, headers,nil, false, jsonKeys, options, "currency", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("currencies",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "retrieve") + Request.send('get', uri_path("currencies",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "currency", "retrieve") end def self.create(params, env=nil, headers={}) @@ -26,7 +26,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("currencies"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "create") + Request.send('post', uri_path("currencies"), params, env, headers,nil, false, jsonKeys, options, "currency", "create") end def self.update(id, params, env=nil, headers={}) @@ -35,7 +35,7 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("currencies",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "update") + Request.send('post', uri_path("currencies",id.to_s), params, env, headers,nil, false, jsonKeys, options, "currency", "update") end def self.add_schedule(id, params, env=nil, headers={}) @@ -44,7 +44,7 @@ def self.add_schedule(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("currencies",id.to_s,"add_schedule"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "addSchedule") + Request.send('post', uri_path("currencies",id.to_s,"add_schedule"), params, env, headers,nil, false, jsonKeys, options, "currency", "addSchedule") end def self.remove_schedule(id, env=nil, headers={}) @@ -53,7 +53,7 @@ def self.remove_schedule(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("currencies",id.to_s,"remove_schedule"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "currency", telemetry_operation: "removeSchedule") + Request.send('post', uri_path("currencies",id.to_s,"remove_schedule"), {}, env, headers,nil, false, jsonKeys, options, "currency", "removeSchedule") end end # ~Currency diff --git a/lib/chargebee/models/customer.rb b/lib/chargebee/models/customer.rb index d90930f..c2874c9 100644 --- a/lib/chargebee/models/customer.rb +++ b/lib/chargebee/models/customer.rb @@ -67,21 +67,21 @@ def self.create(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "create") + Request.send('post', uri_path("customers"), params, env, headers,nil, false, jsonKeys, options, "customer", "create") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("customers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "list") + Request.send_list_request('get', uri_path("customers"), params, env, headers,nil, false, jsonKeys, options, "customer", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "retrieve") + Request.send('get', uri_path("customers",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "customer", "retrieve") end def self.update(id, params={}, env=nil, headers={}) @@ -92,7 +92,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "update") + Request.send('post', uri_path("customers",id.to_s), params, env, headers,nil, false, jsonKeys, options, "customer", "update") end def self.update_payment_method(id, params, env=nil, headers={}) @@ -102,7 +102,7 @@ def self.update_payment_method(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"update_payment_method"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "updatePaymentMethod") + Request.send('post', uri_path("customers",id.to_s,"update_payment_method"), params, env, headers,nil, false, jsonKeys, options, "customer", "updatePaymentMethod") end def self.update_billing_info(id, params={}, env=nil, headers={}) @@ -111,14 +111,14 @@ def self.update_billing_info(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"update_billing_info"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "updateBillingInfo") + Request.send('post', uri_path("customers",id.to_s,"update_billing_info"), params, env, headers,nil, false, jsonKeys, options, "customer", "updateBillingInfo") end def self.contacts_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"contacts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "contactsForCustomer") + Request.send('get', uri_path("customers",id.to_s,"contacts"), params, env, headers,nil, false, jsonKeys, options, "customer", "contactsForCustomer") end def self.assign_payment_role(id, params, env=nil, headers={}) @@ -127,7 +127,7 @@ def self.assign_payment_role(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"assign_payment_role"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "assignPaymentRole") + Request.send('post', uri_path("customers",id.to_s,"assign_payment_role"), params, env, headers,nil, false, jsonKeys, options, "customer", "assignPaymentRole") end def self.add_contact(id, params, env=nil, headers={}) @@ -136,7 +136,7 @@ def self.add_contact(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"add_contact"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "addContact") + Request.send('post', uri_path("customers",id.to_s,"add_contact"), params, env, headers,nil, false, jsonKeys, options, "customer", "addContact") end def self.update_contact(id, params, env=nil, headers={}) @@ -145,7 +145,7 @@ def self.update_contact(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"update_contact"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "updateContact") + Request.send('post', uri_path("customers",id.to_s,"update_contact"), params, env, headers,nil, false, jsonKeys, options, "customer", "updateContact") end def self.delete_contact(id, params, env=nil, headers={}) @@ -154,7 +154,7 @@ def self.delete_contact(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"delete_contact"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "deleteContact") + Request.send('post', uri_path("customers",id.to_s,"delete_contact"), params, env, headers,nil, false, jsonKeys, options, "customer", "deleteContact") end # @deprecated This method is deprecated and will be removed in a future version. @@ -164,7 +164,7 @@ def self.add_promotional_credits(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"add_promotional_credits"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "addPromotionalCredits") + Request.send('post', uri_path("customers",id.to_s,"add_promotional_credits"), params, env, headers,nil, false, jsonKeys, options, "customer", "addPromotionalCredits") end # @deprecated This method is deprecated and will be removed in a future version. @@ -174,7 +174,7 @@ def self.deduct_promotional_credits(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"deduct_promotional_credits"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "deductPromotionalCredits") + Request.send('post', uri_path("customers",id.to_s,"deduct_promotional_credits"), params, env, headers,nil, false, jsonKeys, options, "customer", "deductPromotionalCredits") end # @deprecated This method is deprecated and will be removed in a future version. @@ -184,7 +184,7 @@ def self.set_promotional_credits(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"set_promotional_credits"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "setPromotionalCredits") + Request.send('post', uri_path("customers",id.to_s,"set_promotional_credits"), params, env, headers,nil, false, jsonKeys, options, "customer", "setPromotionalCredits") end def self.record_excess_payment(id, params, env=nil, headers={}) @@ -193,7 +193,7 @@ def self.record_excess_payment(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"record_excess_payment"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "recordExcessPayment") + Request.send('post', uri_path("customers",id.to_s,"record_excess_payment"), params, env, headers,nil, false, jsonKeys, options, "customer", "recordExcessPayment") end def self.collect_payment(id, params, env=nil, headers={}) @@ -203,7 +203,7 @@ def self.collect_payment(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"collect_payment"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "collectPayment") + Request.send('post', uri_path("customers",id.to_s,"collect_payment"), params, env, headers,nil, false, jsonKeys, options, "customer", "collectPayment") end def self.delete(id, params={}, env=nil, headers={}) @@ -212,7 +212,7 @@ def self.delete(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "delete") + Request.send('post', uri_path("customers",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "customer", "delete") end def self.move(params, env=nil, headers={}) @@ -221,7 +221,7 @@ def self.move(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers","move"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "move") + Request.send('post', uri_path("customers","move"), params, env, headers,nil, false, jsonKeys, options, "customer", "move") end def self.change_billing_date(id, params={}, env=nil, headers={}) @@ -230,7 +230,7 @@ def self.change_billing_date(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"change_billing_date"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "changeBillingDate") + Request.send('post', uri_path("customers",id.to_s,"change_billing_date"), params, env, headers,nil, false, jsonKeys, options, "customer", "changeBillingDate") end def self.merge(params, env=nil, headers={}) @@ -239,7 +239,7 @@ def self.merge(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers","merge"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "merge") + Request.send('post', uri_path("customers","merge"), params, env, headers,nil, false, jsonKeys, options, "customer", "merge") end def self.clear_personal_data(id, env=nil, headers={}) @@ -248,7 +248,7 @@ def self.clear_personal_data(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"clear_personal_data"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "clearPersonalData") + Request.send('post', uri_path("customers",id.to_s,"clear_personal_data"), {}, env, headers,nil, false, jsonKeys, options, "customer", "clearPersonalData") end def self.relationships(id, params={}, env=nil, headers={}) @@ -257,7 +257,7 @@ def self.relationships(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"relationships"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "relationships") + Request.send('post', uri_path("customers",id.to_s,"relationships"), params, env, headers,nil, false, jsonKeys, options, "customer", "relationships") end def self.delete_relationship(id, env=nil, headers={}) @@ -266,21 +266,21 @@ def self.delete_relationship(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"delete_relationship"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "deleteRelationship") + Request.send('post', uri_path("customers",id.to_s,"delete_relationship"), {}, env, headers,nil, false, jsonKeys, options, "customer", "deleteRelationship") end def self.hierarchy(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"hierarchy"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "hierarchy") + Request.send('get', uri_path("customers",id.to_s,"hierarchy"), params, env, headers,nil, false, jsonKeys, options, "customer", "hierarchy") end def self.list_hierarchy_detail(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"hierarchy_detail"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "listHierarchyDetail") + Request.send('get', uri_path("customers",id.to_s,"hierarchy_detail"), params, env, headers,nil, false, jsonKeys, options, "customer", "listHierarchyDetail") end def self.update_hierarchy_settings(id, params={}, env=nil, headers={}) @@ -289,7 +289,7 @@ def self.update_hierarchy_settings(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"update_hierarchy_settings"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customer", telemetry_operation: "updateHierarchySettings") + Request.send('post', uri_path("customers",id.to_s,"update_hierarchy_settings"), params, env, headers,nil, false, jsonKeys, options, "customer", "updateHierarchySettings") end end # ~Customer diff --git a/lib/chargebee/models/customer_entitlement.rb b/lib/chargebee/models/customer_entitlement.rb index 7cd8049..9759b21 100644 --- a/lib/chargebee/models/customer_entitlement.rb +++ b/lib/chargebee/models/customer_entitlement.rb @@ -10,7 +10,7 @@ def self.entitlements_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"customer_entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "customerEntitlement", telemetry_operation: "entitlementsForCustomer") + Request.send('get', uri_path("customers",id.to_s,"customer_entitlements"), params, env, headers,nil, false, jsonKeys, options, "customerEntitlement", "entitlementsForCustomer") end end # ~CustomerEntitlement diff --git a/lib/chargebee/models/differential_price.rb b/lib/chargebee/models/differential_price.rb index 8be1157..da4920b 100644 --- a/lib/chargebee/models/differential_price.rb +++ b/lib/chargebee/models/differential_price.rb @@ -23,14 +23,14 @@ def self.create(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_prices",id.to_s,"differential_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "differentialPrice", telemetry_operation: "create") + Request.send('post', uri_path("item_prices",id.to_s,"differential_prices"), params, env, headers,nil, false, jsonKeys, options, "differentialPrice", "create") end def self.retrieve(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("differential_prices",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "differentialPrice", telemetry_operation: "retrieve") + Request.send('get', uri_path("differential_prices",id.to_s), params, env, headers,nil, false, jsonKeys, options, "differentialPrice", "retrieve") end def self.update(id, params, env=nil, headers={}) @@ -40,7 +40,7 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("differential_prices",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "differentialPrice", telemetry_operation: "update") + Request.send('post', uri_path("differential_prices",id.to_s), params, env, headers,nil, false, jsonKeys, options, "differentialPrice", "update") end def self.delete(id, params, env=nil, headers={}) @@ -49,14 +49,14 @@ def self.delete(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("differential_prices",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "differentialPrice", telemetry_operation: "delete") + Request.send('post', uri_path("differential_prices",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "differentialPrice", "delete") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("differential_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "differentialPrice", telemetry_operation: "list") + Request.send_list_request('get', uri_path("differential_prices"), params, env, headers,nil, false, jsonKeys, options, "differentialPrice", "list") end end # ~DifferentialPrice diff --git a/lib/chargebee/models/entitlement.rb b/lib/chargebee/models/entitlement.rb index b740f91..f3485e7 100644 --- a/lib/chargebee/models/entitlement.rb +++ b/lib/chargebee/models/entitlement.rb @@ -10,7 +10,7 @@ def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "entitlement", telemetry_operation: "list") + Request.send_list_request('get', uri_path("entitlements"), params, env, headers,nil, false, jsonKeys, options, "entitlement", "list") end def self.create(params, env=nil, headers={}) @@ -19,7 +19,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "entitlement", telemetry_operation: "create") + Request.send('post', uri_path("entitlements"), params, env, headers,nil, false, jsonKeys, options, "entitlement", "create") end end # ~Entitlement diff --git a/lib/chargebee/models/entitlement_override.rb b/lib/chargebee/models/entitlement_override.rb index e423899..5c09d20 100644 --- a/lib/chargebee/models/entitlement_override.rb +++ b/lib/chargebee/models/entitlement_override.rb @@ -13,14 +13,14 @@ def self.add_entitlement_override_for_subscription(id, params, env=nil, headers= options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "entitlementOverride", telemetry_operation: "addEntitlementOverrideForSubscription") + Request.send('post', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers,nil, false, jsonKeys, options, "entitlementOverride", "addEntitlementOverrideForSubscription") end def self.list_entitlement_override_for_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "entitlementOverride", telemetry_operation: "listEntitlementOverrideForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers,nil, false, jsonKeys, options, "entitlementOverride", "listEntitlementOverrideForSubscription") end end # ~EntitlementOverride diff --git a/lib/chargebee/models/estimate.rb b/lib/chargebee/models/estimate.rb index 4f66a98..83286d4 100644 --- a/lib/chargebee/models/estimate.rb +++ b/lib/chargebee/models/estimate.rb @@ -13,7 +13,7 @@ def self.create_subscription(params, env=nil, headers={}) :exemption_details => 1, } options = {} - Request.send('post', uri_path("estimates","create_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "createSubscription") + Request.send('post', uri_path("estimates","create_subscription"), params, env, headers,nil, false, jsonKeys, options, "estimate", "createSubscription") end def self.create_sub_item_estimate(params, env=nil, headers={}) @@ -21,98 +21,98 @@ def self.create_sub_item_estimate(params, env=nil, headers={}) :exemption_details => 1, } options = {} - Request.send('post', uri_path("estimates","create_subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "createSubItemEstimate") + Request.send('post', uri_path("estimates","create_subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, "estimate", "createSubItemEstimate") end def self.create_sub_for_customer_estimate(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"create_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "createSubForCustomerEstimate") + Request.send('get', uri_path("customers",id.to_s,"create_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "createSubForCustomerEstimate") end def self.create_sub_item_for_customer_estimate(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("customers",id.to_s,"create_subscription_for_items_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "createSubItemForCustomerEstimate") + Request.send('post', uri_path("customers",id.to_s,"create_subscription_for_items_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "createSubItemForCustomerEstimate") end def self.update_subscription(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("estimates","update_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "updateSubscription") + Request.send('post', uri_path("estimates","update_subscription"), params, env, headers,nil, false, jsonKeys, options, "estimate", "updateSubscription") end def self.update_subscription_for_items(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("estimates","update_subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "updateSubscriptionForItems") + Request.send('post', uri_path("estimates","update_subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, "estimate", "updateSubscriptionForItems") end def self.renewal_estimate(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"renewal_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "renewalEstimate") + Request.send('get', uri_path("subscriptions",id.to_s,"renewal_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "renewalEstimate") end def self.advance_invoice_estimate(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"advance_invoice_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "advanceInvoiceEstimate") + Request.send('post', uri_path("subscriptions",id.to_s,"advance_invoice_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "advanceInvoiceEstimate") end def self.regenerate_invoice_estimate(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"regenerate_invoice_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "regenerateInvoiceEstimate") + Request.send('post', uri_path("subscriptions",id.to_s,"regenerate_invoice_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "regenerateInvoiceEstimate") end def self.upcoming_invoices_estimate(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"upcoming_invoices_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "upcomingInvoicesEstimate") + Request.send('get', uri_path("customers",id.to_s,"upcoming_invoices_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "upcomingInvoicesEstimate") end def self.change_term_end(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "changeTermEnd") + Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "changeTermEnd") end def self.cancel_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"cancel_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "cancelSubscription") + Request.send('post', uri_path("subscriptions",id.to_s,"cancel_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "cancelSubscription") end def self.cancel_subscription_for_items(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"cancel_subscription_for_items_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "cancelSubscriptionForItems") + Request.send('post', uri_path("subscriptions",id.to_s,"cancel_subscription_for_items_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "cancelSubscriptionForItems") end def self.pause_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"pause_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "pauseSubscription") + Request.send('post', uri_path("subscriptions",id.to_s,"pause_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "pauseSubscription") end def self.resume_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("subscriptions",id.to_s,"resume_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "resumeSubscription") + Request.send('post', uri_path("subscriptions",id.to_s,"resume_subscription_estimate"), params, env, headers,nil, false, jsonKeys, options, "estimate", "resumeSubscription") end def self.gift_subscription(params, env=nil, headers={}) @@ -120,7 +120,7 @@ def self.gift_subscription(params, env=nil, headers={}) :additional_information => 1, } options = {} - Request.send('post', uri_path("estimates","gift_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "giftSubscription") + Request.send('post', uri_path("estimates","gift_subscription"), params, env, headers,nil, false, jsonKeys, options, "estimate", "giftSubscription") end def self.gift_subscription_for_items(params, env=nil, headers={}) @@ -128,21 +128,21 @@ def self.gift_subscription_for_items(params, env=nil, headers={}) :additional_information => 1, } options = {} - Request.send('post', uri_path("estimates","gift_subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "giftSubscriptionForItems") + Request.send('post', uri_path("estimates","gift_subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, "estimate", "giftSubscriptionForItems") end def self.create_invoice(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("estimates","create_invoice"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "createInvoice") + Request.send('post', uri_path("estimates","create_invoice"), params, env, headers,nil, false, jsonKeys, options, "estimate", "createInvoice") end def self.create_invoice_for_items(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("estimates","create_invoice_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "createInvoiceForItems") + Request.send('post', uri_path("estimates","create_invoice_for_items"), params, env, headers,nil, false, jsonKeys, options, "estimate", "createInvoiceForItems") end def self.payment_schedules(params, env=nil, headers={}) @@ -151,7 +151,7 @@ def self.payment_schedules(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("estimates","payment_schedules"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "estimate", telemetry_operation: "paymentSchedules") + Request.send('post', uri_path("estimates","payment_schedules"), params, env, headers,nil, false, jsonKeys, options, "estimate", "paymentSchedules") end end # ~Estimate diff --git a/lib/chargebee/models/event.rb b/lib/chargebee/models/event.rb index 49e8aec..e7314b7 100644 --- a/lib/chargebee/models/event.rb +++ b/lib/chargebee/models/event.rb @@ -38,14 +38,14 @@ def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("events"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "event", telemetry_operation: "list") + Request.send_list_request('get', uri_path("events"), params, env, headers,nil, false, jsonKeys, options, "event", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("events",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "event", telemetry_operation: "retrieve") + Request.send('get', uri_path("events",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "event", "retrieve") end end # ~Event diff --git a/lib/chargebee/models/export.rb b/lib/chargebee/models/export.rb index 7dba7e8..af2ea09 100644 --- a/lib/chargebee/models/export.rb +++ b/lib/chargebee/models/export.rb @@ -40,7 +40,7 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("exports",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "retrieve") + Request.send('get', uri_path("exports",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "export", "retrieve") end def self.revenue_recognition(params, env=nil, headers={}) @@ -49,7 +49,7 @@ def self.revenue_recognition(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","revenue_recognition"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "revenueRecognition") + Request.send('post', uri_path("exports","revenue_recognition"), params, env, headers,nil, false, jsonKeys, options, "export", "revenueRecognition") end def self.deferred_revenue(params, env=nil, headers={}) @@ -58,7 +58,7 @@ def self.deferred_revenue(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","deferred_revenue"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "deferredRevenue") + Request.send('post', uri_path("exports","deferred_revenue"), params, env, headers,nil, false, jsonKeys, options, "export", "deferredRevenue") end def self.plans(params={}, env=nil, headers={}) @@ -67,7 +67,7 @@ def self.plans(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","plans"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "plans") + Request.send('post', uri_path("exports","plans"), params, env, headers,nil, false, jsonKeys, options, "export", "plans") end def self.addons(params={}, env=nil, headers={}) @@ -76,7 +76,7 @@ def self.addons(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","addons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "addons") + Request.send('post', uri_path("exports","addons"), params, env, headers,nil, false, jsonKeys, options, "export", "addons") end def self.coupons(params={}, env=nil, headers={}) @@ -85,7 +85,7 @@ def self.coupons(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","coupons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "coupons") + Request.send('post', uri_path("exports","coupons"), params, env, headers,nil, false, jsonKeys, options, "export", "coupons") end def self.customers(params={}, env=nil, headers={}) @@ -94,7 +94,7 @@ def self.customers(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","customers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "customers") + Request.send('post', uri_path("exports","customers"), params, env, headers,nil, false, jsonKeys, options, "export", "customers") end def self.subscriptions(params={}, env=nil, headers={}) @@ -103,7 +103,7 @@ def self.subscriptions(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","subscriptions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "subscriptions") + Request.send('post', uri_path("exports","subscriptions"), params, env, headers,nil, false, jsonKeys, options, "export", "subscriptions") end def self.invoices(params={}, env=nil, headers={}) @@ -112,7 +112,7 @@ def self.invoices(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","invoices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "invoices") + Request.send('post', uri_path("exports","invoices"), params, env, headers,nil, false, jsonKeys, options, "export", "invoices") end def self.credit_notes(params={}, env=nil, headers={}) @@ -121,7 +121,7 @@ def self.credit_notes(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","credit_notes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "creditNotes") + Request.send('post', uri_path("exports","credit_notes"), params, env, headers,nil, false, jsonKeys, options, "export", "creditNotes") end def self.transactions(params={}, env=nil, headers={}) @@ -130,7 +130,7 @@ def self.transactions(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","transactions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "transactions") + Request.send('post', uri_path("exports","transactions"), params, env, headers,nil, false, jsonKeys, options, "export", "transactions") end def self.orders(params={}, env=nil, headers={}) @@ -139,7 +139,7 @@ def self.orders(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","orders"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "orders") + Request.send('post', uri_path("exports","orders"), params, env, headers,nil, false, jsonKeys, options, "export", "orders") end def self.item_families(params={}, env=nil, headers={}) @@ -148,7 +148,7 @@ def self.item_families(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","item_families"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "itemFamilies") + Request.send('post', uri_path("exports","item_families"), params, env, headers,nil, false, jsonKeys, options, "export", "itemFamilies") end def self.items(params={}, env=nil, headers={}) @@ -157,7 +157,7 @@ def self.items(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "items") + Request.send('post', uri_path("exports","items"), params, env, headers,nil, false, jsonKeys, options, "export", "items") end def self.item_prices(params={}, env=nil, headers={}) @@ -166,7 +166,7 @@ def self.item_prices(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","item_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "itemPrices") + Request.send('post', uri_path("exports","item_prices"), params, env, headers,nil, false, jsonKeys, options, "export", "itemPrices") end def self.attached_items(params={}, env=nil, headers={}) @@ -175,7 +175,7 @@ def self.attached_items(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","attached_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "attachedItems") + Request.send('post', uri_path("exports","attached_items"), params, env, headers,nil, false, jsonKeys, options, "export", "attachedItems") end def self.differential_prices(params={}, env=nil, headers={}) @@ -184,7 +184,7 @@ def self.differential_prices(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","differential_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "differentialPrices") + Request.send('post', uri_path("exports","differential_prices"), params, env, headers,nil, false, jsonKeys, options, "export", "differentialPrices") end def self.price_variants(params={}, env=nil, headers={}) @@ -193,7 +193,7 @@ def self.price_variants(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("exports","price_variants"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "export", telemetry_operation: "priceVariants") + Request.send('post', uri_path("exports","price_variants"), params, env, headers,nil, false, jsonKeys, options, "export", "priceVariants") end end # ~Export diff --git a/lib/chargebee/models/feature.rb b/lib/chargebee/models/feature.rb index 415bdfc..a908508 100644 --- a/lib/chargebee/models/feature.rb +++ b/lib/chargebee/models/feature.rb @@ -6,7 +6,7 @@ class Level < Model end attr_accessor :id, :name, :description, :status, :type, :unit, :resource_version, :updated_at, - :created_at, :levels + :created_at, :metered, :levels # OPERATIONS #----------- @@ -15,7 +15,7 @@ def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("features"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "list") + Request.send_list_request('get', uri_path("features"), params, env, headers,nil, false, jsonKeys, options, "feature", "list") end def self.create(params, env=nil, headers={}) @@ -24,7 +24,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "create") + Request.send('post', uri_path("features"), params, env, headers,nil, false, jsonKeys, options, "feature", "create") end def self.update(id, params={}, env=nil, headers={}) @@ -33,14 +33,14 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "update") + Request.send('post', uri_path("features",id.to_s), params, env, headers,nil, false, jsonKeys, options, "feature", "update") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("features",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "retrieve") + Request.send('get', uri_path("features",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "feature", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -49,7 +49,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "delete") + Request.send('post', uri_path("features",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "feature", "delete") end def self.activate(id, env=nil, headers={}) @@ -58,7 +58,7 @@ def self.activate(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features",id.to_s,"activate_command"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "activate") + Request.send('post', uri_path("features",id.to_s,"activate_command"), {}, env, headers,nil, false, jsonKeys, options, "feature", "activate") end def self.archive(id, env=nil, headers={}) @@ -67,7 +67,7 @@ def self.archive(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features",id.to_s,"archive_command"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "archive") + Request.send('post', uri_path("features",id.to_s,"archive_command"), {}, env, headers,nil, false, jsonKeys, options, "feature", "archive") end def self.reactivate(id, env=nil, headers={}) @@ -76,7 +76,7 @@ def self.reactivate(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features",id.to_s,"reactivate_command"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "feature", telemetry_operation: "reactivate") + Request.send('post', uri_path("features",id.to_s,"reactivate_command"), {}, env, headers,nil, false, jsonKeys, options, "feature", "reactivate") end end # ~Feature diff --git a/lib/chargebee/models/gift.rb b/lib/chargebee/models/gift.rb index cdf5940..bf3b870 100644 --- a/lib/chargebee/models/gift.rb +++ b/lib/chargebee/models/gift.rb @@ -26,7 +26,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("gifts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "create") + Request.send('post', uri_path("gifts"), params, env, headers,nil, false, jsonKeys, options, "gift", "create") end def self.create_for_items(params, env=nil, headers={}) @@ -37,21 +37,21 @@ def self.create_for_items(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("gifts","create_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "createForItems") + Request.send('post', uri_path("gifts","create_for_items"), params, env, headers,nil, false, jsonKeys, options, "gift", "createForItems") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("gifts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "retrieve") + Request.send('get', uri_path("gifts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "gift", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("gifts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "list") + Request.send_list_request('get', uri_path("gifts"), params, env, headers,nil, false, jsonKeys, options, "gift", "list") end def self.claim(id, env=nil, headers={}) @@ -60,7 +60,7 @@ def self.claim(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("gifts",id.to_s,"claim"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "claim") + Request.send('post', uri_path("gifts",id.to_s,"claim"), {}, env, headers,nil, false, jsonKeys, options, "gift", "claim") end def self.cancel(id, env=nil, headers={}) @@ -69,7 +69,7 @@ def self.cancel(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("gifts",id.to_s,"cancel"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "cancel") + Request.send('post', uri_path("gifts",id.to_s,"cancel"), {}, env, headers,nil, false, jsonKeys, options, "gift", "cancel") end def self.update_gift(id, params={}, env=nil, headers={}) @@ -78,7 +78,7 @@ def self.update_gift(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("gifts",id.to_s,"update_gift"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "gift", telemetry_operation: "updateGift") + Request.send('post', uri_path("gifts",id.to_s,"update_gift"), params, env, headers,nil, false, jsonKeys, options, "gift", "updateGift") end end # ~Gift diff --git a/lib/chargebee/models/grant_block.rb b/lib/chargebee/models/grant_block.rb index 2aa3465..1abfd9c 100644 --- a/lib/chargebee/models/grant_block.rb +++ b/lib/chargebee/models/grant_block.rb @@ -2,8 +2,8 @@ module ChargeBee class GrantBlock < Model attr_accessor :id, :granted_amount, :effective_from, :expires_at, :balance, :hold_amount, :used_amount, - :expired_amount, :rolled_over_amount, :voided_amount, :origin_grant_block_id, :status, :metadata, - :grant_source, :created_at, :account_type, :unit_id, :unit_type + :expired_amount, :rolled_over_amount, :voided_amount, :origin_grant_block_id, :status, :grant_source, + :created_at, :account_type, :unit_id, :unit_type, :metadata # OPERATIONS #----------- @@ -12,7 +12,7 @@ def self.list_grant_blocks(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("grant_blocks"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "grantBlock", telemetry_operation: "listGrantBlocks") + Request.send('get', uri_path("grant_blocks"), params, env, headers,nil, false, jsonKeys, options, "grantBlock", "listGrantBlocks") end end # ~GrantBlock diff --git a/lib/chargebee/models/hosted_page.rb b/lib/chargebee/models/hosted_page.rb index b458374..b881819 100644 --- a/lib/chargebee/models/hosted_page.rb +++ b/lib/chargebee/models/hosted_page.rb @@ -24,7 +24,7 @@ def self.checkout_new(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_new"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutNew") + Request.send('post', uri_path("hosted_pages","checkout_new"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutNew") end def self.checkout_one_time(params={}, env=nil, headers={}) @@ -33,7 +33,7 @@ def self.checkout_one_time(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_one_time"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutOneTime") + Request.send('post', uri_path("hosted_pages","checkout_one_time"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutOneTime") end def self.checkout_one_time_for_items(params, env=nil, headers={}) @@ -42,7 +42,7 @@ def self.checkout_one_time_for_items(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_one_time_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutOneTimeForItems") + Request.send('post', uri_path("hosted_pages","checkout_one_time_for_items"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutOneTimeForItems") end def self.checkout_new_for_items(params, env=nil, headers={}) @@ -51,7 +51,7 @@ def self.checkout_new_for_items(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_new_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutNewForItems") + Request.send('post', uri_path("hosted_pages","checkout_new_for_items"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutNewForItems") end def self.checkout_existing(params, env=nil, headers={}) @@ -60,7 +60,7 @@ def self.checkout_existing(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_existing"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutExisting") + Request.send('post', uri_path("hosted_pages","checkout_existing"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutExisting") end def self.checkout_existing_for_items(params, env=nil, headers={}) @@ -69,7 +69,7 @@ def self.checkout_existing_for_items(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_existing_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutExistingForItems") + Request.send('post', uri_path("hosted_pages","checkout_existing_for_items"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutExistingForItems") end # @deprecated This method is deprecated and will be removed in a future version. @@ -79,7 +79,7 @@ def self.update_card(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","update_card"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "updateCard") + Request.send('post', uri_path("hosted_pages","update_card"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "updateCard") end # @deprecated This method is deprecated and will be removed in a future version. @@ -89,7 +89,7 @@ def self.update_payment_method(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","update_payment_method"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "updatePaymentMethod") + Request.send('post', uri_path("hosted_pages","update_payment_method"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "updatePaymentMethod") end def self.manage_payment_sources(params, env=nil, headers={}) @@ -98,7 +98,7 @@ def self.manage_payment_sources(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","manage_payment_sources"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "managePaymentSources") + Request.send('post', uri_path("hosted_pages","manage_payment_sources"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "managePaymentSources") end def self.collect_now(params, env=nil, headers={}) @@ -107,7 +107,7 @@ def self.collect_now(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","collect_now"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "collectNow") + Request.send('post', uri_path("hosted_pages","collect_now"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "collectNow") end def self.accept_quote(params, env=nil, headers={}) @@ -116,7 +116,7 @@ def self.accept_quote(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","accept_quote"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "acceptQuote") + Request.send('post', uri_path("hosted_pages","accept_quote"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "acceptQuote") end def self.extend_subscription(params, env=nil, headers={}) @@ -125,7 +125,7 @@ def self.extend_subscription(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","extend_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "extendSubscription") + Request.send('post', uri_path("hosted_pages","extend_subscription"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "extendSubscription") end def self.checkout_gift(params, env=nil, headers={}) @@ -134,7 +134,7 @@ def self.checkout_gift(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_gift"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutGift") + Request.send('post', uri_path("hosted_pages","checkout_gift"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutGift") end def self.checkout_gift_for_items(params={}, env=nil, headers={}) @@ -143,7 +143,7 @@ def self.checkout_gift_for_items(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","checkout_gift_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "checkoutGiftForItems") + Request.send('post', uri_path("hosted_pages","checkout_gift_for_items"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "checkoutGiftForItems") end def self.claim_gift(params, env=nil, headers={}) @@ -152,7 +152,7 @@ def self.claim_gift(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","claim_gift"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "claimGift") + Request.send('post', uri_path("hosted_pages","claim_gift"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "claimGift") end def self.retrieve_agreement_pdf(params, env=nil, headers={}) @@ -161,7 +161,7 @@ def self.retrieve_agreement_pdf(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","retrieve_agreement_pdf"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "retrieveAgreementPdf") + Request.send('post', uri_path("hosted_pages","retrieve_agreement_pdf"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "retrieveAgreementPdf") end def self.acknowledge(id, env=nil, headers={}) @@ -170,21 +170,21 @@ def self.acknowledge(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages",id.to_s,"acknowledge"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "acknowledge") + Request.send('post', uri_path("hosted_pages",id.to_s,"acknowledge"), {}, env, headers,nil, false, jsonKeys, options, "hostedPage", "acknowledge") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("hosted_pages",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "retrieve") + Request.send('get', uri_path("hosted_pages",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "hostedPage", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("hosted_pages"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "list") + Request.send_list_request('get', uri_path("hosted_pages"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "list") end def self.pre_cancel(params, env=nil, headers={}) @@ -193,7 +193,7 @@ def self.pre_cancel(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","pre_cancel"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "preCancel") + Request.send('post', uri_path("hosted_pages","pre_cancel"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "preCancel") end def self.events(params, env=nil, headers={}) @@ -203,7 +203,7 @@ def self.events(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","events"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "events") + Request.send('post', uri_path("hosted_pages","events"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "events") end def self.view_voucher(params, env=nil, headers={}) @@ -212,7 +212,7 @@ def self.view_voucher(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("hosted_pages","view_voucher"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "hostedPage", telemetry_operation: "viewVoucher") + Request.send('post', uri_path("hosted_pages","view_voucher"), params, env, headers,nil, false, jsonKeys, options, "hostedPage", "viewVoucher") end end # ~HostedPage diff --git a/lib/chargebee/models/in_app_subscription.rb b/lib/chargebee/models/in_app_subscription.rb index 337a0c7..93f9369 100644 --- a/lib/chargebee/models/in_app_subscription.rb +++ b/lib/chargebee/models/in_app_subscription.rb @@ -12,7 +12,7 @@ def self.process_receipt(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("in_app_subscriptions",id.to_s,"process_purchase_command"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "inAppSubscription", telemetry_operation: "processReceipt") + Request.send('post', uri_path("in_app_subscriptions",id.to_s,"process_purchase_command"), params, env, headers,nil, false, jsonKeys, options, "inAppSubscription", "processReceipt") end def self.import_receipt(id, params, env=nil, headers={}) @@ -21,7 +21,7 @@ def self.import_receipt(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_receipt"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "inAppSubscription", telemetry_operation: "importReceipt") + Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_receipt"), params, env, headers,nil, false, jsonKeys, options, "inAppSubscription", "importReceipt") end def self.import_subscription(id, params, env=nil, headers={}) @@ -30,7 +30,7 @@ def self.import_subscription(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "inAppSubscription", telemetry_operation: "importSubscription") + Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_subscription"), params, env, headers,nil, false, jsonKeys, options, "inAppSubscription", "importSubscription") end def self.retrieve_store_subs(id, params, env=nil, headers={}) @@ -39,7 +39,7 @@ def self.retrieve_store_subs(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("in_app_subscriptions",id.to_s,"retrieve"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "inAppSubscription", telemetry_operation: "retrieveStoreSubs") + Request.send('post', uri_path("in_app_subscriptions",id.to_s,"retrieve"), params, env, headers,nil, false, jsonKeys, options, "inAppSubscription", "retrieveStoreSubs") end end # ~InAppSubscription diff --git a/lib/chargebee/models/invoice.rb b/lib/chargebee/models/invoice.rb index 9a257a0..a6ba16a 100644 --- a/lib/chargebee/models/invoice.rb +++ b/lib/chargebee/models/invoice.rb @@ -1,8 +1,12 @@ module ChargeBee class Invoice < Model + class ExchangeRate < Model + attr_accessor :currency_code, :rate + end + class LineItem < Model - attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id + attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode end class LineItemTier < Model @@ -94,9 +98,9 @@ class SiteDetailsAtCreation < Model :currency_code, :local_currency_code, :tax, :sub_total, :sub_total_in_local_currency, :total, :total_in_local_currency, :amount_due, :amount_adjusted, :amount_paid, :paid_at, :write_off_amount, :credits_applied, :dunning_status, :next_retry_at, :voided_at, :resource_version, :updated_at, - :line_items_next_offset, :first_invoice, :new_sales_amount, :has_advance_charges, :term_finalized, - :is_gifted, :generated_at, :expected_payment_date, :amount_to_collect, :round_off_amount, :line_items, - :line_item_tiers, :line_item_discounts, :line_item_taxes, :line_item_credits, :line_item_addresses, + :line_items_next_offset, :exchange_rates, :first_invoice, :new_sales_amount, :has_advance_charges, + :term_finalized, :is_gifted, :generated_at, :expected_payment_date, :amount_to_collect, :round_off_amount, + :line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes, :line_item_credits, :line_item_addresses, :discounts, :taxes, :tax_origin, :linked_payments, :reference_transactions, :dunning_attempts, :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address, :statement_descriptor, :einvoice, :void_reason_code, :deleted, :tax_category, @@ -113,7 +117,7 @@ def self.create(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "create") + Request.send('post', uri_path("invoices"), params, env, headers,nil, false, jsonKeys, options, "invoice", "create") end def self.create_for_charge_items_and_charges(params, env=nil, headers={}) @@ -124,7 +128,7 @@ def self.create_for_charge_items_and_charges(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices","create_for_charge_items_and_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "createForChargeItemsAndCharges") + Request.send('post', uri_path("invoices","create_for_charge_items_and_charges"), params, env, headers,nil, false, jsonKeys, options, "invoice", "createForChargeItemsAndCharges") end def self.charge(params, env=nil, headers={}) @@ -133,7 +137,7 @@ def self.charge(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices","charge"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "charge") + Request.send('post', uri_path("invoices","charge"), params, env, headers,nil, false, jsonKeys, options, "invoice", "charge") end def self.charge_addon(params, env=nil, headers={}) @@ -142,7 +146,7 @@ def self.charge_addon(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices","charge_addon"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "chargeAddon") + Request.send('post', uri_path("invoices","charge_addon"), params, env, headers,nil, false, jsonKeys, options, "invoice", "chargeAddon") end # @deprecated This method is deprecated and will be removed in a future version. @@ -152,7 +156,7 @@ def self.create_for_charge_item(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices","create_for_charge_item"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "createForChargeItem") + Request.send('post', uri_path("invoices","create_for_charge_item"), params, env, headers,nil, false, jsonKeys, options, "invoice", "createForChargeItem") end def self.stop_dunning(id, params={}, env=nil, headers={}) @@ -161,7 +165,7 @@ def self.stop_dunning(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"stop_dunning"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "stopDunning") + Request.send('post', uri_path("invoices",id.to_s,"stop_dunning"), params, env, headers,nil, false, jsonKeys, options, "invoice", "stopDunning") end def self.pause_dunning(id, params, env=nil, headers={}) @@ -170,7 +174,7 @@ def self.pause_dunning(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"pause_dunning"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "pauseDunning") + Request.send('post', uri_path("invoices",id.to_s,"pause_dunning"), params, env, headers,nil, false, jsonKeys, options, "invoice", "pauseDunning") end def self.resume_dunning(id, params={}, env=nil, headers={}) @@ -179,7 +183,7 @@ def self.resume_dunning(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"resume_dunning"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "resumeDunning") + Request.send('post', uri_path("invoices",id.to_s,"resume_dunning"), params, env, headers,nil, false, jsonKeys, options, "invoice", "resumeDunning") end def self.import_invoice(params, env=nil, headers={}) @@ -188,7 +192,7 @@ def self.import_invoice(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices","import_invoice"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "importInvoice") + Request.send('post', uri_path("invoices","import_invoice"), params, env, headers,nil, false, jsonKeys, options, "invoice", "importInvoice") end def self.apply_payments(id, params={}, env=nil, headers={}) @@ -197,7 +201,7 @@ def self.apply_payments(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"apply_payments"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "applyPayments") + Request.send('post', uri_path("invoices",id.to_s,"apply_payments"), params, env, headers,nil, false, jsonKeys, options, "invoice", "applyPayments") end def self.sync_usages(id, env=nil, headers={}) @@ -206,7 +210,7 @@ def self.sync_usages(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"sync_usages"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "syncUsages") + Request.send('post', uri_path("invoices",id.to_s,"sync_usages"), {}, env, headers,nil, false, jsonKeys, options, "invoice", "syncUsages") end def self.delete_line_items(id, params={}, env=nil, headers={}) @@ -215,7 +219,7 @@ def self.delete_line_items(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"delete_line_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "deleteLineItems") + Request.send('post', uri_path("invoices",id.to_s,"delete_line_items"), params, env, headers,nil, false, jsonKeys, options, "invoice", "deleteLineItems") end def self.apply_credits(id, params={}, env=nil, headers={}) @@ -224,14 +228,14 @@ def self.apply_credits(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "applyCredits") + Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers,nil, false, jsonKeys, options, "invoice", "applyCredits") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("invoices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "list") + Request.send_list_request('get', uri_path("invoices"), params, env, headers,nil, false, jsonKeys, options, "invoice", "list") end # @deprecated This method is deprecated and will be removed in a future version. @@ -239,7 +243,7 @@ def self.invoices_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"invoices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "invoicesForCustomer") + Request.send('get', uri_path("customers",id.to_s,"invoices"), params, env, headers,nil, false, jsonKeys, options, "invoice", "invoicesForCustomer") end # @deprecated This method is deprecated and will be removed in a future version. @@ -247,14 +251,14 @@ def self.invoices_for_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"invoices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "invoicesForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"invoices"), params, env, headers,nil, false, jsonKeys, options, "invoice", "invoicesForSubscription") end def self.retrieve(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "retrieve") + Request.send('get', uri_path("invoices",id.to_s), params, env, headers,nil, false, jsonKeys, options, "invoice", "retrieve") end def self.pdf(id, params={}, env=nil, headers={}) @@ -263,21 +267,21 @@ def self.pdf(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "pdf") + Request.send('post', uri_path("invoices",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, "invoice", "pdf") end def self.download_einvoice(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "downloadEinvoice") + Request.send('get', uri_path("invoices",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "invoice", "downloadEinvoice") end def self.list_payment_reference_numbers(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices","payment_reference_numbers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "listPaymentReferenceNumbers") + Request.send('get', uri_path("invoices","payment_reference_numbers"), params, env, headers,nil, false, jsonKeys, options, "invoice", "listPaymentReferenceNumbers") end def self.add_charge(id, params, env=nil, headers={}) @@ -286,7 +290,7 @@ def self.add_charge(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "addCharge") + Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env, headers,nil, false, jsonKeys, options, "invoice", "addCharge") end def self.add_addon_charge(id, params, env=nil, headers={}) @@ -295,7 +299,7 @@ def self.add_addon_charge(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"add_addon_charge"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "addAddonCharge") + Request.send('post', uri_path("invoices",id.to_s,"add_addon_charge"), params, env, headers,nil, false, jsonKeys, options, "invoice", "addAddonCharge") end def self.add_charge_item(id, params, env=nil, headers={}) @@ -304,7 +308,7 @@ def self.add_charge_item(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"add_charge_item"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "addChargeItem") + Request.send('post', uri_path("invoices",id.to_s,"add_charge_item"), params, env, headers,nil, false, jsonKeys, options, "invoice", "addChargeItem") end def self.close(id, params={}, env=nil, headers={}) @@ -313,7 +317,7 @@ def self.close(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"close"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "close") + Request.send('post', uri_path("invoices",id.to_s,"close"), params, env, headers,nil, false, jsonKeys, options, "invoice", "close") end def self.collect_payment(id, params={}, env=nil, headers={}) @@ -322,7 +326,7 @@ def self.collect_payment(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"collect_payment"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "collectPayment") + Request.send('post', uri_path("invoices",id.to_s,"collect_payment"), params, env, headers,nil, false, jsonKeys, options, "invoice", "collectPayment") end def self.record_payment(id, params, env=nil, headers={}) @@ -331,7 +335,7 @@ def self.record_payment(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"record_payment"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "recordPayment") + Request.send('post', uri_path("invoices",id.to_s,"record_payment"), params, env, headers,nil, false, jsonKeys, options, "invoice", "recordPayment") end def self.record_tax_withheld(id, params, env=nil, headers={}) @@ -340,7 +344,7 @@ def self.record_tax_withheld(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"record_tax_withheld"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "recordTaxWithheld") + Request.send('post', uri_path("invoices",id.to_s,"record_tax_withheld"), params, env, headers,nil, false, jsonKeys, options, "invoice", "recordTaxWithheld") end def self.remove_tax_withheld(id, params, env=nil, headers={}) @@ -349,7 +353,7 @@ def self.remove_tax_withheld(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"remove_tax_withheld"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "removeTaxWithheld") + Request.send('post', uri_path("invoices",id.to_s,"remove_tax_withheld"), params, env, headers,nil, false, jsonKeys, options, "invoice", "removeTaxWithheld") end def self.refund(id, params={}, env=nil, headers={}) @@ -358,7 +362,7 @@ def self.refund(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "refund") + Request.send('post', uri_path("invoices",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, "invoice", "refund") end def self.record_refund(id, params, env=nil, headers={}) @@ -367,7 +371,7 @@ def self.record_refund(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "recordRefund") + Request.send('post', uri_path("invoices",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, "invoice", "recordRefund") end def self.remove_payment(id, params, env=nil, headers={}) @@ -376,7 +380,7 @@ def self.remove_payment(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"remove_payment"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "removePayment") + Request.send('post', uri_path("invoices",id.to_s,"remove_payment"), params, env, headers,nil, false, jsonKeys, options, "invoice", "removePayment") end def self.remove_credit_note(id, params, env=nil, headers={}) @@ -385,7 +389,7 @@ def self.remove_credit_note(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"remove_credit_note"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "removeCreditNote") + Request.send('post', uri_path("invoices",id.to_s,"remove_credit_note"), params, env, headers,nil, false, jsonKeys, options, "invoice", "removeCreditNote") end def self.void_invoice(id, params={}, env=nil, headers={}) @@ -394,7 +398,7 @@ def self.void_invoice(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "voidInvoice") + Request.send('post', uri_path("invoices",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, options, "invoice", "voidInvoice") end def self.write_off(id, params={}, env=nil, headers={}) @@ -403,7 +407,7 @@ def self.write_off(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"write_off"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "writeOff") + Request.send('post', uri_path("invoices",id.to_s,"write_off"), params, env, headers,nil, false, jsonKeys, options, "invoice", "writeOff") end def self.delete(id, params={}, env=nil, headers={}) @@ -412,7 +416,7 @@ def self.delete(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "delete") + Request.send('post', uri_path("invoices",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "invoice", "delete") end def self.update_details(id, params={}, env=nil, headers={}) @@ -421,7 +425,7 @@ def self.update_details(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "updateDetails") + Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers,nil, false, jsonKeys, options, "invoice", "updateDetails") end def self.apply_payment_schedule_scheme(id, params, env=nil, headers={}) @@ -430,14 +434,14 @@ def self.apply_payment_schedule_scheme(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"apply_payment_schedule_scheme"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "applyPaymentScheduleScheme") + Request.send('post', uri_path("invoices",id.to_s,"apply_payment_schedule_scheme"), params, env, headers,nil, false, jsonKeys, options, "invoice", "applyPaymentScheduleScheme") end def self.payment_schedules(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices",id.to_s,"payment_schedules"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "paymentSchedules") + Request.send('get', uri_path("invoices",id.to_s,"payment_schedules"), {}, env, headers,nil, false, jsonKeys, options, "invoice", "paymentSchedules") end def self.resend_einvoice(id, env=nil, headers={}) @@ -446,7 +450,7 @@ def self.resend_einvoice(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "resendEinvoice") + Request.send('post', uri_path("invoices",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "invoice", "resendEinvoice") end def self.send_einvoice(id, env=nil, headers={}) @@ -455,7 +459,7 @@ def self.send_einvoice(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("invoices",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "invoice", telemetry_operation: "sendEinvoice") + Request.send('post', uri_path("invoices",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, options, "invoice", "sendEinvoice") end end # ~Invoice diff --git a/lib/chargebee/models/invoice_estimate.rb b/lib/chargebee/models/invoice_estimate.rb index 8655253..445bb3e 100644 --- a/lib/chargebee/models/invoice_estimate.rb +++ b/lib/chargebee/models/invoice_estimate.rb @@ -2,7 +2,7 @@ module ChargeBee class InvoiceEstimate < Model class LineItem < Model - attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id + attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode end class LineItemTier < Model diff --git a/lib/chargebee/models/item.rb b/lib/chargebee/models/item.rb index a7b41b0..6090333 100644 --- a/lib/chargebee/models/item.rb +++ b/lib/chargebee/models/item.rb @@ -29,14 +29,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "item", telemetry_operation: "create") + Request.send('post', uri_path("items"), params, env, headers,nil, false, jsonKeys, options, "item", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("items",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "item", telemetry_operation: "retrieve") + Request.send('get', uri_path("items",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "item", "retrieve") end def self.update(id, params={}, env=nil, headers={}) @@ -46,14 +46,14 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("items",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "item", telemetry_operation: "update") + Request.send('post', uri_path("items",id.to_s), params, env, headers,nil, false, jsonKeys, options, "item", "update") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "item", telemetry_operation: "list") + Request.send_list_request('get', uri_path("items"), params, env, headers,nil, false, jsonKeys, options, "item", "list") end def self.delete(id, env=nil, headers={}) @@ -62,7 +62,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("items",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "item", telemetry_operation: "delete") + Request.send('post', uri_path("items",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "item", "delete") end end # ~Item diff --git a/lib/chargebee/models/item_entitlement.rb b/lib/chargebee/models/item_entitlement.rb index 52119fe..94660c9 100644 --- a/lib/chargebee/models/item_entitlement.rb +++ b/lib/chargebee/models/item_entitlement.rb @@ -10,14 +10,14 @@ def self.item_entitlements_for_item(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("items",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemEntitlement", telemetry_operation: "itemEntitlementsForItem") + Request.send('get', uri_path("items",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, "itemEntitlement", "itemEntitlementsForItem") end def self.item_entitlements_for_feature(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("features",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemEntitlement", telemetry_operation: "itemEntitlementsForFeature") + Request.send('get', uri_path("features",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, "itemEntitlement", "itemEntitlementsForFeature") end def self.add_item_entitlements(id, params, env=nil, headers={}) @@ -26,7 +26,7 @@ def self.add_item_entitlements(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("features",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemEntitlement", telemetry_operation: "addItemEntitlements") + Request.send('post', uri_path("features",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, "itemEntitlement", "addItemEntitlements") end def self.upsert_or_remove_item_entitlements_for_item(id, params, env=nil, headers={}) @@ -35,7 +35,7 @@ def self.upsert_or_remove_item_entitlements_for_item(id, params, env=nil, header options = { :isIdempotent => true } - Request.send('post', uri_path("items",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemEntitlement", telemetry_operation: "upsertOrRemoveItemEntitlementsForItem") + Request.send('post', uri_path("items",id.to_s,"item_entitlements"), params, env, headers,nil, false, jsonKeys, options, "itemEntitlement", "upsertOrRemoveItemEntitlementsForItem") end end # ~ItemEntitlement diff --git a/lib/chargebee/models/item_family.rb b/lib/chargebee/models/item_family.rb index dae3389..e114e90 100644 --- a/lib/chargebee/models/item_family.rb +++ b/lib/chargebee/models/item_family.rb @@ -13,21 +13,21 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_families"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemFamily", telemetry_operation: "create") + Request.send('post', uri_path("item_families"), params, env, headers,nil, false, jsonKeys, options, "itemFamily", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("item_families",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemFamily", telemetry_operation: "retrieve") + Request.send('get', uri_path("item_families",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "itemFamily", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("item_families"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemFamily", telemetry_operation: "list") + Request.send_list_request('get', uri_path("item_families"), params, env, headers,nil, false, jsonKeys, options, "itemFamily", "list") end def self.update(id, params={}, env=nil, headers={}) @@ -36,7 +36,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_families",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemFamily", telemetry_operation: "update") + Request.send('post', uri_path("item_families",id.to_s), params, env, headers,nil, false, jsonKeys, options, "itemFamily", "update") end def self.delete(id, env=nil, headers={}) @@ -45,7 +45,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_families",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemFamily", telemetry_operation: "delete") + Request.send('post', uri_path("item_families",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "itemFamily", "delete") end end # ~ItemFamily diff --git a/lib/chargebee/models/item_price.rb b/lib/chargebee/models/item_price.rb index 1c44b6c..34a543b 100644 --- a/lib/chargebee/models/item_price.rb +++ b/lib/chargebee/models/item_price.rb @@ -35,14 +35,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "create") + Request.send('post', uri_path("item_prices"), params, env, headers,nil, false, jsonKeys, options, "itemPrice", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("item_prices",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "retrieve") + Request.send('get', uri_path("item_prices",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "itemPrice", "retrieve") end def self.update(id, params, env=nil, headers={}) @@ -52,14 +52,14 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_prices",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "update") + Request.send('post', uri_path("item_prices",id.to_s), params, env, headers,nil, false, jsonKeys, options, "itemPrice", "update") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("item_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "list") + Request.send_list_request('get', uri_path("item_prices"), params, env, headers,nil, false, jsonKeys, options, "itemPrice", "list") end def self.delete(id, env=nil, headers={}) @@ -68,21 +68,21 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("item_prices",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "delete") + Request.send('post', uri_path("item_prices",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "itemPrice", "delete") end def self.find_applicable_items(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("item_prices",id.to_s,"applicable_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "findApplicableItems") + Request.send('get', uri_path("item_prices",id.to_s,"applicable_items"), params, env, headers,nil, false, jsonKeys, options, "itemPrice", "findApplicableItems") end def self.find_applicable_item_prices(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("item_prices",id.to_s,"applicable_item_prices"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "itemPrice", telemetry_operation: "findApplicableItemPrices") + Request.send('get', uri_path("item_prices",id.to_s,"applicable_item_prices"), params, env, headers,nil, false, jsonKeys, options, "itemPrice", "findApplicableItemPrices") end end # ~ItemPrice diff --git a/lib/chargebee/models/ledger_account_balance.rb b/lib/chargebee/models/ledger_account_balance.rb index 1b2df0c..565d38f 100644 --- a/lib/chargebee/models/ledger_account_balance.rb +++ b/lib/chargebee/models/ledger_account_balance.rb @@ -18,7 +18,7 @@ def self.list_ledger_account_balances(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("ledger_account_balances"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ledgerAccountBalance", telemetry_operation: "listLedgerAccountBalances") + Request.send('get', uri_path("ledger_account_balances"), params, env, headers,nil, false, jsonKeys, options, "ledgerAccountBalance", "listLedgerAccountBalances") end end # ~LedgerAccountBalance diff --git a/lib/chargebee/models/ledger_operation.rb b/lib/chargebee/models/ledger_operation.rb index 017d810..54c54a1 100644 --- a/lib/chargebee/models/ledger_operation.rb +++ b/lib/chargebee/models/ledger_operation.rb @@ -1,10 +1,9 @@ module ChargeBee class LedgerOperation < Model - attr_accessor :id, :type, :amount, :start_balance, :end_balance, :provisioned_start_balance, - :provisioned_end_balance, :overdraft_start_balance, :overdraft_end_balance, :parent_ledger_operation_id, - :ledger_operation_timestamp, :auto_release_timestamp, :metadata, :created_at, :modified_at, - :subscription_id, :unit_id, :unit_type + attr_accessor :id, :type, :amount, :provisioned_start_balance, :provisioned_end_balance, :overdraft_start_balance, + :overdraft_end_balance, :parent_ledger_operation_id, :ledger_operation_timestamp, :auto_release_timestamp, + :created_at, :modified_at, :subscription_id, :unit_id, :unit_type, :metadata # OPERATIONS #----------- @@ -13,14 +12,14 @@ def self.retrieve_ledger_operation(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("ledger_operations",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ledgerOperation", telemetry_operation: "retrieveLedgerOperation") + Request.send('get', uri_path("ledger_operations",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "ledgerOperation", "retrieveLedgerOperation") end def self.list_ledger_operations(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("ledger_operations"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ledgerOperation", telemetry_operation: "listLedgerOperations") + Request.send('get', uri_path("ledger_operations"), params, env, headers,nil, false, jsonKeys, options, "ledgerOperation", "listLedgerOperations") end def self.capture(params, env=nil, headers={}) @@ -28,7 +27,7 @@ def self.capture(params, env=nil, headers={}) :metadata => 0, } options = {} - Request.send('post', uri_path("ledger_operations","capture"), params, env, headers,nil, true, jsonKeys, options, telemetry_resource: "ledgerOperation", telemetry_operation: "capture") + Request.send('post', uri_path("ledger_operations","capture"), params, env, headers,nil, true, jsonKeys, options, "ledgerOperation", "capture") end def self.authorize(params, env=nil, headers={}) @@ -36,7 +35,7 @@ def self.authorize(params, env=nil, headers={}) :metadata => 0, } options = {} - Request.send('post', uri_path("ledger_operations","authorize"), params, env, headers,nil, true, jsonKeys, options, telemetry_resource: "ledgerOperation", telemetry_operation: "authorize") + Request.send('post', uri_path("ledger_operations","authorize"), params, env, headers,nil, true, jsonKeys, options, "ledgerOperation", "authorize") end def self.capture_authorization(params, env=nil, headers={}) @@ -44,7 +43,7 @@ def self.capture_authorization(params, env=nil, headers={}) :metadata => 0, } options = {} - Request.send('post', uri_path("ledger_operations","capture_authorization"), params, env, headers,nil, true, jsonKeys, options, telemetry_resource: "ledgerOperation", telemetry_operation: "captureAuthorization") + Request.send('post', uri_path("ledger_operations","capture_authorization"), params, env, headers,nil, true, jsonKeys, options, "ledgerOperation", "captureAuthorization") end def self.release_authorization(params, env=nil, headers={}) @@ -52,7 +51,7 @@ def self.release_authorization(params, env=nil, headers={}) :metadata => 0, } options = {} - Request.send('post', uri_path("ledger_operations","release_authorization"), params, env, headers,nil, true, jsonKeys, options, telemetry_resource: "ledgerOperation", telemetry_operation: "releaseAuthorization") + Request.send('post', uri_path("ledger_operations","release_authorization"), params, env, headers,nil, true, jsonKeys, options, "ledgerOperation", "releaseAuthorization") end end # ~LedgerOperation diff --git a/lib/chargebee/models/meter.rb b/lib/chargebee/models/meter.rb new file mode 100644 index 0000000..e0c4507 --- /dev/null +++ b/lib/chargebee/models/meter.rb @@ -0,0 +1,18 @@ +module ChargeBee + class Meter < Model + + attr_accessor :id, :name, :description, :type, :status, :query, :created_at, :updated_at, :column_definitions, + :features + + # OPERATIONS + #----------- + + def self.list(params={}, env=nil, headers={}) + jsonKeys = { + } + options = {} + Request.send_list_request('get', uri_path("meters"), params, env, headers,nil, false, jsonKeys, options, "meter", "list") + end + + end # ~Meter +end # ~ChargeBee \ No newline at end of file diff --git a/lib/chargebee/models/metered_feature.rb b/lib/chargebee/models/metered_feature.rb new file mode 100644 index 0000000..4bc8c96 --- /dev/null +++ b/lib/chargebee/models/metered_feature.rb @@ -0,0 +1,46 @@ +module ChargeBee + class MeteredFeature < Model + + attr_accessor :id, :name, :description, :type, :status, :query, :column_definitions, :features + + # OPERATIONS + #----------- + + def self.create(params, env=nil, headers={}) + jsonKeys = { + } + options = { + :isIdempotent => true + } + Request.send('post', uri_path("metered_features"), params, env, headers,nil, false, jsonKeys, options, "meteredFeature", "create") + end + + def self.archive(id, env=nil, headers={}) + jsonKeys = { + } + options = { + :isIdempotent => true + } + Request.send('post', uri_path("metered_features",id.to_s,"archive_command"), {}, env, headers,nil, false, jsonKeys, options, "meteredFeature", "archive") + end + + def self.reactivate(id, env=nil, headers={}) + jsonKeys = { + } + options = { + :isIdempotent => true + } + Request.send('post', uri_path("metered_features",id.to_s,"reactivate_command"), {}, env, headers,nil, false, jsonKeys, options, "meteredFeature", "reactivate") + end + + def self.delete(id, env=nil, headers={}) + jsonKeys = { + } + options = { + :isIdempotent => true + } + Request.send('post', uri_path("metered_features",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "meteredFeature", "delete") + end + + end # ~MeteredFeature +end # ~ChargeBee \ No newline at end of file diff --git a/lib/chargebee/models/non_subscription.rb b/lib/chargebee/models/non_subscription.rb index 6acffe0..fa499f7 100644 --- a/lib/chargebee/models/non_subscription.rb +++ b/lib/chargebee/models/non_subscription.rb @@ -12,7 +12,7 @@ def self.process_receipt(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("non_subscriptions",id.to_s,"one_time_purchase"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "nonSubscription", telemetry_operation: "processReceipt") + Request.send('post', uri_path("non_subscriptions",id.to_s,"one_time_purchase"), params, env, headers,nil, false, jsonKeys, options, "nonSubscription", "processReceipt") end end # ~NonSubscription diff --git a/lib/chargebee/models/offer_event.rb b/lib/chargebee/models/offer_event.rb index 35819ad..dae3168 100644 --- a/lib/chargebee/models/offer_event.rb +++ b/lib/chargebee/models/offer_event.rb @@ -9,7 +9,7 @@ def self.offer_events(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("offer_events"), params, env, headers, "grow", true, jsonKeys, options, telemetry_resource: "offerEvent", telemetry_operation: "offerEvents") + Request.send('post', uri_path("offer_events"), params, env, headers, "grow", true, jsonKeys, options, "offerEvent", "offerEvents") end end # ~OfferEvent diff --git a/lib/chargebee/models/offer_fulfillment.rb b/lib/chargebee/models/offer_fulfillment.rb index b1becda..3b0e320 100644 --- a/lib/chargebee/models/offer_fulfillment.rb +++ b/lib/chargebee/models/offer_fulfillment.rb @@ -15,21 +15,21 @@ def self.offer_fulfillments(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("offer_fulfillments"), params, env, headers, "grow", true, jsonKeys, options, telemetry_resource: "offerFulfillment", telemetry_operation: "offerFulfillments") + Request.send('post', uri_path("offer_fulfillments"), params, env, headers, "grow", true, jsonKeys, options, "offerFulfillment", "offerFulfillments") end def self.offer_fulfillments_get(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("offer_fulfillments",id.to_s), {}, env, headers, "grow", false, jsonKeys, options, telemetry_resource: "offerFulfillment", telemetry_operation: "offerFulfillmentsGet") + Request.send('get', uri_path("offer_fulfillments",id.to_s), {}, env, headers, "grow", false, jsonKeys, options, "offerFulfillment", "offerFulfillmentsGet") end def self.offer_fulfillments_update(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("offer_fulfillments",id.to_s), params, env, headers, "grow", true, jsonKeys, options, telemetry_resource: "offerFulfillment", telemetry_operation: "offerFulfillmentsUpdate") + Request.send('post', uri_path("offer_fulfillments",id.to_s), params, env, headers, "grow", true, jsonKeys, options, "offerFulfillment", "offerFulfillmentsUpdate") end end # ~OfferFulfillment diff --git a/lib/chargebee/models/omnichannel_one_time_order.rb b/lib/chargebee/models/omnichannel_one_time_order.rb index 522345e..1d225be 100644 --- a/lib/chargebee/models/omnichannel_one_time_order.rb +++ b/lib/chargebee/models/omnichannel_one_time_order.rb @@ -11,14 +11,14 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("omnichannel_one_time_orders",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelOneTimeOrder", telemetry_operation: "retrieve") + Request.send('get', uri_path("omnichannel_one_time_orders",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "omnichannelOneTimeOrder", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("omnichannel_one_time_orders"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelOneTimeOrder", telemetry_operation: "list") + Request.send_list_request('get', uri_path("omnichannel_one_time_orders"), params, env, headers,nil, false, jsonKeys, options, "omnichannelOneTimeOrder", "list") end end # ~OmnichannelOneTimeOrder diff --git a/lib/chargebee/models/omnichannel_subscription.rb b/lib/chargebee/models/omnichannel_subscription.rb index 2c74778..d46c944 100644 --- a/lib/chargebee/models/omnichannel_subscription.rb +++ b/lib/chargebee/models/omnichannel_subscription.rb @@ -11,21 +11,21 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("omnichannel_subscriptions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelSubscription", telemetry_operation: "retrieve") + Request.send('get', uri_path("omnichannel_subscriptions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "omnichannelSubscription", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("omnichannel_subscriptions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelSubscription", telemetry_operation: "list") + Request.send_list_request('get', uri_path("omnichannel_subscriptions"), params, env, headers,nil, false, jsonKeys, options, "omnichannelSubscription", "list") end def self.omnichannel_transactions_for_omnichannel_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("omnichannel_subscriptions",id.to_s,"omnichannel_transactions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelSubscription", telemetry_operation: "omnichannelTransactionsForOmnichannelSubscription") + Request.send('get', uri_path("omnichannel_subscriptions",id.to_s,"omnichannel_transactions"), params, env, headers,nil, false, jsonKeys, options, "omnichannelSubscription", "omnichannelTransactionsForOmnichannelSubscription") end def self.move(id, params, env=nil, headers={}) @@ -34,7 +34,7 @@ def self.move(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("omnichannel_subscriptions",id.to_s,"move"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelSubscription", telemetry_operation: "move") + Request.send('post', uri_path("omnichannel_subscriptions",id.to_s,"move"), params, env, headers,nil, false, jsonKeys, options, "omnichannelSubscription", "move") end end # ~OmnichannelSubscription diff --git a/lib/chargebee/models/omnichannel_subscription_item.rb b/lib/chargebee/models/omnichannel_subscription_item.rb index 3789983..dfe1d59 100644 --- a/lib/chargebee/models/omnichannel_subscription_item.rb +++ b/lib/chargebee/models/omnichannel_subscription_item.rb @@ -21,7 +21,7 @@ def self.list_omni_sub_item_schedule_changes(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("omnichannel_subscription_items",id.to_s,"scheduled_changes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "omnichannelSubscriptionItem", telemetry_operation: "listOmniSubItemScheduleChanges") + Request.send('get', uri_path("omnichannel_subscription_items",id.to_s,"scheduled_changes"), params, env, headers,nil, false, jsonKeys, options, "omnichannelSubscriptionItem", "listOmniSubItemScheduleChanges") end end # ~OmnichannelSubscriptionItem diff --git a/lib/chargebee/models/order.rb b/lib/chargebee/models/order.rb index c1a82b1..8d5a1c1 100644 --- a/lib/chargebee/models/order.rb +++ b/lib/chargebee/models/order.rb @@ -48,7 +48,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "create") + Request.send('post', uri_path("orders"), params, env, headers,nil, false, jsonKeys, options, "order", "create") end def self.update(id, params={}, env=nil, headers={}) @@ -57,7 +57,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "update") + Request.send('post', uri_path("orders",id.to_s), params, env, headers,nil, false, jsonKeys, options, "order", "update") end def self.import_order(params, env=nil, headers={}) @@ -66,7 +66,7 @@ def self.import_order(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders","import_order"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "importOrder") + Request.send('post', uri_path("orders","import_order"), params, env, headers,nil, false, jsonKeys, options, "order", "importOrder") end def self.assign_order_number(id, env=nil, headers={}) @@ -75,7 +75,7 @@ def self.assign_order_number(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s,"assign_order_number"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "assignOrderNumber") + Request.send('post', uri_path("orders",id.to_s,"assign_order_number"), {}, env, headers,nil, false, jsonKeys, options, "order", "assignOrderNumber") end def self.cancel(id, params, env=nil, headers={}) @@ -84,7 +84,7 @@ def self.cancel(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s,"cancel"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "cancel") + Request.send('post', uri_path("orders",id.to_s,"cancel"), params, env, headers,nil, false, jsonKeys, options, "order", "cancel") end def self.create_refundable_credit_note(id, params, env=nil, headers={}) @@ -93,7 +93,7 @@ def self.create_refundable_credit_note(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s,"create_refundable_credit_note"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "createRefundableCreditNote") + Request.send('post', uri_path("orders",id.to_s,"create_refundable_credit_note"), params, env, headers,nil, false, jsonKeys, options, "order", "createRefundableCreditNote") end def self.reopen(id, params={}, env=nil, headers={}) @@ -102,14 +102,14 @@ def self.reopen(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s,"reopen"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "reopen") + Request.send('post', uri_path("orders",id.to_s,"reopen"), params, env, headers,nil, false, jsonKeys, options, "order", "reopen") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("orders",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "retrieve") + Request.send('get', uri_path("orders",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "order", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -118,14 +118,14 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "delete") + Request.send('post', uri_path("orders",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "order", "delete") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("orders"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "list") + Request.send_list_request('get', uri_path("orders"), params, env, headers,nil, false, jsonKeys, options, "order", "list") end # @deprecated This method is deprecated and will be removed in a future version. @@ -133,7 +133,7 @@ def self.orders_for_invoice(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices",id.to_s,"orders"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "ordersForInvoice") + Request.send('get', uri_path("invoices",id.to_s,"orders"), params, env, headers,nil, false, jsonKeys, options, "order", "ordersForInvoice") end def self.resend(id, params={}, env=nil, headers={}) @@ -142,7 +142,7 @@ def self.resend(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("orders",id.to_s,"resend"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "order", telemetry_operation: "resend") + Request.send('post', uri_path("orders",id.to_s,"resend"), params, env, headers,nil, false, jsonKeys, options, "order", "resend") end end # ~Order diff --git a/lib/chargebee/models/payment_intent.rb b/lib/chargebee/models/payment_intent.rb index ff86a5c..e212f9e 100644 --- a/lib/chargebee/models/payment_intent.rb +++ b/lib/chargebee/models/payment_intent.rb @@ -9,9 +9,14 @@ class PaymentAttempt < Model attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :checkout_details, :created_at, :modified_at, :error_detail end + class PaymentIntentMetadata < Model + attr_accessor :source, :client_ip_address, :user_agent, :created_at + end + attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id, :payment_method_type, :success_url, :failure_url, :created_at, :modified_at, :resource_version, - :updated_at, :customer_id, :gateway, :active_payment_attempt, :payment_attempts, :business_entity_id + :updated_at, :customer_id, :gateway, :active_payment_attempt, :payment_attempts, :payment_intent_metadata, + :business_entity_id # OPERATIONS #----------- @@ -22,7 +27,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_intents"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentIntent", telemetry_operation: "create") + Request.send('post', uri_path("payment_intents"), params, env, headers,nil, false, jsonKeys, options, "paymentIntent", "create") end def self.update(id, params={}, env=nil, headers={}) @@ -31,14 +36,14 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_intents",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentIntent", telemetry_operation: "update") + Request.send('post', uri_path("payment_intents",id.to_s), params, env, headers,nil, false, jsonKeys, options, "paymentIntent", "update") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("payment_intents",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentIntent", telemetry_operation: "retrieve") + Request.send('get', uri_path("payment_intents",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "paymentIntent", "retrieve") end end # ~PaymentIntent diff --git a/lib/chargebee/models/payment_schedule_scheme.rb b/lib/chargebee/models/payment_schedule_scheme.rb index 9e2e218..d8361c9 100644 --- a/lib/chargebee/models/payment_schedule_scheme.rb +++ b/lib/chargebee/models/payment_schedule_scheme.rb @@ -17,14 +17,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_schedule_schemes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentScheduleScheme", telemetry_operation: "create") + Request.send('post', uri_path("payment_schedule_schemes"), params, env, headers,nil, false, jsonKeys, options, "paymentScheduleScheme", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("payment_schedule_schemes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentScheduleScheme", telemetry_operation: "retrieve") + Request.send('get', uri_path("payment_schedule_schemes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "paymentScheduleScheme", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -33,7 +33,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_schedule_schemes",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentScheduleScheme", telemetry_operation: "delete") + Request.send('post', uri_path("payment_schedule_schemes",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "paymentScheduleScheme", "delete") end end # ~PaymentScheduleScheme diff --git a/lib/chargebee/models/payment_source.rb b/lib/chargebee/models/payment_source.rb index 5c25037..0f6d455 100644 --- a/lib/chargebee/models/payment_source.rb +++ b/lib/chargebee/models/payment_source.rb @@ -56,7 +56,7 @@ def self.create_using_temp_token(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_using_temp_token"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createUsingTempToken") + Request.send('post', uri_path("payment_sources","create_using_temp_token"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createUsingTempToken") end def self.create_using_permanent_token(params, env=nil, headers={}) @@ -66,7 +66,7 @@ def self.create_using_permanent_token(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_using_permanent_token"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createUsingPermanentToken") + Request.send('post', uri_path("payment_sources","create_using_permanent_token"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createUsingPermanentToken") end def self.create_using_token(params, env=nil, headers={}) @@ -75,7 +75,7 @@ def self.create_using_token(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_using_token"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createUsingToken") + Request.send('post', uri_path("payment_sources","create_using_token"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createUsingToken") end def self.create_using_payment_intent(params, env=nil, headers={}) @@ -86,7 +86,7 @@ def self.create_using_payment_intent(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_using_payment_intent"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createUsingPaymentIntent") + Request.send('post', uri_path("payment_sources","create_using_payment_intent"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createUsingPaymentIntent") end def self.create_voucher_payment_source(params, env=nil, headers={}) @@ -96,7 +96,7 @@ def self.create_voucher_payment_source(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_voucher_payment_source"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createVoucherPaymentSource") + Request.send('post', uri_path("payment_sources","create_voucher_payment_source"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createVoucherPaymentSource") end def self.create_card(params, env=nil, headers={}) @@ -106,7 +106,7 @@ def self.create_card(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_card"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createCard") + Request.send('post', uri_path("payment_sources","create_card"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createCard") end def self.create_bank_account(params, env=nil, headers={}) @@ -116,7 +116,7 @@ def self.create_bank_account(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources","create_bank_account"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "createBankAccount") + Request.send('post', uri_path("payment_sources","create_bank_account"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "createBankAccount") end def self.update_card(id, params={}, env=nil, headers={}) @@ -127,7 +127,7 @@ def self.update_card(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"update_card"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "updateCard") + Request.send('post', uri_path("payment_sources",id.to_s,"update_card"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "updateCard") end def self.update_bank_account(id, params={}, env=nil, headers={}) @@ -136,7 +136,7 @@ def self.update_bank_account(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"update_bank_account"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "updateBankAccount") + Request.send('post', uri_path("payment_sources",id.to_s,"update_bank_account"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "updateBankAccount") end def self.verify_bank_account(id, params, env=nil, headers={}) @@ -145,21 +145,21 @@ def self.verify_bank_account(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"verify_bank_account"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "verifyBankAccount") + Request.send('post', uri_path("payment_sources",id.to_s,"verify_bank_account"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "verifyBankAccount") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("payment_sources",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "retrieve") + Request.send('get', uri_path("payment_sources",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "paymentSource", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("payment_sources"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "list") + Request.send_list_request('get', uri_path("payment_sources"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "list") end def self.switch_gateway_account(id, params, env=nil, headers={}) @@ -168,7 +168,7 @@ def self.switch_gateway_account(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"switch_gateway_account"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "switchGatewayAccount") + Request.send('post', uri_path("payment_sources",id.to_s,"switch_gateway_account"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "switchGatewayAccount") end def self.export_payment_source(id, params, env=nil, headers={}) @@ -177,7 +177,7 @@ def self.export_payment_source(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"export_payment_source"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "exportPaymentSource") + Request.send('post', uri_path("payment_sources",id.to_s,"export_payment_source"), params, env, headers,nil, false, jsonKeys, options, "paymentSource", "exportPaymentSource") end def self.delete(id, env=nil, headers={}) @@ -186,7 +186,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "delete") + Request.send('post', uri_path("payment_sources",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "paymentSource", "delete") end def self.delete_local(id, env=nil, headers={}) @@ -195,7 +195,7 @@ def self.delete_local(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_sources",id.to_s,"delete_local"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentSource", telemetry_operation: "deleteLocal") + Request.send('post', uri_path("payment_sources",id.to_s,"delete_local"), {}, env, headers,nil, false, jsonKeys, options, "paymentSource", "deleteLocal") end end # ~PaymentSource diff --git a/lib/chargebee/models/payment_voucher.rb b/lib/chargebee/models/payment_voucher.rb index 04f43b8..40b263b 100644 --- a/lib/chargebee/models/payment_voucher.rb +++ b/lib/chargebee/models/payment_voucher.rb @@ -18,28 +18,28 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("payment_vouchers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentVoucher", telemetry_operation: "create") + Request.send('post', uri_path("payment_vouchers"), params, env, headers,nil, false, jsonKeys, options, "paymentVoucher", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("payment_vouchers",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentVoucher", telemetry_operation: "retrieve") + Request.send('get', uri_path("payment_vouchers",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "paymentVoucher", "retrieve") end def self.payment_vouchers_for_invoice(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices",id.to_s,"payment_vouchers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentVoucher", telemetry_operation: "paymentVouchersForInvoice") + Request.send('get', uri_path("invoices",id.to_s,"payment_vouchers"), params, env, headers,nil, false, jsonKeys, options, "paymentVoucher", "paymentVouchersForInvoice") end def self.payment_vouchers_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"payment_vouchers"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "paymentVoucher", telemetry_operation: "paymentVouchersForCustomer") + Request.send('get', uri_path("customers",id.to_s,"payment_vouchers"), params, env, headers,nil, false, jsonKeys, options, "paymentVoucher", "paymentVouchersForCustomer") end end # ~PaymentVoucher diff --git a/lib/chargebee/models/personalized_offer.rb b/lib/chargebee/models/personalized_offer.rb index 12e158f..e4daf43 100644 --- a/lib/chargebee/models/personalized_offer.rb +++ b/lib/chargebee/models/personalized_offer.rb @@ -19,7 +19,7 @@ def self.personalized_offers(params, env=nil, headers={}) :custom => 0, } options = {} - Request.send('post', uri_path("personalized_offers"), params, env, headers, "grow", true, jsonKeys, options, telemetry_resource: "personalizedOffer", telemetry_operation: "personalizedOffers") + Request.send('post', uri_path("personalized_offers"), params, env, headers, "grow", true, jsonKeys, options, "personalizedOffer", "personalizedOffers") end end # ~PersonalizedOffer diff --git a/lib/chargebee/models/plan.rb b/lib/chargebee/models/plan.rb index 65b21ce..3be2e84 100644 --- a/lib/chargebee/models/plan.rb +++ b/lib/chargebee/models/plan.rb @@ -42,7 +42,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("plans"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "create") + Request.send('post', uri_path("plans"), params, env, headers,nil, false, jsonKeys, options, "plan", "create") end def self.update(id, params, env=nil, headers={}) @@ -52,21 +52,21 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("plans",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "update") + Request.send('post', uri_path("plans",id.to_s), params, env, headers,nil, false, jsonKeys, options, "plan", "update") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("plans"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "list") + Request.send_list_request('get', uri_path("plans"), params, env, headers,nil, false, jsonKeys, options, "plan", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("plans",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "retrieve") + Request.send('get', uri_path("plans",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "plan", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -75,7 +75,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("plans",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "delete") + Request.send('post', uri_path("plans",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "plan", "delete") end def self.copy(params, env=nil, headers={}) @@ -84,7 +84,7 @@ def self.copy(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("plans","copy"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "copy") + Request.send('post', uri_path("plans","copy"), params, env, headers,nil, false, jsonKeys, options, "plan", "copy") end def self.unarchive(id, env=nil, headers={}) @@ -93,7 +93,7 @@ def self.unarchive(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("plans",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "plan", telemetry_operation: "unarchive") + Request.send('post', uri_path("plans",id.to_s,"unarchive"), {}, env, headers,nil, false, jsonKeys, options, "plan", "unarchive") end end # ~Plan diff --git a/lib/chargebee/models/portal_session.rb b/lib/chargebee/models/portal_session.rb index cbc8084..1f57f0a 100644 --- a/lib/chargebee/models/portal_session.rb +++ b/lib/chargebee/models/portal_session.rb @@ -17,14 +17,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("portal_sessions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "portalSession", telemetry_operation: "create") + Request.send('post', uri_path("portal_sessions"), params, env, headers,nil, false, jsonKeys, options, "portalSession", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("portal_sessions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "portalSession", telemetry_operation: "retrieve") + Request.send('get', uri_path("portal_sessions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "portalSession", "retrieve") end def self.logout(id, env=nil, headers={}) @@ -33,7 +33,7 @@ def self.logout(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("portal_sessions",id.to_s,"logout"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "portalSession", telemetry_operation: "logout") + Request.send('post', uri_path("portal_sessions",id.to_s,"logout"), {}, env, headers,nil, false, jsonKeys, options, "portalSession", "logout") end def self.activate(id, params, env=nil, headers={}) @@ -42,7 +42,7 @@ def self.activate(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("portal_sessions",id.to_s,"activate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "portalSession", telemetry_operation: "activate") + Request.send('post', uri_path("portal_sessions",id.to_s,"activate"), params, env, headers,nil, false, jsonKeys, options, "portalSession", "activate") end end # ~PortalSession diff --git a/lib/chargebee/models/price_variant.rb b/lib/chargebee/models/price_variant.rb index dbecd67..90ed775 100644 --- a/lib/chargebee/models/price_variant.rb +++ b/lib/chargebee/models/price_variant.rb @@ -17,14 +17,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("price_variants"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "priceVariant", telemetry_operation: "create") + Request.send('post', uri_path("price_variants"), params, env, headers,nil, false, jsonKeys, options, "priceVariant", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("price_variants",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "priceVariant", telemetry_operation: "retrieve") + Request.send('get', uri_path("price_variants",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "priceVariant", "retrieve") end def self.update(id, params, env=nil, headers={}) @@ -33,7 +33,7 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("price_variants",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "priceVariant", telemetry_operation: "update") + Request.send('post', uri_path("price_variants",id.to_s), params, env, headers,nil, false, jsonKeys, options, "priceVariant", "update") end def self.delete(id, env=nil, headers={}) @@ -42,14 +42,14 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("price_variants",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "priceVariant", telemetry_operation: "delete") + Request.send('post', uri_path("price_variants",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "priceVariant", "delete") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("price_variants"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "priceVariant", telemetry_operation: "list") + Request.send_list_request('get', uri_path("price_variants"), params, env, headers,nil, false, jsonKeys, options, "priceVariant", "list") end end # ~PriceVariant diff --git a/lib/chargebee/models/pricing_page_session.rb b/lib/chargebee/models/pricing_page_session.rb index 14dfd41..7021dd7 100644 --- a/lib/chargebee/models/pricing_page_session.rb +++ b/lib/chargebee/models/pricing_page_session.rb @@ -13,7 +13,7 @@ def self.create_for_new_subscription(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("pricing_page_sessions","create_for_new_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "pricingPageSession", telemetry_operation: "createForNewSubscription") + Request.send('post', uri_path("pricing_page_sessions","create_for_new_subscription"), params, env, headers,nil, false, jsonKeys, options, "pricingPageSession", "createForNewSubscription") end def self.create_for_existing_subscription(params, env=nil, headers={}) @@ -23,7 +23,7 @@ def self.create_for_existing_subscription(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("pricing_page_sessions","create_for_existing_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "pricingPageSession", telemetry_operation: "createForExistingSubscription") + Request.send('post', uri_path("pricing_page_sessions","create_for_existing_subscription"), params, env, headers,nil, false, jsonKeys, options, "pricingPageSession", "createForExistingSubscription") end end # ~PricingPageSession diff --git a/lib/chargebee/models/promotional_credit.rb b/lib/chargebee/models/promotional_credit.rb index 98e8fc0..55c14fa 100644 --- a/lib/chargebee/models/promotional_credit.rb +++ b/lib/chargebee/models/promotional_credit.rb @@ -13,7 +13,7 @@ def self.add(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("promotional_credits","add"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "promotionalCredit", telemetry_operation: "add") + Request.send('post', uri_path("promotional_credits","add"), params, env, headers,nil, false, jsonKeys, options, "promotionalCredit", "add") end def self.deduct(params, env=nil, headers={}) @@ -22,7 +22,7 @@ def self.deduct(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("promotional_credits","deduct"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "promotionalCredit", telemetry_operation: "deduct") + Request.send('post', uri_path("promotional_credits","deduct"), params, env, headers,nil, false, jsonKeys, options, "promotionalCredit", "deduct") end def self.set(params, env=nil, headers={}) @@ -31,21 +31,21 @@ def self.set(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("promotional_credits","set"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "promotionalCredit", telemetry_operation: "set") + Request.send('post', uri_path("promotional_credits","set"), params, env, headers,nil, false, jsonKeys, options, "promotionalCredit", "set") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("promotional_credits"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "promotionalCredit", telemetry_operation: "list") + Request.send_list_request('get', uri_path("promotional_credits"), params, env, headers,nil, false, jsonKeys, options, "promotionalCredit", "list") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("promotional_credits",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "promotionalCredit", telemetry_operation: "retrieve") + Request.send('get', uri_path("promotional_credits",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "promotionalCredit", "retrieve") end end # ~PromotionalCredit diff --git a/lib/chargebee/models/promotional_grant.rb b/lib/chargebee/models/promotional_grant.rb index 3550801..d93ce39 100644 --- a/lib/chargebee/models/promotional_grant.rb +++ b/lib/chargebee/models/promotional_grant.rb @@ -13,7 +13,7 @@ def self.promotional_grants(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("promotional_grants"), params, env, headers,nil, true, jsonKeys, options, telemetry_resource: "promotionalGrant", telemetry_operation: "promotionalGrants") + Request.send('post', uri_path("promotional_grants"), params, env, headers,nil, true, jsonKeys, options, "promotionalGrant", "promotionalGrants") end end # ~PromotionalGrant diff --git a/lib/chargebee/models/purchase.rb b/lib/chargebee/models/purchase.rb index 6b9828f..9658dd7 100644 --- a/lib/chargebee/models/purchase.rb +++ b/lib/chargebee/models/purchase.rb @@ -14,7 +14,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("purchases"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "purchase", telemetry_operation: "create") + Request.send('post', uri_path("purchases"), params, env, headers,nil, false, jsonKeys, options, "purchase", "create") end def self.estimate(params, env=nil, headers={}) @@ -22,7 +22,7 @@ def self.estimate(params, env=nil, headers={}) :exemption_details => 1, } options = {} - Request.send('post', uri_path("purchases","estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "purchase", telemetry_operation: "estimate") + Request.send('post', uri_path("purchases","estimate"), params, env, headers,nil, false, jsonKeys, options, "purchase", "estimate") end end # ~Purchase diff --git a/lib/chargebee/models/quote.rb b/lib/chargebee/models/quote.rb index b6fbdbc..2317c8b 100644 --- a/lib/chargebee/models/quote.rb +++ b/lib/chargebee/models/quote.rb @@ -2,7 +2,7 @@ module ChargeBee class Quote < Model class LineItem < Model - attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id + attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode end class LineItemTier < Model @@ -48,7 +48,7 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("quotes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "retrieve") + Request.send('get', uri_path("quotes",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "quote", "retrieve") end def self.create_sub_for_customer_quote(id, params, env=nil, headers={}) @@ -57,7 +57,7 @@ def self.create_sub_for_customer_quote(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "createSubForCustomerQuote") + Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, "quote", "createSubForCustomerQuote") end def self.edit_create_sub_for_customer_quote(id, params, env=nil, headers={}) @@ -66,7 +66,7 @@ def self.edit_create_sub_for_customer_quote(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "editCreateSubForCustomerQuote") + Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, "quote", "editCreateSubForCustomerQuote") end def self.update_subscription_quote(params, env=nil, headers={}) @@ -75,7 +75,7 @@ def self.update_subscription_quote(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes","update_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "updateSubscriptionQuote") + Request.send('post', uri_path("quotes","update_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, "quote", "updateSubscriptionQuote") end def self.edit_update_subscription_quote(id, params={}, env=nil, headers={}) @@ -84,7 +84,7 @@ def self.edit_update_subscription_quote(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "editUpdateSubscriptionQuote") + Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote"), params, env, headers,nil, false, jsonKeys, options, "quote", "editUpdateSubscriptionQuote") end def self.create_for_onetime_charges(params, env=nil, headers={}) @@ -93,7 +93,7 @@ def self.create_for_onetime_charges(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes","create_for_onetime_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "createForOnetimeCharges") + Request.send('post', uri_path("quotes","create_for_onetime_charges"), params, env, headers,nil, false, jsonKeys, options, "quote", "createForOnetimeCharges") end def self.edit_one_time_quote(id, params={}, env=nil, headers={}) @@ -102,7 +102,7 @@ def self.edit_one_time_quote(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"edit_one_time_quote"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "editOneTimeQuote") + Request.send('post', uri_path("quotes",id.to_s,"edit_one_time_quote"), params, env, headers,nil, false, jsonKeys, options, "quote", "editOneTimeQuote") end def self.create_sub_items_for_customer_quote(id, params, env=nil, headers={}) @@ -111,7 +111,7 @@ def self.create_sub_items_for_customer_quote(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "createSubItemsForCustomerQuote") + Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, "quote", "createSubItemsForCustomerQuote") end def self.edit_create_sub_customer_quote_for_items(id, params, env=nil, headers={}) @@ -120,7 +120,7 @@ def self.edit_create_sub_customer_quote_for_items(id, params, env=nil, headers={ options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "editCreateSubCustomerQuoteForItems") + Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, "quote", "editCreateSubCustomerQuoteForItems") end def self.update_subscription_quote_for_items(params, env=nil, headers={}) @@ -129,7 +129,7 @@ def self.update_subscription_quote_for_items(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes","update_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "updateSubscriptionQuoteForItems") + Request.send('post', uri_path("quotes","update_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, "quote", "updateSubscriptionQuoteForItems") end def self.edit_update_subscription_quote_for_items(id, params, env=nil, headers={}) @@ -138,7 +138,7 @@ def self.edit_update_subscription_quote_for_items(id, params, env=nil, headers={ options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "editUpdateSubscriptionQuoteForItems") + Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote_for_items"), params, env, headers,nil, false, jsonKeys, options, "quote", "editUpdateSubscriptionQuoteForItems") end def self.create_for_charge_items_and_charges(params, env=nil, headers={}) @@ -147,7 +147,7 @@ def self.create_for_charge_items_and_charges(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes","create_for_charge_items_and_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "createForChargeItemsAndCharges") + Request.send('post', uri_path("quotes","create_for_charge_items_and_charges"), params, env, headers,nil, false, jsonKeys, options, "quote", "createForChargeItemsAndCharges") end def self.edit_for_charge_items_and_charges(id, params, env=nil, headers={}) @@ -156,21 +156,21 @@ def self.edit_for_charge_items_and_charges(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"edit_for_charge_items_and_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "editForChargeItemsAndCharges") + Request.send('post', uri_path("quotes",id.to_s,"edit_for_charge_items_and_charges"), params, env, headers,nil, false, jsonKeys, options, "quote", "editForChargeItemsAndCharges") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("quotes"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "list") + Request.send_list_request('get', uri_path("quotes"), params, env, headers,nil, false, jsonKeys, options, "quote", "list") end def self.quote_line_groups_for_quote(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("quotes",id.to_s,"quote_line_groups"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "quoteLineGroupsForQuote") + Request.send('get', uri_path("quotes",id.to_s,"quote_line_groups"), params, env, headers,nil, false, jsonKeys, options, "quote", "quoteLineGroupsForQuote") end def self.convert(id, params={}, env=nil, headers={}) @@ -179,7 +179,7 @@ def self.convert(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "convert") + Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers,nil, false, jsonKeys, options, "quote", "convert") end def self.update_status(id, params, env=nil, headers={}) @@ -188,7 +188,7 @@ def self.update_status(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"update_status"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "updateStatus") + Request.send('post', uri_path("quotes",id.to_s,"update_status"), params, env, headers,nil, false, jsonKeys, options, "quote", "updateStatus") end def self.extend_expiry_date(id, params, env=nil, headers={}) @@ -197,7 +197,7 @@ def self.extend_expiry_date(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"extend_expiry_date"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "extendExpiryDate") + Request.send('post', uri_path("quotes",id.to_s,"extend_expiry_date"), params, env, headers,nil, false, jsonKeys, options, "quote", "extendExpiryDate") end def self.delete(id, params={}, env=nil, headers={}) @@ -206,7 +206,7 @@ def self.delete(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "delete") + Request.send('post', uri_path("quotes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, options, "quote", "delete") end def self.pdf(id, params={}, env=nil, headers={}) @@ -215,7 +215,7 @@ def self.pdf(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "pdf") + Request.send('post', uri_path("quotes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, options, "quote", "pdf") end # @deprecated This method is deprecated and will be removed in a future version. @@ -223,7 +223,7 @@ def self.retrieve_signature(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("quotes",id.to_s,"retrieve_signature"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "retrieveSignature") + Request.send('get', uri_path("quotes",id.to_s,"retrieve_signature"), {}, env, headers,nil, false, jsonKeys, options, "quote", "retrieveSignature") end # @deprecated This method is deprecated and will be removed in a future version. @@ -233,7 +233,7 @@ def self.retrieve_signed_pdf(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"retrieve_signed_pdf"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "retrieveSignedPdf") + Request.send('post', uri_path("quotes",id.to_s,"retrieve_signed_pdf"), {}, env, headers,nil, false, jsonKeys, options, "quote", "retrieveSignedPdf") end # @deprecated This method is deprecated and will be removed in a future version. @@ -243,7 +243,7 @@ def self.create_signature(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"create_signature"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "createSignature") + Request.send('post', uri_path("quotes",id.to_s,"create_signature"), {}, env, headers,nil, false, jsonKeys, options, "quote", "createSignature") end # @deprecated This method is deprecated and will be removed in a future version. @@ -253,7 +253,7 @@ def self.update_signature(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"update_signature"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "updateSignature") + Request.send('post', uri_path("quotes",id.to_s,"update_signature"), {}, env, headers,nil, false, jsonKeys, options, "quote", "updateSignature") end # @deprecated This method is deprecated and will be removed in a future version. @@ -263,7 +263,7 @@ def self.update_signature_status(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"update_signature_status"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "updateSignatureStatus") + Request.send('post', uri_path("quotes",id.to_s,"update_signature_status"), params, env, headers,nil, false, jsonKeys, options, "quote", "updateSignatureStatus") end # @deprecated This method is deprecated and will be removed in a future version. @@ -273,7 +273,7 @@ def self.refresh_signature_link(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("quotes",id.to_s,"refresh_signature_link"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "quote", telemetry_operation: "refreshSignatureLink") + Request.send('post', uri_path("quotes",id.to_s,"refresh_signature_link"), {}, env, headers,nil, false, jsonKeys, options, "quote", "refreshSignatureLink") end end # ~Quote diff --git a/lib/chargebee/models/quote_line_group.rb b/lib/chargebee/models/quote_line_group.rb index d6408d6..2d4e44e 100644 --- a/lib/chargebee/models/quote_line_group.rb +++ b/lib/chargebee/models/quote_line_group.rb @@ -2,7 +2,7 @@ module ChargeBee class QuoteLineGroup < Model class LineItem < Model - attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id + attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id, :proration_mode end class LineItemDiscount < Model diff --git a/lib/chargebee/models/quoted_charge.rb b/lib/chargebee/models/quoted_charge.rb index 99f3c4b..c80fe30 100644 --- a/lib/chargebee/models/quoted_charge.rb +++ b/lib/chargebee/models/quoted_charge.rb @@ -2,7 +2,7 @@ module ChargeBee class QuotedCharge < Model class Charge < Model - attr_accessor :amount, :amount_in_decimal, :description, :service_period_in_days, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type + attr_accessor :amount, :amount_in_decimal, :description, :entity_description, :service_period_in_days, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type end class Addon < Model @@ -10,7 +10,7 @@ class Addon < Model end class InvoiceItem < Model - attr_accessor :item_price_id, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :service_period_days + attr_accessor :item_price_id, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :description, :entity_description, :service_period_days end class ItemTier < Model diff --git a/lib/chargebee/models/ramp.rb b/lib/chargebee/models/ramp.rb index 5e36886..78cfa6f 100644 --- a/lib/chargebee/models/ramp.rb +++ b/lib/chargebee/models/ramp.rb @@ -14,7 +14,7 @@ class CouponsToAdd < Model end class DiscountsToAdd < Model - attr_accessor :id, :invoice_name, :type, :percentage, :amount, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at + attr_accessor :id, :invoice_name, :type, :percentage, :amount, :quantity, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at end class ItemTier < Model @@ -42,7 +42,7 @@ def self.create_for_subscription(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"create_ramp"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ramp", telemetry_operation: "createForSubscription") + Request.send('post', uri_path("subscriptions",id.to_s,"create_ramp"), params, env, headers,nil, false, jsonKeys, options, "ramp", "createForSubscription") end def self.update(id, params, env=nil, headers={}) @@ -51,14 +51,14 @@ def self.update(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("ramps",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ramp", telemetry_operation: "update") + Request.send('post', uri_path("ramps",id.to_s,"update"), params, env, headers,nil, false, jsonKeys, options, "ramp", "update") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("ramps",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ramp", telemetry_operation: "retrieve") + Request.send('get', uri_path("ramps",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "ramp", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -67,14 +67,14 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("ramps",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ramp", telemetry_operation: "delete") + Request.send('post', uri_path("ramps",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "ramp", "delete") end def self.list(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("ramps"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "ramp", telemetry_operation: "list") + Request.send_list_request('get', uri_path("ramps"), params, env, headers,nil, false, jsonKeys, options, "ramp", "list") end end # ~Ramp diff --git a/lib/chargebee/models/recorded_purchase.rb b/lib/chargebee/models/recorded_purchase.rb index 2c62e95..25fa24e 100644 --- a/lib/chargebee/models/recorded_purchase.rb +++ b/lib/chargebee/models/recorded_purchase.rb @@ -25,14 +25,14 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("recorded_purchases"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "recordedPurchase", telemetry_operation: "create") + Request.send('post', uri_path("recorded_purchases"), params, env, headers,nil, false, jsonKeys, options, "recordedPurchase", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("recorded_purchases",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "recordedPurchase", telemetry_operation: "retrieve") + Request.send('get', uri_path("recorded_purchases",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "recordedPurchase", "retrieve") end end # ~RecordedPurchase diff --git a/lib/chargebee/models/resource_migration.rb b/lib/chargebee/models/resource_migration.rb index ccba17e..4110558 100644 --- a/lib/chargebee/models/resource_migration.rb +++ b/lib/chargebee/models/resource_migration.rb @@ -10,7 +10,7 @@ def self.retrieve_latest(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("resource_migrations","retrieve_latest"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "resourceMigration", telemetry_operation: "retrieveLatest") + Request.send('get', uri_path("resource_migrations","retrieve_latest"), params, env, headers,nil, false, jsonKeys, options, "resourceMigration", "retrieveLatest") end end # ~ResourceMigration diff --git a/lib/chargebee/models/rule.rb b/lib/chargebee/models/rule.rb index 1f34058..f329486 100644 --- a/lib/chargebee/models/rule.rb +++ b/lib/chargebee/models/rule.rb @@ -11,7 +11,7 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("rules",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "rule", telemetry_operation: "retrieve") + Request.send('get', uri_path("rules",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "rule", "retrieve") end end # ~Rule diff --git a/lib/chargebee/models/site_migration_detail.rb b/lib/chargebee/models/site_migration_detail.rb index 5fba970..2b80e8f 100644 --- a/lib/chargebee/models/site_migration_detail.rb +++ b/lib/chargebee/models/site_migration_detail.rb @@ -11,7 +11,7 @@ def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("site_migration_details"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "siteMigrationDetail", telemetry_operation: "list") + Request.send_list_request('get', uri_path("site_migration_details"), params, env, headers,nil, false, jsonKeys, options, "siteMigrationDetail", "list") end end # ~SiteMigrationDetail diff --git a/lib/chargebee/models/subscription.rb b/lib/chargebee/models/subscription.rb index e951949..0cde719 100644 --- a/lib/chargebee/models/subscription.rb +++ b/lib/chargebee/models/subscription.rb @@ -81,7 +81,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "create") + Request.send('post', uri_path("subscriptions"), params, env, headers,nil, false, jsonKeys, options, "subscription", "create") end def self.create_for_customer(id, params, env=nil, headers={}) @@ -92,7 +92,7 @@ def self.create_for_customer(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"subscriptions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "createForCustomer") + Request.send('post', uri_path("customers",id.to_s,"subscriptions"), params, env, headers,nil, false, jsonKeys, options, "subscription", "createForCustomer") end def self.create_with_items(id, params, env=nil, headers={}) @@ -103,14 +103,14 @@ def self.create_with_items(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "createWithItems") + Request.send('post', uri_path("customers",id.to_s,"subscription_for_items"), params, env, headers,nil, false, jsonKeys, options, "subscription", "createWithItems") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("subscriptions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "list") + Request.send_list_request('get', uri_path("subscriptions"), params, env, headers,nil, false, jsonKeys, options, "subscription", "list") end # @deprecated This method is deprecated and will be removed in a future version. @@ -118,35 +118,35 @@ def self.subscriptions_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "subscriptionsForCustomer") + Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers,nil, false, jsonKeys, options, "subscription", "subscriptionsForCustomer") end def self.contract_terms_for_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "contractTermsForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers,nil, false, jsonKeys, options, "subscription", "contractTermsForSubscription") end def self.list_discounts(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"discounts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "listDiscounts") + Request.send('get', uri_path("subscriptions",id.to_s,"discounts"), params, env, headers,nil, false, jsonKeys, options, "subscription", "listDiscounts") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "retrieve") + Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "subscription", "retrieve") end def self.retrieve_with_scheduled_changes(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_with_scheduled_changes"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "retrieveWithScheduledChanges") + Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_with_scheduled_changes"), {}, env, headers,nil, false, jsonKeys, options, "subscription", "retrieveWithScheduledChanges") end def self.remove_scheduled_changes(id, env=nil, headers={}) @@ -155,7 +155,7 @@ def self.remove_scheduled_changes(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_changes"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "removeScheduledChanges") + Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_changes"), {}, env, headers,nil, false, jsonKeys, options, "subscription", "removeScheduledChanges") end def self.remove_scheduled_cancellation(id, params={}, env=nil, headers={}) @@ -164,7 +164,7 @@ def self.remove_scheduled_cancellation(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_cancellation"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "removeScheduledCancellation") + Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_cancellation"), params, env, headers,nil, false, jsonKeys, options, "subscription", "removeScheduledCancellation") end def self.remove_coupons(id, params={}, env=nil, headers={}) @@ -173,7 +173,7 @@ def self.remove_coupons(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"remove_coupons"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "removeCoupons") + Request.send('post', uri_path("subscriptions",id.to_s,"remove_coupons"), params, env, headers,nil, false, jsonKeys, options, "subscription", "removeCoupons") end def self.update(id, params={}, env=nil, headers={}) @@ -184,7 +184,7 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "update") + Request.send('post', uri_path("subscriptions",id.to_s), params, env, headers,nil, false, jsonKeys, options, "subscription", "update") end def self.update_for_items(id, params, env=nil, headers={}) @@ -195,7 +195,7 @@ def self.update_for_items(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"update_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "updateForItems") + Request.send('post', uri_path("subscriptions",id.to_s,"update_for_items"), params, env, headers,nil, false, jsonKeys, options, "subscription", "updateForItems") end def self.change_term_end(id, params, env=nil, headers={}) @@ -204,7 +204,7 @@ def self.change_term_end(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "changeTermEnd") + Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end"), params, env, headers,nil, false, jsonKeys, options, "subscription", "changeTermEnd") end def self.reactivate(id, params={}, env=nil, headers={}) @@ -214,7 +214,7 @@ def self.reactivate(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"reactivate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "reactivate") + Request.send('post', uri_path("subscriptions",id.to_s,"reactivate"), params, env, headers,nil, false, jsonKeys, options, "subscription", "reactivate") end def self.add_charge_at_term_end(id, params, env=nil, headers={}) @@ -223,7 +223,7 @@ def self.add_charge_at_term_end(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"add_charge_at_term_end"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "addChargeAtTermEnd") + Request.send('post', uri_path("subscriptions",id.to_s,"add_charge_at_term_end"), params, env, headers,nil, false, jsonKeys, options, "subscription", "addChargeAtTermEnd") end def self.charge_addon_at_term_end(id, params, env=nil, headers={}) @@ -232,7 +232,7 @@ def self.charge_addon_at_term_end(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"charge_addon_at_term_end"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "chargeAddonAtTermEnd") + Request.send('post', uri_path("subscriptions",id.to_s,"charge_addon_at_term_end"), params, env, headers,nil, false, jsonKeys, options, "subscription", "chargeAddonAtTermEnd") end def self.charge_future_renewals(id, params={}, env=nil, headers={}) @@ -241,7 +241,7 @@ def self.charge_future_renewals(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"charge_future_renewals"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "chargeFutureRenewals") + Request.send('post', uri_path("subscriptions",id.to_s,"charge_future_renewals"), params, env, headers,nil, false, jsonKeys, options, "subscription", "chargeFutureRenewals") end def self.edit_advance_invoice_schedule(id, params={}, env=nil, headers={}) @@ -250,14 +250,14 @@ def self.edit_advance_invoice_schedule(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"edit_advance_invoice_schedule"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "editAdvanceInvoiceSchedule") + Request.send('post', uri_path("subscriptions",id.to_s,"edit_advance_invoice_schedule"), params, env, headers,nil, false, jsonKeys, options, "subscription", "editAdvanceInvoiceSchedule") end def self.retrieve_advance_invoice_schedule(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_advance_invoice_schedule"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "retrieveAdvanceInvoiceSchedule") + Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_advance_invoice_schedule"), {}, env, headers,nil, false, jsonKeys, options, "subscription", "retrieveAdvanceInvoiceSchedule") end def self.remove_advance_invoice_schedule(id, params={}, env=nil, headers={}) @@ -266,7 +266,7 @@ def self.remove_advance_invoice_schedule(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"remove_advance_invoice_schedule"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "removeAdvanceInvoiceSchedule") + Request.send('post', uri_path("subscriptions",id.to_s,"remove_advance_invoice_schedule"), params, env, headers,nil, false, jsonKeys, options, "subscription", "removeAdvanceInvoiceSchedule") end def self.regenerate_invoice(id, params={}, env=nil, headers={}) @@ -275,7 +275,7 @@ def self.regenerate_invoice(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"regenerate_invoice"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "regenerateInvoice") + Request.send('post', uri_path("subscriptions",id.to_s,"regenerate_invoice"), params, env, headers,nil, false, jsonKeys, options, "subscription", "regenerateInvoice") end def self.import_subscription(params, env=nil, headers={}) @@ -286,7 +286,7 @@ def self.import_subscription(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions","import_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "importSubscription") + Request.send('post', uri_path("subscriptions","import_subscription"), params, env, headers,nil, false, jsonKeys, options, "subscription", "importSubscription") end def self.import_for_customer(id, params, env=nil, headers={}) @@ -296,7 +296,7 @@ def self.import_for_customer(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"import_subscription"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "importForCustomer") + Request.send('post', uri_path("customers",id.to_s,"import_subscription"), params, env, headers,nil, false, jsonKeys, options, "subscription", "importForCustomer") end def self.import_contract_term(id, params={}, env=nil, headers={}) @@ -305,7 +305,7 @@ def self.import_contract_term(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"import_contract_term"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "importContractTerm") + Request.send('post', uri_path("subscriptions",id.to_s,"import_contract_term"), params, env, headers,nil, false, jsonKeys, options, "subscription", "importContractTerm") end def self.import_unbilled_charges(id, params, env=nil, headers={}) @@ -314,7 +314,7 @@ def self.import_unbilled_charges(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"import_unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "importUnbilledCharges") + Request.send('post', uri_path("subscriptions",id.to_s,"import_unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, "subscription", "importUnbilledCharges") end def self.import_for_items(id, params, env=nil, headers={}) @@ -324,7 +324,7 @@ def self.import_for_items(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("customers",id.to_s,"import_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "importForItems") + Request.send('post', uri_path("customers",id.to_s,"import_for_items"), params, env, headers,nil, false, jsonKeys, options, "subscription", "importForItems") end def self.override_billing_profile(id, params={}, env=nil, headers={}) @@ -333,7 +333,7 @@ def self.override_billing_profile(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"override_billing_profile"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "overrideBillingProfile") + Request.send('post', uri_path("subscriptions",id.to_s,"override_billing_profile"), params, env, headers,nil, false, jsonKeys, options, "subscription", "overrideBillingProfile") end def self.delete(id, env=nil, headers={}) @@ -342,7 +342,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "delete") + Request.send('post', uri_path("subscriptions",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "subscription", "delete") end def self.pause(id, params={}, env=nil, headers={}) @@ -351,7 +351,7 @@ def self.pause(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"pause"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "pause") + Request.send('post', uri_path("subscriptions",id.to_s,"pause"), params, env, headers,nil, false, jsonKeys, options, "subscription", "pause") end def self.cancel(id, params={}, env=nil, headers={}) @@ -360,7 +360,7 @@ def self.cancel(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"cancel"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "cancel") + Request.send('post', uri_path("subscriptions",id.to_s,"cancel"), params, env, headers,nil, false, jsonKeys, options, "subscription", "cancel") end def self.cancel_for_items(id, params={}, env=nil, headers={}) @@ -369,7 +369,7 @@ def self.cancel_for_items(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"cancel_for_items"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "cancelForItems") + Request.send('post', uri_path("subscriptions",id.to_s,"cancel_for_items"), params, env, headers,nil, false, jsonKeys, options, "subscription", "cancelForItems") end def self.resume(id, params={}, env=nil, headers={}) @@ -379,7 +379,7 @@ def self.resume(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"resume"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "resume") + Request.send('post', uri_path("subscriptions",id.to_s,"resume"), params, env, headers,nil, false, jsonKeys, options, "subscription", "resume") end def self.remove_scheduled_pause(id, env=nil, headers={}) @@ -388,7 +388,7 @@ def self.remove_scheduled_pause(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_pause"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "removeScheduledPause") + Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_pause"), {}, env, headers,nil, false, jsonKeys, options, "subscription", "removeScheduledPause") end def self.remove_scheduled_resumption(id, env=nil, headers={}) @@ -397,7 +397,7 @@ def self.remove_scheduled_resumption(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_resumption"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "removeScheduledResumption") + Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_resumption"), {}, env, headers,nil, false, jsonKeys, options, "subscription", "removeScheduledResumption") end def self.move(id, params, env=nil, headers={}) @@ -406,7 +406,7 @@ def self.move(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"move"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscription", telemetry_operation: "move") + Request.send('post', uri_path("subscriptions",id.to_s,"move"), params, env, headers,nil, false, jsonKeys, options, "subscription", "move") end end # ~Subscription diff --git a/lib/chargebee/models/subscription_entitlement.rb b/lib/chargebee/models/subscription_entitlement.rb index 00bd4af..d0360ee 100644 --- a/lib/chargebee/models/subscription_entitlement.rb +++ b/lib/chargebee/models/subscription_entitlement.rb @@ -15,7 +15,7 @@ def self.subscription_entitlements_for_subscription(id, params={}, env=nil, head jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"subscription_entitlements"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscriptionEntitlement", telemetry_operation: "subscriptionEntitlementsForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"subscription_entitlements"), params, env, headers,nil, false, jsonKeys, options, "subscriptionEntitlement", "subscriptionEntitlementsForSubscription") end def self.set_subscription_entitlement_availability(id, params, env=nil, headers={}) @@ -24,7 +24,7 @@ def self.set_subscription_entitlement_availability(id, params, env=nil, headers= options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"subscription_entitlements/set_availability"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "subscriptionEntitlement", telemetry_operation: "setSubscriptionEntitlementAvailability") + Request.send('post', uri_path("subscriptions",id.to_s,"subscription_entitlements/set_availability"), params, env, headers,nil, false, jsonKeys, options, "subscriptionEntitlement", "setSubscriptionEntitlementAvailability") end end # ~SubscriptionEntitlement diff --git a/lib/chargebee/models/time_machine.rb b/lib/chargebee/models/time_machine.rb index 8aa88e7..0fa9b01 100644 --- a/lib/chargebee/models/time_machine.rb +++ b/lib/chargebee/models/time_machine.rb @@ -37,7 +37,7 @@ def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("time_machines",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "timeMachine", telemetry_operation: "retrieve") + Request.send('get', uri_path("time_machines",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "timeMachine", "retrieve") end def self.start_afresh(id, params={}, env=nil, headers={}) @@ -46,7 +46,7 @@ def self.start_afresh(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("time_machines",id.to_s,"start_afresh"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "timeMachine", telemetry_operation: "startAfresh") + Request.send('post', uri_path("time_machines",id.to_s,"start_afresh"), params, env, headers,nil, false, jsonKeys, options, "timeMachine", "startAfresh") end def self.travel_forward(id, params={}, env=nil, headers={}) @@ -55,7 +55,7 @@ def self.travel_forward(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("time_machines",id.to_s,"travel_forward"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "timeMachine", telemetry_operation: "travelForward") + Request.send('post', uri_path("time_machines",id.to_s,"travel_forward"), params, env, headers,nil, false, jsonKeys, options, "timeMachine", "travelForward") end end # ~TimeMachine diff --git a/lib/chargebee/models/transaction.rb b/lib/chargebee/models/transaction.rb index 91c762c..84e30a8 100644 --- a/lib/chargebee/models/transaction.rb +++ b/lib/chargebee/models/transaction.rb @@ -39,7 +39,7 @@ def self.create_authorization(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("transactions","create_authorization"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "createAuthorization") + Request.send('post', uri_path("transactions","create_authorization"), params, env, headers,nil, false, jsonKeys, options, "transaction", "createAuthorization") end def self.void_transaction(id, env=nil, headers={}) @@ -48,7 +48,7 @@ def self.void_transaction(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("transactions",id.to_s,"void"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "voidTransaction") + Request.send('post', uri_path("transactions",id.to_s,"void"), {}, env, headers,nil, false, jsonKeys, options, "transaction", "voidTransaction") end def self.record_refund(id, params, env=nil, headers={}) @@ -57,7 +57,7 @@ def self.record_refund(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("transactions",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "recordRefund") + Request.send('post', uri_path("transactions",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, options, "transaction", "recordRefund") end def self.reconcile(id, params={}, env=nil, headers={}) @@ -66,7 +66,7 @@ def self.reconcile(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("transactions",id.to_s,"reconcile"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "reconcile") + Request.send('post', uri_path("transactions",id.to_s,"reconcile"), params, env, headers,nil, false, jsonKeys, options, "transaction", "reconcile") end def self.refund(id, params={}, env=nil, headers={}) @@ -75,14 +75,14 @@ def self.refund(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("transactions",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "refund") + Request.send('post', uri_path("transactions",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, options, "transaction", "refund") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("transactions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "list") + Request.send_list_request('get', uri_path("transactions"), params, env, headers,nil, false, jsonKeys, options, "transaction", "list") end # @deprecated This method is deprecated and will be removed in a future version. @@ -90,7 +90,7 @@ def self.transactions_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("customers",id.to_s,"transactions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "transactionsForCustomer") + Request.send('get', uri_path("customers",id.to_s,"transactions"), params, env, headers,nil, false, jsonKeys, options, "transaction", "transactionsForCustomer") end # @deprecated This method is deprecated and will be removed in a future version. @@ -98,21 +98,21 @@ def self.transactions_for_subscription(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"transactions"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "transactionsForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"transactions"), params, env, headers,nil, false, jsonKeys, options, "transaction", "transactionsForSubscription") end def self.payments_for_invoice(id, params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("invoices",id.to_s,"payments"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "paymentsForInvoice") + Request.send('get', uri_path("invoices",id.to_s,"payments"), params, env, headers,nil, false, jsonKeys, options, "transaction", "paymentsForInvoice") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("transactions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "retrieve") + Request.send('get', uri_path("transactions",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "transaction", "retrieve") end def self.delete_offline_transaction(id, params={}, env=nil, headers={}) @@ -121,7 +121,7 @@ def self.delete_offline_transaction(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("transactions",id.to_s,"delete_offline_transaction"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "transaction", telemetry_operation: "deleteOfflineTransaction") + Request.send('post', uri_path("transactions",id.to_s,"delete_offline_transaction"), params, env, headers,nil, false, jsonKeys, options, "transaction", "deleteOfflineTransaction") end end # ~Transaction diff --git a/lib/chargebee/models/unbilled_charge.rb b/lib/chargebee/models/unbilled_charge.rb index 43c945a..bff2602 100644 --- a/lib/chargebee/models/unbilled_charge.rb +++ b/lib/chargebee/models/unbilled_charge.rb @@ -19,7 +19,7 @@ def self.create_unbilled_charge(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("unbilled_charges","create"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "unbilledCharge", telemetry_operation: "createUnbilledCharge") + Request.send('post', uri_path("unbilled_charges","create"), params, env, headers,nil, false, jsonKeys, options, "unbilledCharge", "createUnbilledCharge") end def self.create(params, env=nil, headers={}) @@ -28,7 +28,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "unbilledCharge", telemetry_operation: "create") + Request.send('post', uri_path("unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, "unbilledCharge", "create") end def self.invoice_unbilled_charges(params={}, env=nil, headers={}) @@ -37,7 +37,7 @@ def self.invoice_unbilled_charges(params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("unbilled_charges","invoice_unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "unbilledCharge", telemetry_operation: "invoiceUnbilledCharges") + Request.send('post', uri_path("unbilled_charges","invoice_unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, "unbilledCharge", "invoiceUnbilledCharges") end def self.delete(id, env=nil, headers={}) @@ -46,21 +46,21 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("unbilled_charges",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "unbilledCharge", telemetry_operation: "delete") + Request.send('post', uri_path("unbilled_charges",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "unbilledCharge", "delete") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "unbilledCharge", telemetry_operation: "list") + Request.send_list_request('get', uri_path("unbilled_charges"), params, env, headers,nil, false, jsonKeys, options, "unbilledCharge", "list") end def self.invoice_now_estimate(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("unbilled_charges","invoice_now_estimate"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "unbilledCharge", telemetry_operation: "invoiceNowEstimate") + Request.send('post', uri_path("unbilled_charges","invoice_now_estimate"), params, env, headers,nil, false, jsonKeys, options, "unbilledCharge", "invoiceNowEstimate") end end # ~UnbilledCharge diff --git a/lib/chargebee/models/usage.rb b/lib/chargebee/models/usage.rb index 6d2624a..73b754c 100644 --- a/lib/chargebee/models/usage.rb +++ b/lib/chargebee/models/usage.rb @@ -13,14 +13,14 @@ def self.create(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"usages"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usage", telemetry_operation: "create") + Request.send('post', uri_path("subscriptions",id.to_s,"usages"), params, env, headers,nil, false, jsonKeys, options, "usage", "create") end def self.retrieve(id, params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"usages"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usage", telemetry_operation: "retrieve") + Request.send('get', uri_path("subscriptions",id.to_s,"usages"), params, env, headers,nil, false, jsonKeys, options, "usage", "retrieve") end def self.delete(id, params, env=nil, headers={}) @@ -29,14 +29,14 @@ def self.delete(id, params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("subscriptions",id.to_s,"delete_usage"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usage", telemetry_operation: "delete") + Request.send('post', uri_path("subscriptions",id.to_s,"delete_usage"), params, env, headers,nil, false, jsonKeys, options, "usage", "delete") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("usages"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usage", telemetry_operation: "list") + Request.send_list_request('get', uri_path("usages"), params, env, headers,nil, false, jsonKeys, options, "usage", "list") end def self.pdf(params, env=nil, headers={}) @@ -45,7 +45,7 @@ def self.pdf(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("usages","pdf"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usage", telemetry_operation: "pdf") + Request.send('post', uri_path("usages","pdf"), params, env, headers,nil, false, jsonKeys, options, "usage", "pdf") end end # ~Usage diff --git a/lib/chargebee/models/usage_charge.rb b/lib/chargebee/models/usage_charge.rb index 05da07f..c3a54ec 100644 --- a/lib/chargebee/models/usage_charge.rb +++ b/lib/chargebee/models/usage_charge.rb @@ -11,7 +11,7 @@ def self.retrieve_usage_charges_for_subscription(id, params={}, env=nil, headers jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"usage_charges"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usageCharge", telemetry_operation: "retrieveUsageChargesForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"usage_charges"), params, env, headers,nil, false, jsonKeys, options, "usageCharge", "retrieveUsageChargesForSubscription") end end # ~UsageCharge diff --git a/lib/chargebee/models/usage_event.rb b/lib/chargebee/models/usage_event.rb index a516f2b..0291caf 100644 --- a/lib/chargebee/models/usage_event.rb +++ b/lib/chargebee/models/usage_event.rb @@ -11,7 +11,7 @@ def self.create(params, env=nil, headers={}) :properties => 0, } options = {} - Request.send('post', uri_path("usage_events"), params, env, headers, "ingest", true, jsonKeys, options, telemetry_resource: "usageEvent", telemetry_operation: "create") + Request.send('post', uri_path("usage_events"), params, env, headers, "ingest", true, jsonKeys, options, "usageEvent", "create") end def self.batch_ingest(params, env=nil, headers={}) @@ -19,7 +19,7 @@ def self.batch_ingest(params, env=nil, headers={}) :properties => 1, } options = {} - Request.send('post', uri_path("batch","usage_events"), params, env, headers, "ingest", true, jsonKeys, options, telemetry_resource: "usageEvent", telemetry_operation: "batchIngest") + Request.send('post', uri_path("batch","usage_events"), params, env, headers, "ingest", true, jsonKeys, options, "usageEvent", "batchIngest") end end # ~UsageEvent diff --git a/lib/chargebee/models/usage_file.rb b/lib/chargebee/models/usage_file.rb index fdf8281..bd21287 100644 --- a/lib/chargebee/models/usage_file.rb +++ b/lib/chargebee/models/usage_file.rb @@ -16,14 +16,14 @@ def self.upload_url(params, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('post', uri_path("usage_files","upload_url"), params, env, headers, "file-ingest", false, jsonKeys, options, telemetry_resource: "usageFile", telemetry_operation: "uploadUrl") + Request.send('post', uri_path("usage_files","upload_url"), params, env, headers, "file-ingest", false, jsonKeys, options, "usageFile", "uploadUrl") end def self.processing_status(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("usage_files",id.to_s,"processing_status"), {}, env, headers, "file-ingest", false, jsonKeys, options, telemetry_resource: "usageFile", telemetry_operation: "processingStatus") + Request.send('get', uri_path("usage_files",id.to_s,"processing_status"), {}, env, headers, "file-ingest", false, jsonKeys, options, "usageFile", "processingStatus") end end # ~UsageFile diff --git a/lib/chargebee/models/usage_summary.rb b/lib/chargebee/models/usage_summary.rb index 93ec520..a16edd4 100644 --- a/lib/chargebee/models/usage_summary.rb +++ b/lib/chargebee/models/usage_summary.rb @@ -10,7 +10,7 @@ def self.retrieve_usage_summary_for_subscription(id, params, env=nil, headers={} jsonKeys = { } options = {} - Request.send('get', uri_path("subscriptions",id.to_s,"usage_summary"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "usageSummary", telemetry_operation: "retrieveUsageSummaryForSubscription") + Request.send('get', uri_path("subscriptions",id.to_s,"usage_summary"), params, env, headers,nil, false, jsonKeys, options, "usageSummary", "retrieveUsageSummaryForSubscription") end end # ~UsageSummary diff --git a/lib/chargebee/models/virtual_bank_account.rb b/lib/chargebee/models/virtual_bank_account.rb index e838d51..74af9ab 100644 --- a/lib/chargebee/models/virtual_bank_account.rb +++ b/lib/chargebee/models/virtual_bank_account.rb @@ -14,7 +14,7 @@ def self.create_using_permanent_token(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("virtual_bank_accounts","create_using_permanent_token"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "virtualBankAccount", telemetry_operation: "createUsingPermanentToken") + Request.send('post', uri_path("virtual_bank_accounts","create_using_permanent_token"), params, env, headers,nil, false, jsonKeys, options, "virtualBankAccount", "createUsingPermanentToken") end def self.create(params, env=nil, headers={}) @@ -23,21 +23,21 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("virtual_bank_accounts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "virtualBankAccount", telemetry_operation: "create") + Request.send('post', uri_path("virtual_bank_accounts"), params, env, headers,nil, false, jsonKeys, options, "virtualBankAccount", "create") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("virtual_bank_accounts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "virtualBankAccount", telemetry_operation: "retrieve") + Request.send('get', uri_path("virtual_bank_accounts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "virtualBankAccount", "retrieve") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("virtual_bank_accounts"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "virtualBankAccount", telemetry_operation: "list") + Request.send_list_request('get', uri_path("virtual_bank_accounts"), params, env, headers,nil, false, jsonKeys, options, "virtualBankAccount", "list") end def self.delete(id, env=nil, headers={}) @@ -46,7 +46,7 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("virtual_bank_accounts",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "virtualBankAccount", telemetry_operation: "delete") + Request.send('post', uri_path("virtual_bank_accounts",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "virtualBankAccount", "delete") end def self.delete_local(id, env=nil, headers={}) @@ -55,7 +55,7 @@ def self.delete_local(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("virtual_bank_accounts",id.to_s,"delete_local"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "virtualBankAccount", telemetry_operation: "deleteLocal") + Request.send('post', uri_path("virtual_bank_accounts",id.to_s,"delete_local"), {}, env, headers,nil, false, jsonKeys, options, "virtualBankAccount", "deleteLocal") end end # ~VirtualBankAccount diff --git a/lib/chargebee/models/webhook_endpoint.rb b/lib/chargebee/models/webhook_endpoint.rb index 6929983..5337d4c 100644 --- a/lib/chargebee/models/webhook_endpoint.rb +++ b/lib/chargebee/models/webhook_endpoint.rb @@ -13,7 +13,7 @@ def self.create(params, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("webhook_endpoints"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "webhookEndpoint", telemetry_operation: "create") + Request.send('post', uri_path("webhook_endpoints"), params, env, headers,nil, false, jsonKeys, options, "webhookEndpoint", "create") end def self.update(id, params={}, env=nil, headers={}) @@ -22,14 +22,14 @@ def self.update(id, params={}, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("webhook_endpoints",id.to_s), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "webhookEndpoint", telemetry_operation: "update") + Request.send('post', uri_path("webhook_endpoints",id.to_s), params, env, headers,nil, false, jsonKeys, options, "webhookEndpoint", "update") end def self.retrieve(id, env=nil, headers={}) jsonKeys = { } options = {} - Request.send('get', uri_path("webhook_endpoints",id.to_s), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "webhookEndpoint", telemetry_operation: "retrieve") + Request.send('get', uri_path("webhook_endpoints",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "webhookEndpoint", "retrieve") end def self.delete(id, env=nil, headers={}) @@ -38,14 +38,14 @@ def self.delete(id, env=nil, headers={}) options = { :isIdempotent => true } - Request.send('post', uri_path("webhook_endpoints",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, telemetry_resource: "webhookEndpoint", telemetry_operation: "delete") + Request.send('post', uri_path("webhook_endpoints",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "webhookEndpoint", "delete") end def self.list(params={}, env=nil, headers={}) jsonKeys = { } options = {} - Request.send_list_request('get', uri_path("webhook_endpoints"), params, env, headers,nil, false, jsonKeys, options, telemetry_resource: "webhookEndpoint", telemetry_operation: "list") + Request.send_list_request('get', uri_path("webhook_endpoints"), params, env, headers,nil, false, jsonKeys, options, "webhookEndpoint", "list") end end # ~WebhookEndpoint diff --git a/lib/chargebee/result.rb b/lib/chargebee/result.rb index 70d1124..a009fea 100644 --- a/lib/chargebee/result.rb +++ b/lib/chargebee/result.rb @@ -30,6 +30,20 @@ def is_idempotency_replayed() end end + def async_response_list() + async_response_list = get(:async_response_list, AsyncResponseList, {}, + {:list => AsyncResponse}); + async_response_list.init_dependant_list(@response[:async_response_list], :list, + {:request => AsyncResponse::RequestAsyncApi, :error_detail => AsyncResponse::Error}); + return async_response_list; + end + + def async_response() + async_response = get(:async_response, AsyncResponse, + {:request_async_api => AsyncResponse::RequestAsyncApi, :error => AsyncResponse::Error}); + return async_response; + end + def subscription() subscription = get(:subscription, Subscription, {:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :billing_override => Subscription::BillingOverride, :contract_term => Subscription::ContractTerm, :discounts => Subscription::Discount}); @@ -106,7 +120,7 @@ def promotional_credit() def invoice() invoice = get(:invoice, Invoice, - {:line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation}); + {:exchange_rates => Invoice::ExchangeRate, :line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation}); return invoice; end @@ -133,7 +147,7 @@ def tax_withheld() def credit_note() credit_note = get(:credit_note, CreditNote, - {:line_items => CreditNote::LineItem, :line_item_tiers => CreditNote::LineItemTier, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_taxes => CreditNote::LineItemTax, :line_item_addresses => CreditNote::LineItemAddress, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :tax_origin => CreditNote::TaxOrigin, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation}); + {:line_items => CreditNote::LineItem, :line_item_tiers => CreditNote::LineItemTier, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_taxes => CreditNote::LineItemTax, :line_item_addresses => CreditNote::LineItemAddress, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :tax_origin => CreditNote::TaxOrigin, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :exchange_rates => CreditNote::ExchangeRate, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation}); return credit_note; end @@ -318,7 +332,7 @@ def export() def payment_intent() payment_intent = get(:payment_intent, PaymentIntent, - {:payment_attempt => PaymentIntent::PaymentAttempt, :payment_attempts => PaymentIntent::PaymentAttempt}); + {:payment_attempt => PaymentIntent::PaymentAttempt, :payment_attempts => PaymentIntent::PaymentAttempt, :payment_intent_metadata => PaymentIntent::PaymentIntentMetadata}); return payment_intent; end @@ -530,11 +544,31 @@ def rule() return rule; end + def meter() + meter = get(:meter, Meter, {}, + {:column_definitions => ColumnDefinition, :features => Feature}); + meter.init_dependant_list(@response[:meter], :column_definitions, + {}); + meter.init_dependant_list(@response[:meter], :features, + {:levels => Feature::Level}); + return meter; + end + def usage_event() usage_event = get(:usage_event, UsageEvent); return usage_event; end + def metered_feature() + metered_feature = get(:metered_feature, MeteredFeature, {}, + {:column_definitions => ColumnDefinition, :features => Feature}); + metered_feature.init_dependant_list(@response[:metered_feature], :column_definitions, + {}); + metered_feature.init_dependant_list(@response[:metered_feature], :features, + {:levels => Feature::Level}); + return metered_feature; + end + def usage_file() usage_file = get(:usage_file, UsageFile, {:upload_detail => UsageFile::UploadDetail}); @@ -579,7 +613,8 @@ def usage_charge() end def alert() - alert = get(:alert, Alert); + alert = get(:alert, Alert, + {:threshold => Alert::Threshold, :filter_conditions => Alert::FilterCondition}); return alert; end @@ -644,7 +679,7 @@ def hierarchies() def invoices() invoices = get_list(:invoices, Invoice, - {:line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation}); + {:exchange_rates => Invoice::ExchangeRate, :line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation}); return invoices; end @@ -656,7 +691,7 @@ def payment_schedules() def credit_notes() credit_notes = get_list(:credit_notes, CreditNote, - {:line_items => CreditNote::LineItem, :line_item_tiers => CreditNote::LineItemTier, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_taxes => CreditNote::LineItemTax, :line_item_addresses => CreditNote::LineItemAddress, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :tax_origin => CreditNote::TaxOrigin, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation}); + {:line_items => CreditNote::LineItem, :line_item_tiers => CreditNote::LineItemTier, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_taxes => CreditNote::LineItemTax, :line_item_addresses => CreditNote::LineItemAddress, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :tax_origin => CreditNote::TaxOrigin, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :exchange_rates => CreditNote::ExchangeRate, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation}); return credit_notes; end