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-alish committed Jul 3, 2024
1 parent 640baee commit 8a4e9fa
Show file tree
Hide file tree
Showing 15 changed files with 383 additions and 33 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
### v2.34.0 (2024-07-03)
* * *

#### New resources:
* Currency has been added.
* PricingPageSession Transfer has been added.

#### New Enum
* cancel_option Enum has been added.

#### New Enum values:
* ONLINE_BANKING_POLAND has been added in PaymentMethod enum.
* ONLINE_BANKING_POLAND has been added in PaymentMethodType enum.
* ONLINE_BANKING_POLAND has been added in Type enum.
* DRAFT has been added in Ramp enum.

#### New Input parameters:
* cancel_option has been added to Estimate#CancelSubscriptionRequest, Estimate#CancelSubscriptionForItemsRequest.
* cancel_option has been added to Subscription#CancelForItemsRequest, Subscription#CancelRequest.
* statement_descriptor[descriptor] has been added to Purchase#ChargeRequest.

#### New Attributes:
* tax_origin has been added to Invoice.
* tax_origin has been added to CreditNote.


### v2.33.0 (2024-05-28)
* * *

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chargebee-typescript",
"version": "2.33.0",
"version": "2.34.0",
"description": "A library in typescript for integrating with Chargebee.",
"keywords": [
"payments",
Expand All @@ -20,11 +20,11 @@
"tsc": "tsc --pretty"
},
"dependencies": {
"@types/q": "^1.5.2",
"q": ">=1.0.1"
},
"devDependencies": {
"@types/node": "^13.13.52",
"@types/q": "^1.5.2",
"typescript": "^3.9.3"
},
"directories": {
Expand Down
8 changes: 8 additions & 0 deletions src/chargebee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ export {_entitlement_override} from "./resources/entitlement_override";
export {_business_entity} from "./resources/business_entity";
export {_purchase} from "./resources/purchase";
export {_payment_voucher} from "./resources/payment_voucher";
export {_currency} from "./resources/currency";
export {_ramp} from "./resources/ramp";
export {_installment_config} from "./resources/installment_config";
export {_installment} from "./resources/installment";
export {_installment_detail} from "./resources/installment_detail";
export {_pricing_page_session} from "./resources/pricing_page_session";

interface Conf {
api_key: string
Expand Down Expand Up @@ -281,6 +283,9 @@ export class ChargeBee {
get payment_voucher() {
return resources.PaymentVoucher;
}
get currency() {
return resources.Currency;
}
get ramp() {
return resources.Ramp;
}
Expand All @@ -293,5 +298,8 @@ export class ChargeBee {
get installment_detail() {
return resources.InstallmentDetail;
}
get pricing_page_session() {
return resources.PricingPageSession;
}
}

2 changes: 1 addition & 1 deletion src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let environment = {
hostSuffix: '.chargebee.com',
apiPath: '/api/v2',
timeout: 80000,
clientVersion: 'v2.33.0',
clientVersion: 'v2.34.0',
port: 443,
timemachineWaitInMillis: 3000,
exportWaitInMillis: 3000
Expand Down
6 changes: 6 additions & 0 deletions src/resources/credit_note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class CreditNote extends Model {
public shipping_address?: ShippingAddress;
public billing_address?: BillingAddress;
public site_details_at_creation?: SiteDetailsAtCreation;
public tax_origin?: TaxOrigin;



Expand Down Expand Up @@ -357,6 +358,11 @@ export class SiteDetailsAtCreation extends Model {
public organization_address?: any;
} // ~SiteDetailsAtCreation

export class TaxOrigin extends Model {
public country?: string;
public registration_number?: string;
} // ~TaxOrigin



// REQUEST PARAMS
Expand Down
107 changes: 107 additions & 0 deletions src/resources/currency.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
import * as resources from ".";
import {RequestWrapper} from "../request_wrapper";
import {Model} from "./model";
import {ChargeBee} from "../chargebee";
import {filter} from "../filter";

export class Currency extends Model {
public id?: string;
public enabled: boolean;
public forex_type?: string;
public currency_code?: string;
public is_base_currency?: boolean;
public manual_exchange_rate?: string;



// OPERATIONS
//-----------

public static list(params?: any):RequestWrapper{
return new RequestWrapper([params], {
'methodName': 'list',
'httpMethod': 'GET',
'urlPrefix': '/currencies',
'urlSuffix': '/list',
'hasIdInUrl': false,
'isListReq': false,
}, ChargeBee._env)
}

public static retrieve(currency_id: string, params?: any):RequestWrapper {
return new RequestWrapper([currency_id, params], {
'methodName': 'retrieve',
'httpMethod': 'GET',
'urlPrefix': '/currencies',
'urlSuffix': null,
'hasIdInUrl': true,
'isListReq': false,
}, ChargeBee._env)
}

public static create(params?: _currency.create_params):RequestWrapper {
return new RequestWrapper([params], {
'methodName': 'create',
'httpMethod': 'POST',
'urlPrefix': '/currencies',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': false,
}, ChargeBee._env)
}

public static update(currency_id: string, params?: _currency.update_params):RequestWrapper {
return new RequestWrapper([currency_id, params], {
'methodName': 'update',
'httpMethod': 'POST',
'urlPrefix': '/currencies',
'urlSuffix': null,
'hasIdInUrl': true,
'isListReq': false,
}, ChargeBee._env)
}

public static add_schedule(currency_id: string, params?: _currency.add_schedule_params):RequestWrapper {
return new RequestWrapper([currency_id, params], {
'methodName': 'add_schedule',
'httpMethod': 'POST',
'urlPrefix': '/currencies',
'urlSuffix': '/add_schedule',
'hasIdInUrl': true,
'isListReq': false,
}, ChargeBee._env)
}

public static remove_schedule(currency_id: string, params?: any):RequestWrapper {
return new RequestWrapper([currency_id, params], {
'methodName': 'remove_schedule',
'httpMethod': 'POST',
'urlPrefix': '/currencies',
'urlSuffix': '/remove_schedule',
'hasIdInUrl': true,
'isListReq': false,
}, ChargeBee._env)
}

} // ~Currency



// REQUEST PARAMS
//---------------

export namespace _currency {
export interface create_params {
currency_code: string;
forex_type: string;
manual_exchange_rate?: string;
}
export interface update_params {
forex_type: string;
manual_exchange_rate?: string;
}
export interface add_schedule_params {
manual_exchange_rate: string;
schedule_at: number;
}
}
2 changes: 1 addition & 1 deletion src/resources/customer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,10 @@ export namespace _customer {
taxability?: filter._enum;
created_at?: filter._timestamp;
updated_at?: filter._timestamp;
business_entity_id?: filter._string;
offline_payment_method?: filter._enum;
auto_close_invoices?: filter._boolean;
channel?: filter._enum;
business_entity_id?: filter._string;
"sort_by[asc]"?: string;
"sort_by[desc]"?: string;
}
Expand Down
2 changes: 2 additions & 0 deletions src/resources/estimate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ export namespace _estimate {
invoice_immediately?: boolean;
}
export interface cancel_subscription_params {
cancel_option?: string;
end_of_term?: boolean;
cancel_at?: number;
credit_option_for_current_term_charges?: string;
Expand All @@ -395,6 +396,7 @@ export namespace _estimate {
event_based_addons?: Array<event_based_addons_cancel_subscription_params>;
}
export interface cancel_subscription_for_items_params {
cancel_option?: string;
end_of_term?: boolean;
cancel_at?: number;
credit_option_for_current_term_charges?: string;
Expand Down
16 changes: 8 additions & 8 deletions src/resources/hosted_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,13 +561,13 @@ export namespace _hosted_page {
company?: string;
}
export interface customer_checkout_new_params {
taxability?: string;
phone?: string;
}
export interface customer_checkout_new_params {
locale?: string;
}
export interface customer_checkout_new_params {
phone?: string;
taxability?: string;
}
export interface customer_checkout_new_params {
vat_number?: string;
Expand Down Expand Up @@ -738,13 +738,13 @@ export namespace _hosted_page {
company?: string;
}
export interface customer_checkout_one_time_params {
taxability?: string;
phone?: string;
}
export interface customer_checkout_one_time_params {
locale?: string;
}
export interface customer_checkout_one_time_params {
phone?: string;
taxability?: string;
}
export interface customer_checkout_one_time_params {
vat_number?: string;
Expand Down Expand Up @@ -927,13 +927,13 @@ export namespace _hosted_page {
company?: string;
}
export interface customer_checkout_one_time_for_items_params {
taxability?: string;
phone?: string;
}
export interface customer_checkout_one_time_for_items_params {
locale?: string;
}
export interface customer_checkout_one_time_for_items_params {
phone?: string;
taxability?: string;
}
export interface customer_checkout_one_time_for_items_params {
vat_number?: string;
Expand Down Expand Up @@ -1203,13 +1203,13 @@ export namespace _hosted_page {
company?: string;
}
export interface customer_checkout_new_for_items_params {
taxability?: string;
phone?: string;
}
export interface customer_checkout_new_for_items_params {
locale?: string;
}
export interface customer_checkout_new_for_items_params {
phone?: string;
taxability?: string;
}
export interface customer_checkout_new_for_items_params {
vat_number?: string;
Expand Down
6 changes: 5 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export {StatementDescriptor as InvoiceStatementDescriptor} from "./invoice";
export {BillingAddress as InvoiceBillingAddress} from "./invoice";
export {Einvoice as InvoiceEinvoice} from "./invoice";
export {SiteDetailsAtCreation as InvoiceSiteDetailsAtCreation} from "./invoice";
export {TaxOrigin as InvoiceTaxOrigin} from "./invoice";
export {PaymentReferenceNumber} from "./payment_reference_number";
export {TaxWithheld} from "./tax_withheld";
export {CreditNote} from "./credit_note";
Expand All @@ -80,6 +81,7 @@ export {Allocation as CreditNoteAllocation} from "./credit_note";
export {ShippingAddress as CreditNoteShippingAddress} from "./credit_note";
export {BillingAddress as CreditNoteBillingAddress} from "./credit_note";
export {SiteDetailsAtCreation as CreditNoteSiteDetailsAtCreation} from "./credit_note";
export {TaxOrigin as CreditNoteTaxOrigin} from "./credit_note";
export {UnbilledCharge} from "./unbilled_charge";
export {Tier as UnbilledChargeTier} from "./unbilled_charge";
export {Order} from "./order";
Expand Down Expand Up @@ -212,6 +214,7 @@ export {BusinessEntity} from "./business_entity";
export {Purchase} from "./purchase";
export {PaymentVoucher} from "./payment_voucher";
export {LinkedInvoice as PaymentVoucherLinkedInvoice} from "./payment_voucher";
export {Currency} from "./currency";
export {Ramp} from "./ramp";
export {ItemsToAdd as RampItemsToAdd} from "./ramp";
export {ItemsToUpdate as RampItemsToUpdate} from "./ramp";
Expand All @@ -222,4 +225,5 @@ export {InstallmentConfig} from "./installment_config";
export {Installment as InstallmentConfigInstallment} from "./installment_config";
export {Installment} from "./installment";
export {InstallmentDetail} from "./installment_detail";
export {Installment as InstallmentDetailInstallment} from "./installment_detail";
export {Installment as InstallmentDetailInstallment} from "./installment_detail";
export {PricingPageSession} from "./pricing_page_session";
6 changes: 6 additions & 0 deletions src/resources/invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class Invoice extends Model {
public channel?: string;
public business_entity_id?: string;
public site_details_at_creation?: SiteDetailsAtCreation;
public tax_origin?: TaxOrigin;



Expand Down Expand Up @@ -680,6 +681,11 @@ export class SiteDetailsAtCreation extends Model {
public organization_address?: any;
} // ~SiteDetailsAtCreation

export class TaxOrigin extends Model {
public country?: string;
public registration_number?: string;
} // ~TaxOrigin



// REQUEST PARAMS
Expand Down
Loading

0 comments on commit 8a4e9fa

Please sign in to comment.