Skip to content

Commit

Permalink
Releasing v2.34.0. Please check the changelog for the updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-nithins committed Jan 4, 2024
1 parent e7f50c2 commit 5cf215b
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 13 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
### v2.34.0 (2024-01-04)
* * *

#### New resources:
* Entitlements has been added.

#### New attributes:
* date_to, date_from, prorated_taxable_amount has been added to quote_line_group.
* date_to, date_from, prorated_taxable_amount has been added to quote.
* date_to, date_from, prorated_taxable_amount has been added to credit_note_estimate.
* date_to, date_from, prorated_taxable_amount has been added to credit_note.
* date_to, date_from, prorated_taxable_amount has been added to invoice_estimate.
* date_to, date_from, prorated_taxable_amount has been added to order.
* date_to, date_from, prorated_taxable_amount has been added to invoice.
* active_id has been added to customers.
* active_id has been added to subscriptions.
* reference_id has been made optional for payment_sources/create_using_permanent_token
* payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to payment_sources.
* custom_payment_method_id has been added to transactions.
* custom_payment_method_name has been added to transactions.
* error_detail has been added to transactions.


#### New Enum values:
* CMR_FALABELLA, TARJETA_NARANJA, NATIVA, CENCOSUD, CABAL, ARGENCARD, ELO, HIPERCARD, CARNET, RUPAY, MAESTRO has been added to Card#CardTypeEnum
* Transferred has been added to Subscription#StatusEnum.
* Transferred has been added to SubscriptionEstimate#StatusEnum.
* proration_type has been added to Subscription#UpdateForItemsRequest.
* proration_type has been added to ItemPrice.
* payment_initiator has been added to Invoice.
* AutomatedBankTransfer has been added to PaymentMethodEnum.
* UsAutomatedBankTransfer, GbAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer has been added to VirtualBankAccount#SchemeEnum.
* CustomerBusinessEntityChanged, SubscriptionBusinessEntityChanged has been added to EventTypeEnum.
* Dlocal has been added to GatewayEnum.
* UsAutomatedBankTransfer, UkAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer, Custom has been added to OfflinePaymentMethodEnum.
* AutomatedBankTransfer has been added to PaymentMethodEnum.
* AutomatedBankTransfer has been added to PaymentMethodTypeEnum.

#### New Input parameters:
* custom_payment_method_name has been added to Transactions#RecordRefundRequest.
* proration_type has been added to Subscription#UpdateForItemsRequest.
* payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to PaymentSource#CreateUsingPermanentTokenRequest.
* date_to, date_from, prorated_taxable_amount has been added to QuoteLineGroup#LineItemTax.
* date_to, date_from, prorated_taxable_amount has been added to Quote#LineItemTax.
* date_to, date_from, prorated_taxable_amount has been added to CreditNoteEstimate#LineItemTax.
* date_to, date_from, prorated_taxable_amount has been added to CreditNote#LineItemTax.
* date_to, date_from, prorated_taxable_amount has been added to InvoiceEstimate#LineItemTax.
* date_to, date_from, prorated_taxable_amount has been added to Order#LineItemTax.
* date_to, date_from, prorated_taxable_amount has been added to Invoice#LineItemTax.
* active_id has been added to Customer.
* active_id has been added to Subscription.
* subscription_items[proration_type] has been added to Estimate#UpdateSubscriptionForItemsRequest.
* transaction[custom_payment_method_id] has been added to Customer#RecordExcessPaymentRequest.
* transaction[custom_payment_method_id] has been added to CreditNote#RecordRefundRequest.

* * *

### v2.33.0 (2023-11-30)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2011-2023 ChargeBee, Inc.
Copyright (c) 2011-2024 ChargeBee, Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
1 change: 1 addition & 0 deletions chargebee/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from chargebee.models.differential_price import DifferentialPrice
from chargebee.models.discount import Discount
from chargebee.models.download import Download
from chargebee.models.entitlement import Entitlement
from chargebee.models.entitlement_override import EntitlementOverride
from chargebee.models.estimate import Estimate
from chargebee.models.event import Event
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Tax(Model):
fields = ["name", "amount", "description"]
pass
class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass
class LinkedRefund(Model):
fields = ["txn_id", "applied_amount", "applied_at", "txn_status", "txn_date", "txn_amount", "refund_reason_code"]
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/credit_note_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Tax(Model):
fields = ["name", "amount", "description"]
pass
class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass
class LineItemDiscount(Model):
fields = ["line_item_id", "discount_type", "coupon_id", "entity_id", "discount_amount"]
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ChildAccountAccess(Model):
"allow_direct_debit", "is_location_valid", "created_at", "created_from_ip", "exemption_details", \
"taxability", "entity_code", "exempt_number", "resource_version", "updated_at", "locale", "billing_date", \
"billing_month", "billing_date_mode", "billing_day_of_week", "billing_day_of_week_mode", "pii_cleared", \
"auto_close_invoices", "channel", "card_status", "fraud_flag", "primary_payment_source_id", \
"auto_close_invoices", "channel", "active_id", "card_status", "fraud_flag", "primary_payment_source_id", \
"backup_payment_source_id", "billing_address", "referral_urls", "contacts", "payment_method", \
"invoice_notes", "business_entity_id", "preferred_currency_code", "promotional_credits", "unbilled_charges", \
"refundable_credits", "excess_payments", "balances", "entity_identifiers", "is_einvoice_enabled", \
Expand Down
17 changes: 17 additions & 0 deletions chargebee/models/entitlement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import json
from chargebee.model import Model
from chargebee import request
from chargebee import APIError

