@commercelayer/sdk 5.0.0-alpha.1 → 5.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.md +69 -33
  2. package/lib/api.d.ts +1 -103
  3. package/lib/client.d.ts +1 -31
  4. package/lib/client.js +1 -1
  5. package/lib/commercelayer.d.ts +1 -122
  6. package/lib/commercelayer.js +1 -1
  7. package/lib/common.d.ts +1 -4
  8. package/lib/config.d.ts +1 -11
  9. package/lib/debug.d.ts +1 -3
  10. package/lib/debug.js +1 -1
  11. package/lib/error.d.ts +1 -26
  12. package/lib/error.js +1 -1
  13. package/lib/index.d.ts +1 -7
  14. package/lib/interceptor.d.ts +1 -19
  15. package/lib/jsonapi.d.ts +1 -5
  16. package/lib/jsonapi.js +1 -1
  17. package/lib/model.d.ts +1 -101
  18. package/lib/query.d.ts +1 -23
  19. package/lib/query.js +1 -1
  20. package/lib/resource.d.ts +1 -76
  21. package/lib/resource.js +1 -1
  22. package/lib/resources/addresses.d.ts +1 -88
  23. package/lib/resources/addresses.js +1 -1
  24. package/lib/resources/adjustments.d.ts +1 -35
  25. package/lib/resources/adjustments.js +1 -1
  26. package/lib/resources/adyen_gateways.d.ts +1 -47
  27. package/lib/resources/adyen_gateways.js +1 -1
  28. package/lib/resources/adyen_payments.d.ts +1 -44
  29. package/lib/resources/adyen_payments.js +1 -1
  30. package/lib/resources/application.d.ts +1 -21
  31. package/lib/resources/application.js +1 -1
  32. package/lib/resources/attachments.d.ts +1 -156
  33. package/lib/resources/attachments.js +1 -1
  34. package/lib/resources/authorizations.d.ts +1 -57
  35. package/lib/resources/authorizations.js +1 -1
  36. package/lib/resources/avalara_accounts.d.ts +1 -52
  37. package/lib/resources/avalara_accounts.js +1 -1
  38. package/lib/resources/billing_info_validation_rules.d.ts +1 -32
  39. package/lib/resources/billing_info_validation_rules.js +1 -1
  40. package/lib/resources/bing_geocoders.d.ts +1 -35
  41. package/lib/resources/bing_geocoders.js +1 -1
  42. package/lib/resources/braintree_gateways.d.ts +1 -56
  43. package/lib/resources/braintree_gateways.js +1 -1
  44. package/lib/resources/braintree_payments.d.ts +1 -47
  45. package/lib/resources/braintree_payments.js +1 -1
  46. package/lib/resources/bundles.d.ts +1 -74
  47. package/lib/resources/bundles.js +1 -1
  48. package/lib/resources/captures.d.ts +1 -48
  49. package/lib/resources/captures.js +1 -1
  50. package/lib/resources/carrier_accounts.d.ts +1 -26
  51. package/lib/resources/carrier_accounts.js +1 -1
  52. package/lib/resources/checkout_com_gateways.d.ts +1 -45
  53. package/lib/resources/checkout_com_gateways.js +1 -1
  54. package/lib/resources/checkout_com_payments.d.ts +1 -50
  55. package/lib/resources/checkout_com_payments.js +1 -1
  56. package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -59
  57. package/lib/resources/coupon_codes_promotion_rules.js +1 -1
  58. package/lib/resources/coupon_recipients.d.ts +1 -44
  59. package/lib/resources/coupon_recipients.js +1 -1
  60. package/lib/resources/coupons.d.ts +1 -45
  61. package/lib/resources/coupons.js +1 -1
  62. package/lib/resources/customer_addresses.d.ts +1 -41
  63. package/lib/resources/customer_addresses.js +1 -1
  64. package/lib/resources/customer_groups.d.ts +1 -36
  65. package/lib/resources/customer_groups.js +1 -1
  66. package/lib/resources/customer_password_resets.d.ts +1 -33
  67. package/lib/resources/customer_password_resets.js +1 -1
  68. package/lib/resources/customer_payment_sources.d.ts +1 -70
  69. package/lib/resources/customer_payment_sources.js +1 -1
  70. package/lib/resources/customer_subscriptions.d.ts +1 -28
  71. package/lib/resources/customer_subscriptions.js +1 -1
  72. package/lib/resources/customers.d.ts +1 -60
  73. package/lib/resources/customers.js +1 -1
  74. package/lib/resources/delivery_lead_times.d.ts +1 -51
  75. package/lib/resources/delivery_lead_times.js +1 -1
  76. package/lib/resources/event_callbacks.d.ts +1 -24
  77. package/lib/resources/event_callbacks.js +1 -1
  78. package/lib/resources/external_gateways.d.ts +1 -49
  79. package/lib/resources/external_gateways.js +1 -1
  80. package/lib/resources/external_payments.d.ts +1 -43
  81. package/lib/resources/external_payments.js +1 -1
  82. package/lib/resources/external_promotions.d.ts +1 -86
  83. package/lib/resources/external_promotions.js +1 -1
  84. package/lib/resources/external_tax_calculators.d.ts +1 -44
  85. package/lib/resources/external_tax_calculators.js +1 -1
  86. package/lib/resources/fixed_amount_promotions.d.ts +1 -88
  87. package/lib/resources/fixed_amount_promotions.js +1 -1
  88. package/lib/resources/fixed_price_promotions.d.ts +1 -99
  89. package/lib/resources/fixed_price_promotions.js +1 -1
  90. package/lib/resources/free_gift_promotions.d.ts +1 -97
  91. package/lib/resources/free_gift_promotions.js +1 -1
  92. package/lib/resources/free_shipping_promotions.d.ts +1 -83
  93. package/lib/resources/free_shipping_promotions.js +1 -1
  94. package/lib/resources/geocoders.d.ts +1 -24
  95. package/lib/resources/geocoders.js +1 -1
  96. package/lib/resources/gift_card_recipients.d.ts +1 -44
  97. package/lib/resources/gift_card_recipients.js +1 -1
  98. package/lib/resources/gift_cards.d.ts +1 -82
  99. package/lib/resources/gift_cards.js +1 -1
  100. package/lib/resources/google_geocoders.d.ts +1 -35
  101. package/lib/resources/google_geocoders.js +1 -1
  102. package/lib/resources/imports.d.ts +1 -40
  103. package/lib/resources/imports.js +1 -1
  104. package/lib/resources/in_stock_subscriptions.d.ts +1 -59
  105. package/lib/resources/in_stock_subscriptions.js +1 -1
  106. package/lib/resources/inventory_models.d.ts +1 -42
  107. package/lib/resources/inventory_models.js +1 -1
  108. package/lib/resources/inventory_return_locations.d.ts +1 -43
  109. package/lib/resources/inventory_return_locations.js +1 -1
  110. package/lib/resources/inventory_stock_locations.d.ts +1 -46
  111. package/lib/resources/inventory_stock_locations.js +1 -1
  112. package/lib/resources/klarna_gateways.d.ts +1 -44
  113. package/lib/resources/klarna_gateways.js +1 -1
  114. package/lib/resources/klarna_payments.d.ts +1 -41
  115. package/lib/resources/klarna_payments.js +1 -1
  116. package/lib/resources/line_item_options.d.ts +1 -57
  117. package/lib/resources/line_item_options.js +1 -1
  118. package/lib/resources/line_items.d.ts +1 -125
  119. package/lib/resources/line_items.js +1 -1
  120. package/lib/resources/manual_gateways.d.ts +1 -33
  121. package/lib/resources/manual_gateways.js +1 -1
  122. package/lib/resources/manual_tax_calculators.d.ts +1 -49
  123. package/lib/resources/manual_tax_calculators.js +1 -1
  124. package/lib/resources/markets.d.ts +1 -81
  125. package/lib/resources/markets.js +1 -1
  126. package/lib/resources/merchants.d.ts +1 -38
  127. package/lib/resources/merchants.js +1 -1
  128. package/lib/resources/order_amount_promotion_rules.d.ts +1 -56
  129. package/lib/resources/order_amount_promotion_rules.js +1 -1
  130. package/lib/resources/order_copies.d.ts +1 -45
  131. package/lib/resources/order_copies.js +1 -1
  132. package/lib/resources/order_subscriptions.d.ts +1 -67
  133. package/lib/resources/order_subscriptions.js +1 -1
  134. package/lib/resources/order_validation_rules.d.ts +1 -20
  135. package/lib/resources/order_validation_rules.js +1 -1
  136. package/lib/resources/orders.d.ts +1 -271
  137. package/lib/resources/orders.js +1 -1
  138. package/lib/resources/organization.d.ts +1 -32
  139. package/lib/resources/organization.js +1 -1
  140. package/lib/resources/packages.d.ts +1 -56
  141. package/lib/resources/packages.js +1 -1
  142. package/lib/resources/parcel_line_items.d.ts +1 -49
  143. package/lib/resources/parcel_line_items.js +1 -1
  144. package/lib/resources/parcels.d.ts +1 -108
  145. package/lib/resources/parcels.js +1 -1
  146. package/lib/resources/payment_gateways.d.ts +1 -21
  147. package/lib/resources/payment_gateways.js +1 -1
  148. package/lib/resources/payment_methods.d.ts +1 -59
  149. package/lib/resources/payment_methods.js +1 -1
  150. package/lib/resources/paypal_gateways.d.ts +1 -39
  151. package/lib/resources/paypal_gateways.js +1 -1
  152. package/lib/resources/paypal_payments.d.ts +1 -47
  153. package/lib/resources/paypal_payments.js +1 -1
  154. package/lib/resources/percentage_discount_promotions.d.ts +1 -97
  155. package/lib/resources/percentage_discount_promotions.js +1 -1
  156. package/lib/resources/price_lists.d.ts +1 -39
  157. package/lib/resources/price_lists.js +1 -1
  158. package/lib/resources/prices.d.ts +1 -57
  159. package/lib/resources/prices.js +1 -1
  160. package/lib/resources/promotion_rules.d.ts +1 -24
  161. package/lib/resources/promotion_rules.js +1 -1
  162. package/lib/resources/promotions.d.ts +1 -41
  163. package/lib/resources/promotions.js +1 -1
  164. package/lib/resources/refunds.d.ts +1 -34
  165. package/lib/resources/refunds.js +1 -1
  166. package/lib/resources/return_line_items.d.ts +1 -49
  167. package/lib/resources/return_line_items.js +1 -1
  168. package/lib/resources/returns.d.ts +1 -72
  169. package/lib/resources/returns.js +1 -1
  170. package/lib/resources/shipments.d.ts +1 -89
  171. package/lib/resources/shipments.js +1 -1
  172. package/lib/resources/shipping_categories.d.ts +1 -33
  173. package/lib/resources/shipping_categories.js +1 -1
  174. package/lib/resources/shipping_methods.d.ts +1 -74
  175. package/lib/resources/shipping_methods.js +1 -1
  176. package/lib/resources/shipping_zones.d.ts +1 -48
  177. package/lib/resources/shipping_zones.js +1 -1
  178. package/lib/resources/sku_list_items.d.ts +1 -47
  179. package/lib/resources/sku_list_items.js +1 -1
  180. package/lib/resources/sku_list_promotion_rules.d.ts +1 -68
  181. package/lib/resources/sku_list_promotion_rules.js +1 -1
  182. package/lib/resources/sku_lists.d.ts +1 -49
  183. package/lib/resources/sku_lists.js +1 -1
  184. package/lib/resources/sku_options.d.ts +1 -56
  185. package/lib/resources/sku_options.js +1 -1
  186. package/lib/resources/skus.d.ts +1 -78
  187. package/lib/resources/skus.js +1 -1
  188. package/lib/resources/stock_items.d.ts +1 -49
  189. package/lib/resources/stock_items.js +1 -1
  190. package/lib/resources/stock_line_items.d.ts +1 -29
  191. package/lib/resources/stock_line_items.js +1 -1
  192. package/lib/resources/stock_locations.d.ts +1 -57
  193. package/lib/resources/stock_locations.js +1 -1
  194. package/lib/resources/stock_transfers.d.ts +1 -71
  195. package/lib/resources/stock_transfers.js +1 -1
  196. package/lib/resources/stripe_gateways.d.ts +1 -38
  197. package/lib/resources/stripe_gateways.js +1 -1
  198. package/lib/resources/stripe_payments.d.ts +1 -42
  199. package/lib/resources/stripe_payments.js +1 -1
  200. package/lib/resources/tax_calculators.d.ts +1 -27
  201. package/lib/resources/tax_calculators.js +1 -1
  202. package/lib/resources/tax_categories.d.ts +1 -59
  203. package/lib/resources/tax_categories.js +1 -1
  204. package/lib/resources/tax_rules.d.ts +1 -69
  205. package/lib/resources/tax_rules.js +1 -1
  206. package/lib/resources/taxjar_accounts.d.ts +1 -43
  207. package/lib/resources/taxjar_accounts.js +1 -1
  208. package/lib/resources/transactions.d.ts +1 -31
  209. package/lib/resources/transactions.js +1 -1
  210. package/lib/resources/voids.d.ts +1 -34
  211. package/lib/resources/voids.js +1 -1
  212. package/lib/resources/webhooks.d.ts +1 -42
  213. package/lib/resources/webhooks.js +1 -1
  214. package/lib/resources/wire_transfers.d.ts +1 -32
  215. package/lib/resources/wire_transfers.js +1 -1
  216. package/lib/static.d.ts +1 -6
  217. package/lib/static.js +1 -1
  218. package/lib/util.d.ts +1 -2
  219. package/package.json +19 -22
@@ -1,47 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { PaymentMethod } from './payment_methods';
4
- import { AdyenPayment } from './adyen_payments';
5
- declare type AdyenGatewayRel = ResourceRel & {
6
- type: typeof AdyenGateways.TYPE;
7
- };
8
- declare type AdyenPaymentRel = ResourceRel & {
9
- type: 'adyen_payments';
10
- };
11
- interface AdyenGateway extends Resource {
12
- name?: string;
13
- live_url_prefix?: string;
14
- payment_methods?: PaymentMethod[];
15
- adyen_payments?: AdyenPayment[];
16
- }
17
- interface AdyenGatewayCreate extends ResourceCreate {
18
- name: string;
19
- merchant_account: string;
20
- api_key: string;
21
- public_key?: string;
22
- live_url_prefix: string;
23
- adyen_payments?: AdyenPaymentRel[];
24
- }
25
- interface AdyenGatewayUpdate extends ResourceUpdate {
26
- name?: string;
27
- merchant_account?: string;
28
- api_key?: string;
29
- public_key?: string;
30
- live_url_prefix?: string;
31
- adyen_payments?: AdyenPaymentRel[];
32
- }
33
- declare class AdyenGateways extends ApiResource {
34
- static readonly TYPE: 'adyen_gateways';
35
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenGateway>>;
36
- create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
37
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
38
- update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
39
- delete(id: string, options?: ResourcesConfig): Promise<void>;
40
- payment_methods(adyenGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
41
- adyen_payments(adyenGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
42
- isAdyenGateway(resource: any): resource is AdyenGateway;
43
- relationship(id: string | ResourceId | null): AdyenGatewayRel;
44
- type(): string;
45
- }
46
- export default AdyenGateways;
47
- export { AdyenGateway, AdyenGatewayCreate, AdyenGatewayUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{AdyenPayment}from'./adyen_payments';declare type AdyenGatewayRel=ResourceRel&{type:typeof AdyenGateways.TYPE;};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};interface AdyenGateway extends Resource{name?:string;live_url_prefix?:string;payment_methods?:PaymentMethod[];adyen_payments?:AdyenPayment[];}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string;live_url_prefix:string;adyen_payments?:AdyenPaymentRel[];}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string;merchant_account?:string;api_key?:string;public_key?:string;live_url_prefix?:string;adyen_payments?:AdyenPaymentRel[];}declare class AdyenGateways extends ApiResource{static readonly TYPE:'adyen_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenGateway>>;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():string;}export default AdyenGateways;export{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate};
@@ -1 +1 @@
1
- import{ApiResource as y}from"../resource";class r extends y{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${e}/payment_methods`,t,s)}async adyen_payments(e,t,s){return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${e}/adyen_payments`,t,s)}isAdyenGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="adyen_gateways";export default r;
1
+ import{ApiResource as y}from"../resource";class r extends y{static TYPE="adyen_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${a}/payment_methods`,t,s)}async adyen_payments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${a}/adyen_payments`,t,s)}isAdyenGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1,44 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
4
- import { PaymentGateway } from './payment_gateways';
5
- declare type AdyenPaymentRel = ResourceRel & {
6
- type: typeof AdyenPayments.TYPE;
7
- };
8
- declare type OrderRel = ResourceRel & {
9
- type: 'orders';
10
- };
11
- interface AdyenPayment extends Resource {
12
- public_key?: string;
13
- payment_methods?: object;
14
- payment_request_data?: object;
15
- payment_request_details?: object;
16
- payment_response?: object;
17
- order?: Order;
18
- payment_gateway?: PaymentGateway;
19
- }
20
- interface AdyenPaymentCreate extends ResourceCreate {
21
- order: OrderRel;
22
- }
23
- interface AdyenPaymentUpdate extends ResourceUpdate {
24
- payment_request_data?: object;
25
- payment_request_details?: object;
26
- payment_response?: object;
27
- _details?: boolean;
28
- order?: OrderRel;
29
- }
30
- declare class AdyenPayments extends ApiResource {
31
- static readonly TYPE: 'adyen_payments';
32
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
33
- create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
34
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
35
- update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
36
- delete(id: string, options?: ResourcesConfig): Promise<void>;
37
- order(adyenPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
38
- payment_gateway(adyenPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
39
- isAdyenPayment(resource: any): resource is AdyenPayment;
40
- relationship(id: string | ResourceId | null): AdyenPaymentRel;
41
- type(): string;
42
- }
43
- export default AdyenPayments;
44
- export { AdyenPayment, AdyenPaymentCreate, AdyenPaymentUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type AdyenPaymentRel=ResourceRel&{type:typeof AdyenPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface AdyenPayment extends Resource{public_key?:string;payment_methods?:object;payment_request_data?:object;payment_request_details?:object;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:object;payment_request_details?:object;payment_response?:object;_details?:boolean;order?:OrderRel;}declare class AdyenPayments extends ApiResource{static readonly TYPE:'adyen_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():string;}export default AdyenPayments;export{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate};
@@ -1 +1 @@
1
- import{ApiResource as y}from"../resource";class r extends y{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`adyen_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${e}/payment_gateway`,t,s)}isAdyenPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="adyen_payments";export default r;
1
+ import{ApiResource as y}from"../resource";class r extends y{static TYPE="adyen_payments";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const a=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${a}/order`,t,s)}async payment_gateway(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${a}/payment_gateway`,t,s)}isAdyenPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1,21 +1 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel } from '../resource';
2
- import { QueryParamsRetrieve } from '../query';
3
- declare type ApplicationRel = ResourceRel & {
4
- type: typeof Applications.TYPE;
5
- };
6
- interface Application extends Resource {
7
- name?: string;
8
- kind?: string;
9
- public_access?: string;
10
- redirect_uri?: string;
11
- scopes?: string;
12
- }
13
- declare class Applications extends ApiResource {
14
- static readonly TYPE: 'application';
15
- retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Application>;
16
- isApplication(resource: any): resource is Application;
17
- relationship(id: string | ResourceId | null): ApplicationRel;
18
- type(): string;
19
- }
20
- export default Applications;
21
- export { Application };
1
+ import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';declare type ApplicationRel=ResourceRel&{type:typeof Applications.TYPE;};interface Application extends Resource{name?:string;kind?:string;public_access?:string;redirect_uri?:string;scopes?:string;}declare class Applications extends ApiResource{static readonly TYPE:'application';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Application>;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():string;}export default Applications;export{Application};
@@ -1 +1 @@
1
- import{ApiResource as p}from"../resource";class e extends p{async retrieve(t,i){return this.resources.singleton({type:e.TYPE},t,i)}isApplication(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="application";export default e;
1
+ import{ApiResource as r}from"../resource";class t extends r{static TYPE="application";async retrieve(e,i){return this.resources.singleton({type:t.TYPE},e,i)}isApplication(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1,156 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Bundle } from './bundles';
4
- import { CarrierAccount } from './carrier_accounts';
5
- import { CustomerGroup } from './customer_groups';
6
- import { Customer } from './customers';
7
- import { DeliveryLeadTime } from './delivery_lead_times';
8
- import { Geocoder } from './geocoders';
9
- import { GiftCardRecipient } from './gift_card_recipients';
10
- import { GiftCard } from './gift_cards';
11
- import { InventoryModel } from './inventory_models';
12
- import { Market } from './markets';
13
- import { Merchant } from './merchants';
14
- import { BillingInfoValidationRule } from './billing_info_validation_rules';
15
- import { Order } from './orders';
16
- import { Package } from './packages';
17
- import { Parcel } from './parcels';
18
- import { PaymentMethod } from './payment_methods';
19
- import { PriceList } from './price_lists';
20
- import { Price } from './prices';
21
- import { Promotion } from './promotions';
22
- import { Return } from './returns';
23
- import { Shipment } from './shipments';
24
- import { ShippingCategory } from './shipping_categories';
25
- import { ShippingMethod } from './shipping_methods';
26
- import { ShippingZone } from './shipping_zones';
27
- import { SkuOption } from './sku_options';
28
- import { Sku } from './skus';
29
- import { StockItem } from './stock_items';
30
- import { StockLocation } from './stock_locations';
31
- import { TaxCalculator } from './tax_calculators';
32
- import { TaxCategory } from './tax_categories';
33
- declare type AttachmentRel = ResourceRel & {
34
- type: typeof Attachments.TYPE;
35
- };
36
- declare type BundleRel = ResourceRel & {
37
- type: 'bundles';
38
- };
39
- declare type CarrierAccountRel = ResourceRel & {
40
- type: 'carrier_accounts';
41
- };
42
- declare type CustomerGroupRel = ResourceRel & {
43
- type: 'customer_groups';
44
- };
45
- declare type CustomerRel = ResourceRel & {
46
- type: 'customers';
47
- };
48
- declare type DeliveryLeadTimeRel = ResourceRel & {
49
- type: 'delivery_lead_times';
50
- };
51
- declare type GeocoderRel = ResourceRel & {
52
- type: 'geocoders';
53
- };
54
- declare type GiftCardRecipientRel = ResourceRel & {
55
- type: 'gift_card_recipients';
56
- };
57
- declare type GiftCardRel = ResourceRel & {
58
- type: 'gift_cards';
59
- };
60
- declare type InventoryModelRel = ResourceRel & {
61
- type: 'inventory_models';
62
- };
63
- declare type MarketRel = ResourceRel & {
64
- type: 'markets';
65
- };
66
- declare type MerchantRel = ResourceRel & {
67
- type: 'merchants';
68
- };
69
- declare type BillingInfoValidationRuleRel = ResourceRel & {
70
- type: 'billing_info_validation_rules';
71
- };
72
- declare type OrderRel = ResourceRel & {
73
- type: 'orders';
74
- };
75
- declare type PackageRel = ResourceRel & {
76
- type: 'packages';
77
- };
78
- declare type ParcelRel = ResourceRel & {
79
- type: 'parcels';
80
- };
81
- declare type PaymentMethodRel = ResourceRel & {
82
- type: 'payment_methods';
83
- };
84
- declare type PriceListRel = ResourceRel & {
85
- type: 'price_lists';
86
- };
87
- declare type PriceRel = ResourceRel & {
88
- type: 'prices';
89
- };
90
- declare type PromotionRel = ResourceRel & {
91
- type: 'promotions';
92
- };
93
- declare type ReturnRel = ResourceRel & {
94
- type: 'returns';
95
- };
96
- declare type ShipmentRel = ResourceRel & {
97
- type: 'shipments';
98
- };
99
- declare type ShippingCategoryRel = ResourceRel & {
100
- type: 'shipping_categories';
101
- };
102
- declare type ShippingMethodRel = ResourceRel & {
103
- type: 'shipping_methods';
104
- };
105
- declare type ShippingZoneRel = ResourceRel & {
106
- type: 'shipping_zones';
107
- };
108
- declare type SkuOptionRel = ResourceRel & {
109
- type: 'sku_options';
110
- };
111
- declare type SkuRel = ResourceRel & {
112
- type: 'skus';
113
- };
114
- declare type StockItemRel = ResourceRel & {
115
- type: 'stock_items';
116
- };
117
- declare type StockLocationRel = ResourceRel & {
118
- type: 'stock_locations';
119
- };
120
- declare type TaxCalculatorRel = ResourceRel & {
121
- type: 'tax_calculators';
122
- };
123
- declare type TaxCategoryRel = ResourceRel & {
124
- type: 'tax_categories';
125
- };
126
- interface Attachment extends Resource {
127
- name?: string;
128
- description?: string;
129
- url?: string;
130
- attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory;
131
- }
132
- interface AttachmentCreate extends ResourceCreate {
133
- name: string;
134
- description?: string;
135
- url?: string;
136
- attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
137
- }
138
- interface AttachmentUpdate extends ResourceUpdate {
139
- name?: string;
140
- description?: string;
141
- url?: string;
142
- attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
143
- }
144
- declare class Attachments extends ApiResource {
145
- static readonly TYPE: 'attachments';
146
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
147
- create(resource: AttachmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
148
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
149
- update(resource: AttachmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
150
- delete(id: string, options?: ResourcesConfig): Promise<void>;
151
- isAttachment(resource: any): resource is Attachment;
152
- relationship(id: string | ResourceId | null): AttachmentRel;
153
- type(): string;
154
- }
155
- export default Attachments;
156
- export { Attachment, AttachmentCreate, AttachmentUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';declare type AttachmentRel=ResourceRel&{type:typeof Attachments.TYPE;};declare type BundleRel=ResourceRel&{type:'bundles';};declare type CarrierAccountRel=ResourceRel&{type:'carrier_accounts';};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type DeliveryLeadTimeRel=ResourceRel&{type:'delivery_lead_times';};declare type GeocoderRel=ResourceRel&{type:'geocoders';};declare type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};declare type GiftCardRel=ResourceRel&{type:'gift_cards';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};declare type MarketRel=ResourceRel&{type:'markets';};declare type MerchantRel=ResourceRel&{type:'merchants';};declare type BillingInfoValidationRuleRel=ResourceRel&{type:'billing_info_validation_rules';};declare type OrderRel=ResourceRel&{type:'orders';};declare type PackageRel=ResourceRel&{type:'packages';};declare type ParcelRel=ResourceRel&{type:'parcels';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type PriceRel=ResourceRel&{type:'prices';};declare type PromotionRel=ResourceRel&{type:'promotions';};declare type ReturnRel=ResourceRel&{type:'returns';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};declare type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};declare type SkuOptionRel=ResourceRel&{type:'sku_options';};declare type SkuRel=ResourceRel&{type:'skus';};declare type StockItemRel=ResourceRel&{type:'stock_items';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface Attachment extends Resource{name?:string;description?:string;url?:string;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string;url?:string;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string;description?:string;url?:string;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}declare class Attachments extends ApiResource{static readonly TYPE:'attachments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():string;}export default Attachments;export{Attachment,AttachmentCreate,AttachmentUpdate};
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAttachment(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="attachments";export default t;
1
+ import{ApiResource as i}from"../resource";class t extends i{static TYPE="attachments";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAttachment(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1,57 +1 @@
1
- import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
4
- import { Capture } from './captures';
5
- import { Void } from './voids';
6
- declare type AuthorizationRel = ResourceRel & {
7
- type: typeof Authorizations.TYPE;
8
- };
9
- interface Authorization extends Resource {
10
- number?: string;
11
- currency_code?: string;
12
- amount_cents?: number;
13
- amount_float?: number;
14
- formatted_amount?: string;
15
- succeeded?: boolean;
16
- message?: string;
17
- error_code?: string;
18
- error_detail?: string;
19
- token?: string;
20
- gateway_transaction_id?: string;
21
- cvv_code?: string;
22
- cvv_message?: string;
23
- avs_code?: string;
24
- avs_message?: string;
25
- fraud_review?: string;
26
- capture_amount_cents?: number;
27
- capture_amount_float?: number;
28
- formatted_capture_amount?: string;
29
- capture_balance_cents?: number;
30
- capture_balance_float?: number;
31
- formatted_capture_balance?: string;
32
- void_balance_cents?: number;
33
- void_balance_float?: number;
34
- formatted_void_balance?: string;
35
- order?: Order;
36
- captures?: Capture[];
37
- voids?: Void[];
38
- }
39
- interface AuthorizationUpdate extends ResourceUpdate {
40
- _capture?: boolean;
41
- _capture_amount_cents?: number;
42
- _void?: boolean;
43
- }
44
- declare class Authorizations extends ApiResource {
45
- static readonly TYPE: 'authorizations';
46
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
47
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
48
- update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
49
- order(authorizationId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
50
- captures(authorizationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
51
- voids(authorizationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
52
- isAuthorization(resource: any): resource is Authorization;
53
- relationship(id: string | ResourceId | null): AuthorizationRel;
54
- type(): string;
55
- }
56
- export default Authorizations;
57
- export { Authorization, AuthorizationUpdate };
1
+ import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';declare type AuthorizationRel=ResourceRel&{type:typeof Authorizations.TYPE;};interface Authorization extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;cvv_code?:string;cvv_message?:string;avs_code?:string;avs_message?:string;fraud_review?:string;capture_amount_cents?:number;capture_amount_float?:number;formatted_capture_amount?:string;capture_balance_cents?:number;capture_balance_float?:number;formatted_capture_balance?:string;void_balance_cents?:number;void_balance_float?:number;formatted_void_balance?:string;order?:Order;captures?:Capture[];voids?:Void[];}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean;_capture_amount_cents?:number;_void?:boolean;}declare class Authorizations extends ApiResource{static readonly TYPE:'authorizations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():string;}export default Authorizations;export{Authorization,AuthorizationUpdate};
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async order(e,r,s){return this.resources.fetch({type:"orders"},`authorizations/${e}/order`,r,s)}async captures(e,r,s){return this.resources.fetch({type:"captures"},`authorizations/${e}/captures`,r,s)}async voids(e,r,s){return this.resources.fetch({type:"voids"},`authorizations/${e}/voids`,r,s)}isAuthorization(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="authorizations";export default t;
1
+ import{ApiResource as o}from"../resource";class s extends o{static TYPE="authorizations";async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update({...e,type:s.TYPE},r,t)}async order(e,r,t){const i=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${i}/order`,r,t)}async captures(e,r,t){const i=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${i}/captures`,r,t)}async voids(e,r,t){const i=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${i}/voids`,r,t)}isAuthorization(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1,52 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { TaxCategory } from './tax_categories';
4
- import { Market } from './markets';
5
- import { Attachment } from './attachments';
6
- declare type AvalaraAccountRel = ResourceRel & {
7
- type: typeof AvalaraAccounts.TYPE;
8
- };
9
- declare type TaxCategoryRel = ResourceRel & {
10
- type: 'tax_categories';
11
- };
12
- interface AvalaraAccount extends Resource {
13
- name?: string;
14
- username?: string;
15
- company_code?: string;
16
- ddp?: string;
17
- tax_categories?: TaxCategory[];
18
- markets?: Market[];
19
- attachments?: Attachment[];
20
- }
21
- interface AvalaraAccountCreate extends ResourceCreate {
22
- name: string;
23
- username: string;
24
- password: string;
25
- company_code: string;
26
- ddp?: string;
27
- tax_categories?: TaxCategoryRel[];
28
- }
29
- interface AvalaraAccountUpdate extends ResourceUpdate {
30
- name?: string;
31
- username?: string;
32
- password?: string;
33
- company_code?: string;
34
- ddp?: string;
35
- tax_categories?: TaxCategoryRel[];
36
- }
37
- declare class AvalaraAccounts extends ApiResource {
38
- static readonly TYPE: 'avalara_accounts';
39
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AvalaraAccount>>;
40
- create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
41
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
42
- update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
43
- delete(id: string, options?: ResourcesConfig): Promise<void>;
44
- tax_categories(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
45
- markets(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
46
- attachments(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
47
- isAvalaraAccount(resource: any): resource is AvalaraAccount;
48
- relationship(id: string | ResourceId | null): AvalaraAccountRel;
49
- type(): string;
50
- }
51
- export default AvalaraAccounts;
52
- export { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type AvalaraAccountRel=ResourceRel&{type:typeof AvalaraAccounts.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface AvalaraAccount extends Resource{name?:string;username?:string;company_code?:string;ddp?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}interface AvalaraAccountCreate extends ResourceCreate{name:string;username:string;password:string;company_code:string;ddp?:string;tax_categories?:TaxCategoryRel[];}interface AvalaraAccountUpdate extends ResourceUpdate{name?:string;username?:string;password?:string;company_code?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}declare class AvalaraAccounts extends ApiResource{static readonly TYPE:'avalara_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AvalaraAccount>>;create(resource:AvalaraAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;update(resource:AvalaraAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isAvalaraAccount(resource:any):resource is AvalaraAccount;relationship(id:string|ResourceId|null):AvalaraAccountRel;type():string;}export default AvalaraAccounts;export{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate};
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async tax_categories(e,t,s){return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${e}/tax_categories`,t,s)}async markets(e,t,s){return this.resources.fetch({type:"markets"},`avalara_accounts/${e}/markets`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`avalara_accounts/${e}/attachments`,t,s)}isAvalaraAccount(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="avalara_accounts";export default r;
1
+ import{ApiResource as c}from"../resource";class a extends c{static TYPE="avalara_accounts";async list(e,t){return this.resources.list({type:a.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:a.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:a.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:a.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:a.TYPE,id:e},t)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${r}/tax_categories`,t,s)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${r}/attachments`,t,s)}isAvalaraAccount(e){return e.type&&e.type===a.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:a.TYPE}:{id:e.id,type:a.TYPE}}type(){return a.TYPE}}export default a;
@@ -1,32 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Market } from './markets';
4
- declare type BillingInfoValidationRuleRel = ResourceRel & {
5
- type: typeof BillingInfoValidationRules.TYPE;
6
- };
7
- declare type MarketRel = ResourceRel & {
8
- type: 'markets';
9
- };
10
- interface BillingInfoValidationRule extends Resource {
11
- market?: Market;
12
- }
13
- interface BillingInfoValidationRuleCreate extends ResourceCreate {
14
- market: MarketRel;
15
- }
16
- interface BillingInfoValidationRuleUpdate extends ResourceUpdate {
17
- market?: MarketRel;
18
- }
19
- declare class BillingInfoValidationRules extends ApiResource {
20
- static readonly TYPE: 'billing_info_validation_rules';
21
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BillingInfoValidationRule>>;
22
- create(resource: BillingInfoValidationRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
23
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
24
- update(resource: BillingInfoValidationRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
25
- delete(id: string, options?: ResourcesConfig): Promise<void>;
26
- market(billingInfoValidationRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
27
- isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
28
- relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
29
- type(): string;
30
- }
31
- export default BillingInfoValidationRules;
32
- export { BillingInfoValidationRule, BillingInfoValidationRuleCreate, BillingInfoValidationRuleUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';declare type BillingInfoValidationRuleRel=ResourceRel&{type:typeof BillingInfoValidationRules.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};interface BillingInfoValidationRule extends Resource{market?:Market;}interface BillingInfoValidationRuleCreate extends ResourceCreate{market:MarketRel;}interface BillingInfoValidationRuleUpdate extends ResourceUpdate{market?:MarketRel;}declare class BillingInfoValidationRules extends ApiResource{static readonly TYPE:'billing_info_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BillingInfoValidationRule>>;create(resource:BillingInfoValidationRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;update(resource:BillingInfoValidationRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(billingInfoValidationRuleId:string|BillingInfoValidationRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isBillingInfoValidationRule(resource:any):resource is BillingInfoValidationRule;relationship(id:string|ResourceId|null):BillingInfoValidationRuleRel;type():string;}export default BillingInfoValidationRules;export{BillingInfoValidationRule,BillingInfoValidationRuleCreate,BillingInfoValidationRuleUpdate};
@@ -1 +1 @@
1
- import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,i){return this.resources.create({...e,type:r.TYPE},t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update({...e,type:r.TYPE},t,i)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async market(e,t,i){return this.resources.fetch({type:"markets"},`billing_info_validation_rules/${e}/market`,t,i)}isBillingInfoValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="billing_info_validation_rules";export default r;
1
+ import{ApiResource as n}from"../resource";class r extends n{static TYPE="billing_info_validation_rules";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,i){return this.resources.create({...e,type:r.TYPE},t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update({...e,type:r.TYPE},t,i)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async market(e,t,i){const s=e.id||e;return this.resources.fetch({type:"markets"},`billing_info_validation_rules/${s}/market`,t,i)}isBillingInfoValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1,35 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Address } from './addresses';
4
- import { Attachment } from './attachments';
5
- declare type BingGeocoderRel = ResourceRel & {
6
- type: typeof BingGeocoders.TYPE;
7
- };
8
- interface BingGeocoder extends Resource {
9
- name?: string;
10
- addresses?: Address[];
11
- attachments?: Attachment[];
12
- }
13
- interface BingGeocoderCreate extends ResourceCreate {
14
- name: string;
15
- key: string;
16
- }
17
- interface BingGeocoderUpdate extends ResourceUpdate {
18
- name?: string;
19
- key?: string;
20
- }
21
- declare class BingGeocoders extends ApiResource {
22
- static readonly TYPE: 'bing_geocoders';
23
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BingGeocoder>>;
24
- create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
25
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
26
- update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
27
- delete(id: string, options?: ResourcesConfig): Promise<void>;
28
- addresses(bingGeocoderId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Address>>;
29
- attachments(bingGeocoderId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
30
- isBingGeocoder(resource: any): resource is BingGeocoder;
31
- relationship(id: string | ResourceId | null): BingGeocoderRel;
32
- type(): string;
33
- }
34
- export default BingGeocoders;
35
- export { BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';declare type BingGeocoderRel=ResourceRel&{type:typeof BingGeocoders.TYPE;};interface BingGeocoder extends Resource{name?:string;addresses?:Address[];attachments?:Attachment[];}interface BingGeocoderCreate extends ResourceCreate{name:string;key:string;}interface BingGeocoderUpdate extends ResourceUpdate{name?:string;key?:string;}declare class BingGeocoders extends ApiResource{static readonly TYPE:'bing_geocoders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BingGeocoder>>;create(resource:BingGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;update(resource:BingGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;delete(id:string,options?:ResourcesConfig):Promise<void>;addresses(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBingGeocoder(resource:any):resource is BingGeocoder;relationship(id:string|ResourceId|null):BingGeocoderRel;type():string;}export default BingGeocoders;export{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate};
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async addresses(e,t,r){return this.resources.fetch({type:"addresses"},`bing_geocoders/${e}/addresses`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`bing_geocoders/${e}/attachments`,t,r)}isBingGeocoder(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="bing_geocoders";export default s;
1
+ import{ApiResource as i}from"../resource";class s extends i{static TYPE="bing_geocoders";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async addresses(e,t,r){const c=e.id||e;return this.resources.fetch({type:"addresses"},`bing_geocoders/${c}/addresses`,t,r)}async attachments(e,t,r){const c=e.id||e;return this.resources.fetch({type:"attachments"},`bing_geocoders/${c}/attachments`,t,r)}isBingGeocoder(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1,56 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { PaymentMethod } from './payment_methods';
4
- import { BraintreePayment } from './braintree_payments';
5
- declare type BraintreeGatewayRel = ResourceRel & {
6
- type: typeof BraintreeGateways.TYPE;
7
- };
8
- declare type BraintreePaymentRel = ResourceRel & {
9
- type: 'braintree_payments';
10
- };
11
- interface BraintreeGateway extends Resource {
12
- name?: string;
13
- descriptor_name?: string;
14
- descriptor_phone?: string;
15
- descriptor_url?: string;
16
- webhook_endpoint_url?: string;
17
- payment_methods?: PaymentMethod[];
18
- braintree_payments?: BraintreePayment[];
19
- }
20
- interface BraintreeGatewayCreate extends ResourceCreate {
21
- name: string;
22
- merchant_account_id: string;
23
- merchant_id: string;
24
- public_key: string;
25
- private_key: string;
26
- descriptor_name?: string;
27
- descriptor_phone?: string;
28
- descriptor_url?: string;
29
- braintree_payments?: BraintreePaymentRel[];
30
- }
31
- interface BraintreeGatewayUpdate extends ResourceUpdate {
32
- name?: string;
33
- merchant_account_id?: string;
34
- merchant_id?: string;
35
- public_key?: string;
36
- private_key?: string;
37
- descriptor_name?: string;
38
- descriptor_phone?: string;
39
- descriptor_url?: string;
40
- braintree_payments?: BraintreePaymentRel[];
41
- }
42
- declare class BraintreeGateways extends ApiResource {
43
- static readonly TYPE: 'braintree_gateways';
44
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreeGateway>>;
45
- create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
46
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
47
- update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
48
- delete(id: string, options?: ResourcesConfig): Promise<void>;
49
- payment_methods(braintreeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
50
- braintree_payments(braintreeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
51
- isBraintreeGateway(resource: any): resource is BraintreeGateway;
52
- relationship(id: string | ResourceId | null): BraintreeGatewayRel;
53
- type(): string;
54
- }
55
- export default BraintreeGateways;
56
- export { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{BraintreePayment}from'./braintree_payments';declare type BraintreeGatewayRel=ResourceRel&{type:typeof BraintreeGateways.TYPE;};declare type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};interface BraintreeGateway extends Resource{name?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];braintree_payments?:BraintreePayment[];}interface BraintreeGatewayCreate extends ResourceCreate{name:string;merchant_account_id:string;merchant_id:string;public_key:string;private_key:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}interface BraintreeGatewayUpdate extends ResourceUpdate{name?:string;merchant_account_id?:string;merchant_id?:string;public_key?:string;private_key?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}declare class BraintreeGateways extends ApiResource{static readonly TYPE:'braintree_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreeGateway>>;create(resource:BraintreeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;update(resource:BraintreeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;braintree_payments(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;isBraintreeGateway(resource:any):resource is BraintreeGateway;relationship(id:string|ResourceId|null):BraintreeGatewayRel;type():string;}export default BraintreeGateways;export{BraintreeGateway,BraintreeGatewayCreate,BraintreeGatewayUpdate};
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){return this.resources.fetch({type:"payment_methods"},`braintree_gateways/${e}/payment_methods`,t,s)}async braintree_payments(e,t,s){return this.resources.fetch({type:"braintree_payments"},`braintree_gateways/${e}/braintree_payments`,t,s)}isBraintreeGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="braintree_gateways";export default r;
1
+ import{ApiResource as n}from"../resource";class r extends n{static TYPE="braintree_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`braintree_gateways/${a}/payment_methods`,t,s)}async braintree_payments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"braintree_payments"},`braintree_gateways/${a}/braintree_payments`,t,s)}isBraintreeGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;