class Entitlement(Model):

fields = ["id", "entity_id", "entity_type", "feature_id", "feature_name", "value", "name"]


@staticmethod
def list(params=None, env=None, headers=None):
return request.send_list_request('get', request.uri_path("entitlements"), params, env, headers)

@staticmethod
def create(params, env=None, headers=None):
return request.send('post', request.uri_path("entitlements"), params, env, headers)
2 changes: 1 addition & 1 deletion chargebee/models/quote.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Tax(Model):
fields = ["name", "amount", "description"]
pass
class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass
class LineItemTier(Model):
fields = ["line_item_id", "starting_unit", "ending_unit", "quantity_used", "unit_amount", "starting_unit_in_decimal", "ending_unit_in_decimal", "quantity_used_in_decimal", "unit_amount_in_decimal"]
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/quote_line_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Tax(Model):
fields = ["name", "amount", "description"]
pass
class LineItemTax(Model):
fields = ["line_item_id", "tax_name", "tax_rate", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
fields = ["line_item_id", "tax_name", "tax_rate", "date_to", "date_from", "prorated_taxable_amount", "is_partial_tax_applied", "is_non_compliance_tax", "taxable_amount", "tax_amount", "tax_juris_type", "tax_juris_name", "tax_juris_code", "tax_amount_in_local_currency", "local_currency_code"]
pass

fields = ["version", "id", "sub_total", "total", "credits_applied", "amount_paid", "amount_due", \
Expand Down
2 changes: 1 addition & 1 deletion chargebee/models/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Discount(Model):
"cancelled_at", "cancel_reason", "affiliate_token", "created_from_ip", "resource_version", "updated_at", \
"has_scheduled_advance_invoices", "has_scheduled_changes", "payment_source_id", "plan_free_quantity_in_decimal", \
"plan_amount_in_decimal", "cancel_schedule_created_at", "offline_payment_method", "channel", \
"net_term_days", "subscription_items", "item_tiers", "charged_items", "due_invoices_count", \
"net_term_days", "active_id", "subscription_items", "item_tiers", "charged_items", "due_invoices_count", \
"due_since", "total_dues", "mrr", "exchange_rate", "base_currency_code", "addons", "event_based_addons", \
"charged_event_based_addons", "coupon", "coupons", "shipping_address", "referral_info", "invoice_notes", \
"meta_data", "metadata", "deleted", "changes_scheduled_at", "contract_term", "cancel_reason_code", \
Expand Down
12 changes: 8 additions & 4 deletions chargebee/models/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ class LinkedRefund(Model):
class LinkedPayment(Model):
fields = ["id", "status", "amount", "date"]
pass
class GatewayErrorDetail(Model):
fields = ["request_id", "error_category", "error_code", "error_message", "decline_code", "decline_message", "network_error_code", "error_field", "recommendation_code"]
pass

fields = ["id", "customer_id", "subscription_id", "gateway_account_id", "payment_source_id", \
"payment_method", "reference_number", "gateway", "type", "date", "settled_at", "exchange_rate", \
"currency_code", "amount", "id_at_gateway", "status", "fraud_flag", "initiator_type", "three_d_secure", \
"authorization_reason", "error_code", "error_text", "voided_at", "resource_version", "updated_at", \
"fraud_reason", "amount_unused", "masked_card_number", "reference_transaction_id", "refunded_txn_id", \
"reference_authorization_id", "amount_capturable", "reversal_transaction_id", "linked_invoices", \
"linked_credit_notes", "linked_refunds", "linked_payments", "deleted", "iin", "last4", "merchant_reference_id", \
"business_entity_id", "payment_method_details"]
"fraud_reason", "custom_payment_method_id", "amount_unused", "masked_card_number", "reference_transaction_id", \
"refunded_txn_id", "reference_authorization_id", "amount_capturable", "reversal_transaction_id", \
"linked_invoices", "linked_credit_notes", "linked_refunds", "linked_payments", "deleted", "iin", \
"last4", "merchant_reference_id", "business_entity_id", "payment_method_details", "error_detail", \
"custom_payment_method_name"]


@staticmethod
Expand Down
7 changes: 6 additions & 1 deletion chargebee/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def gift(self):
@property
def transaction(self):
transaction = self._get('transaction', Transaction,
{'linked_invoices' : Transaction.LinkedInvoice, 'linked_credit_notes' : Transaction.LinkedCreditNote, 'linked_refunds' : Transaction.LinkedRefund, 'linked_payments' : Transaction.LinkedPayment});
{'linked_invoices' : Transaction.LinkedInvoice, 'linked_credit_notes' : Transaction.LinkedCreditNote, 'linked_refunds' : Transaction.LinkedRefund, 'linked_payments' : Transaction.LinkedPayment, 'gateway_error_detail' : Transaction.GatewayErrorDetail});
return transaction;

@property
Expand Down Expand Up @@ -331,6 +331,11 @@ def item_entitlement(self):
item_entitlement = self._get('item_entitlement', ItemEntitlement);
return item_entitlement;

@property
def entitlement(self):
entitlement = self._get('entitlement', Entitlement);
return entitlement;

@property
def in_app_subscription(self):
in_app_subscription = self._get('in_app_subscription', InAppSubscription);
Expand Down
2 changes: 1 addition & 1 deletion chargebee/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '2.33.0'
VERSION = '2.34.0'

0 comments on commit 5cf215b

Please sign in to comment.