@lshay-provider/stripe 0.0.0-stage → 0.3.0

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 (231) hide show
  1. package/README.md +3 -3
  2. package/bin/applePayDomain.d.ts +64 -0
  3. package/bin/applePayDomain.d.ts.map +1 -0
  4. package/bin/applePayDomain.js +81 -0
  5. package/bin/applePayDomain.js.map +1 -0
  6. package/bin/billingAlert.d.ts +99 -0
  7. package/bin/billingAlert.d.ts.map +1 -0
  8. package/bin/billingAlert.js +88 -0
  9. package/bin/billingAlert.js.map +1 -0
  10. package/bin/billingCreditGrant.d.ts +195 -0
  11. package/bin/billingCreditGrant.d.ts.map +1 -0
  12. package/bin/billingCreditGrant.js +108 -0
  13. package/bin/billingCreditGrant.js.map +1 -0
  14. package/bin/billingMeter.d.ts +126 -0
  15. package/bin/billingMeter.d.ts.map +1 -0
  16. package/bin/billingMeter.js +100 -0
  17. package/bin/billingMeter.js.map +1 -0
  18. package/bin/billingPortalConfiguration.d.ts +142 -0
  19. package/bin/billingPortalConfiguration.d.ts.map +1 -0
  20. package/bin/billingPortalConfiguration.js +97 -0
  21. package/bin/billingPortalConfiguration.js.map +1 -0
  22. package/bin/charge.d.ts +488 -0
  23. package/bin/charge.d.ts.map +1 -0
  24. package/bin/charge.js +166 -0
  25. package/bin/charge.js.map +1 -0
  26. package/bin/climateOrder.d.ts +239 -0
  27. package/bin/climateOrder.d.ts.map +1 -0
  28. package/bin/climateOrder.js +119 -0
  29. package/bin/climateOrder.js.map +1 -0
  30. package/bin/config/index.d.ts +2 -0
  31. package/bin/config/index.d.ts.map +1 -0
  32. package/bin/config/index.js +21 -0
  33. package/bin/config/index.js.map +1 -0
  34. package/bin/config/vars.d.ts +9 -0
  35. package/bin/config/vars.d.ts.map +1 -0
  36. package/bin/config/vars.js +42 -0
  37. package/bin/config/vars.js.map +1 -0
  38. package/bin/coupon.d.ts +208 -0
  39. package/bin/coupon.d.ts.map +1 -0
  40. package/bin/coupon.js +102 -0
  41. package/bin/coupon.js.map +1 -0
  42. package/bin/creditNote.d.ts +366 -0
  43. package/bin/creditNote.d.ts.map +1 -0
  44. package/bin/creditNote.js +141 -0
  45. package/bin/creditNote.js.map +1 -0
  46. package/bin/customer.d.ts +376 -0
  47. package/bin/customer.d.ts.map +1 -0
  48. package/bin/customer.js +134 -0
  49. package/bin/customer.js.map +1 -0
  50. package/bin/customerBalanceTransaction.d.ts +167 -0
  51. package/bin/customerBalanceTransaction.d.ts.map +1 -0
  52. package/bin/customerBalanceTransaction.js +105 -0
  53. package/bin/customerBalanceTransaction.js.map +1 -0
  54. package/bin/entitlementsFeature.d.ts +103 -0
  55. package/bin/entitlementsFeature.d.ts.map +1 -0
  56. package/bin/entitlementsFeature.js +85 -0
  57. package/bin/entitlementsFeature.js.map +1 -0
  58. package/bin/file.d.ts +145 -0
  59. package/bin/file.d.ts.map +1 -0
  60. package/bin/file.js +100 -0
  61. package/bin/file.js.map +1 -0
  62. package/bin/fileLink.d.ts +119 -0
  63. package/bin/fileLink.d.ts.map +1 -0
  64. package/bin/fileLink.js +89 -0
  65. package/bin/fileLink.js.map +1 -0
  66. package/bin/index.d.ts +152 -0
  67. package/bin/index.d.ts.map +1 -0
  68. package/bin/index.js +305 -0
  69. package/bin/index.js.map +1 -0
  70. package/bin/invoice.d.ts +785 -0
  71. package/bin/invoice.d.ts.map +1 -0
  72. package/bin/invoice.js +230 -0
  73. package/bin/invoice.js.map +1 -0
  74. package/bin/invoiceItem.d.ts +326 -0
  75. package/bin/invoiceItem.d.ts.map +1 -0
  76. package/bin/invoiceItem.js +122 -0
  77. package/bin/invoiceItem.js.map +1 -0
  78. package/bin/issuingCard.d.ts +305 -0
  79. package/bin/issuingCard.d.ts.map +1 -0
  80. package/bin/issuingCard.js +128 -0
  81. package/bin/issuingCard.js.map +1 -0
  82. package/bin/issuingCardholder.d.ts +197 -0
  83. package/bin/issuingCardholder.d.ts.map +1 -0
  84. package/bin/issuingCardholder.js +103 -0
  85. package/bin/issuingCardholder.js.map +1 -0
  86. package/bin/issuingDispute.d.ts +144 -0
  87. package/bin/issuingDispute.d.ts.map +1 -0
  88. package/bin/issuingDispute.js +92 -0
  89. package/bin/issuingDispute.js.map +1 -0
  90. package/bin/issuingPersonalizationDesign.d.ts +169 -0
  91. package/bin/issuingPersonalizationDesign.d.ts.map +1 -0
  92. package/bin/issuingPersonalizationDesign.js +101 -0
  93. package/bin/issuingPersonalizationDesign.js.map +1 -0
  94. package/bin/package.json +35 -0
  95. package/bin/paymentIntent.d.ts +646 -0
  96. package/bin/paymentIntent.d.ts.map +1 -0
  97. package/bin/paymentIntent.js +180 -0
  98. package/bin/paymentIntent.js.map +1 -0
  99. package/bin/paymentLink.d.ts +407 -0
  100. package/bin/paymentLink.d.ts.map +1 -0
  101. package/bin/paymentLink.js +145 -0
  102. package/bin/paymentLink.js.map +1 -0
  103. package/bin/paymentMethod.d.ts +215 -0
  104. package/bin/paymentMethod.d.ts.map +1 -0
  105. package/bin/paymentMethod.js +138 -0
  106. package/bin/paymentMethod.js.map +1 -0
  107. package/bin/paymentMethodConfiguration.d.ts +296 -0
  108. package/bin/paymentMethodConfiguration.d.ts.map +1 -0
  109. package/bin/paymentMethodConfiguration.js +204 -0
  110. package/bin/paymentMethodConfiguration.js.map +1 -0
  111. package/bin/paymentMethodDomain.d.ts +135 -0
  112. package/bin/paymentMethodDomain.d.ts.map +1 -0
  113. package/bin/paymentMethodDomain.js +95 -0
  114. package/bin/paymentMethodDomain.js.map +1 -0
  115. package/bin/person.d.ts +410 -0
  116. package/bin/person.d.ts.map +1 -0
  117. package/bin/person.js +147 -0
  118. package/bin/person.js.map +1 -0
  119. package/bin/plan.d.ts +261 -0
  120. package/bin/plan.d.ts.map +1 -0
  121. package/bin/plan.js +114 -0
  122. package/bin/plan.js.map +1 -0
  123. package/bin/price.d.ts +296 -0
  124. package/bin/price.d.ts.map +1 -0
  125. package/bin/price.js +119 -0
  126. package/bin/price.js.map +1 -0
  127. package/bin/product.d.ts +253 -0
  128. package/bin/product.d.ts.map +1 -0
  129. package/bin/product.js +108 -0
  130. package/bin/product.js.map +1 -0
  131. package/bin/productFeature.d.ts +71 -0
  132. package/bin/productFeature.d.ts.map +1 -0
  133. package/bin/productFeature.js +84 -0
  134. package/bin/productFeature.js.map +1 -0
  135. package/bin/promotionCode.d.ts +167 -0
  136. package/bin/promotionCode.d.ts.map +1 -0
  137. package/bin/promotionCode.js +96 -0
  138. package/bin/promotionCode.js.map +1 -0
  139. package/bin/provider.d.ts +60 -0
  140. package/bin/provider.d.ts.map +1 -0
  141. package/bin/provider.js +80 -0
  142. package/bin/provider.js.map +1 -0
  143. package/bin/quote.d.ts +342 -0
  144. package/bin/quote.d.ts.map +1 -0
  145. package/bin/quote.js +134 -0
  146. package/bin/quote.js.map +1 -0
  147. package/bin/radarValueList.d.ts +123 -0
  148. package/bin/radarValueList.d.ts.map +1 -0
  149. package/bin/radarValueList.js +89 -0
  150. package/bin/radarValueList.js.map +1 -0
  151. package/bin/radarValueListItem.d.ts +93 -0
  152. package/bin/radarValueListItem.d.ts.map +1 -0
  153. package/bin/radarValueListItem.js +88 -0
  154. package/bin/radarValueListItem.js.map +1 -0
  155. package/bin/setupIntent.d.ts +476 -0
  156. package/bin/setupIntent.d.ts.map +1 -0
  157. package/bin/setupIntent.js +142 -0
  158. package/bin/setupIntent.js.map +1 -0
  159. package/bin/shippingRate.d.ts +156 -0
  160. package/bin/shippingRate.d.ts.map +1 -0
  161. package/bin/shippingRate.js +95 -0
  162. package/bin/shippingRate.js.map +1 -0
  163. package/bin/source.d.ts +295 -0
  164. package/bin/source.d.ts.map +1 -0
  165. package/bin/source.js +154 -0
  166. package/bin/source.js.map +1 -0
  167. package/bin/subscription.d.ts +634 -0
  168. package/bin/subscription.d.ts.map +1 -0
  169. package/bin/subscription.js +178 -0
  170. package/bin/subscription.js.map +1 -0
  171. package/bin/subscriptionItem.d.ts +277 -0
  172. package/bin/subscriptionItem.d.ts.map +1 -0
  173. package/bin/subscriptionItem.js +109 -0
  174. package/bin/subscriptionItem.js.map +1 -0
  175. package/bin/subscriptionSchedule.d.ts +243 -0
  176. package/bin/subscriptionSchedule.d.ts.map +1 -0
  177. package/bin/subscriptionSchedule.js +114 -0
  178. package/bin/subscriptionSchedule.js.map +1 -0
  179. package/bin/taxId.d.ts +131 -0
  180. package/bin/taxId.d.ts.map +1 -0
  181. package/bin/taxId.js +99 -0
  182. package/bin/taxId.js.map +1 -0
  183. package/bin/taxRate.d.ts +225 -0
  184. package/bin/taxRate.d.ts.map +1 -0
  185. package/bin/taxRate.js +113 -0
  186. package/bin/taxRate.js.map +1 -0
  187. package/bin/taxRegistration.d.ts +110 -0
  188. package/bin/taxRegistration.d.ts.map +1 -0
  189. package/bin/taxRegistration.js +95 -0
  190. package/bin/taxRegistration.js.map +1 -0
  191. package/bin/terminalConfiguration.d.ts +117 -0
  192. package/bin/terminalConfiguration.d.ts.map +1 -0
  193. package/bin/terminalConfiguration.js +106 -0
  194. package/bin/terminalConfiguration.js.map +1 -0
  195. package/bin/terminalLocation.d.ts +139 -0
  196. package/bin/terminalLocation.d.ts.map +1 -0
  197. package/bin/terminalLocation.js +90 -0
  198. package/bin/terminalLocation.js.map +1 -0
  199. package/bin/terminalReader.d.ts +160 -0
  200. package/bin/terminalReader.d.ts.map +1 -0
  201. package/bin/terminalReader.js +99 -0
  202. package/bin/terminalReader.js.map +1 -0
  203. package/bin/treasuryFinancialAccount.d.ts +195 -0
  204. package/bin/treasuryFinancialAccount.d.ts.map +1 -0
  205. package/bin/treasuryFinancialAccount.js +109 -0
  206. package/bin/treasuryFinancialAccount.js.map +1 -0
  207. package/bin/types/index.d.ts +4 -0
  208. package/bin/types/index.d.ts.map +1 -0
  209. package/bin/types/index.js +34 -0
  210. package/bin/types/index.js.map +1 -0
  211. package/bin/types/input.d.ts +16586 -0
  212. package/bin/types/input.d.ts.map +1 -0
  213. package/bin/types/input.js +5 -0
  214. package/bin/types/input.js.map +1 -0
  215. package/bin/types/output.d.ts +16585 -0
  216. package/bin/types/output.d.ts.map +1 -0
  217. package/bin/types/output.js +5 -0
  218. package/bin/types/output.js.map +1 -0
  219. package/bin/utilities.d.ts +6 -0
  220. package/bin/utilities.d.ts.map +1 -0
  221. package/bin/utilities.js +152 -0
  222. package/bin/utilities.js.map +1 -0
  223. package/bin/v2coreEventDestination.d.ts +252 -0
  224. package/bin/v2coreEventDestination.d.ts.map +1 -0
  225. package/bin/v2coreEventDestination.js +117 -0
  226. package/bin/v2coreEventDestination.js.map +1 -0
  227. package/bin/webhookEndpoint.d.ts +163 -0
  228. package/bin/webhookEndpoint.d.ts.map +1 -0
  229. package/bin/webhookEndpoint.js +102 -0
  230. package/bin/webhookEndpoint.js.map +1 -0
  231. package/package.json +32 -3
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ const pulumi = __importStar(require("@pulumi/pulumi"));
29
+ const __config = new pulumi.Config("stripe");
30
+ Object.defineProperty(exports, "apiKey", {
31
+ get() {
32
+ return __config.get("apiKey");
33
+ },
34
+ enumerable: true,
35
+ });
36
+ Object.defineProperty(exports, "stripeAccount", {
37
+ get() {
38
+ return __config.get("stripeAccount");
39
+ },
40
+ enumerable: true,
41
+ });
42
+ //# sourceMappingURL=vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAIzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAM7C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;IACrC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE;IAC5C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
@@ -0,0 +1,208 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ export declare class Coupon extends pulumi.CustomResource {
5
+ /**
6
+ * Get an existing Coupon resource's state with the given name, ID, and optional extra
7
+ * properties used to qualify the lookup.
8
+ *
9
+ * @param name The _unique_ name of the resulting resource.
10
+ * @param id The _unique_ provider ID of the resource to lookup.
11
+ * @param state Any extra arguments used during the lookup.
12
+ * @param opts Optional settings to control the behavior of the CustomResource.
13
+ */
14
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CouponState, opts?: pulumi.CustomResourceOptions): Coupon;
15
+ /**
16
+ * Returns true if the given object is an instance of Coupon. This is designed to work even
17
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
18
+ */
19
+ static isInstance(obj: any): obj is Coupon;
20
+ /**
21
+ * Amount (in the <span pulumi-lang-nodejs="`currency`" pulumi-lang-dotnet="`Currency`" pulumi-lang-go="`currency`" pulumi-lang-python="`currency`" pulumi-lang-yaml="`currency`" pulumi-lang-java="`currency`" pulumi-lang-hcl="`currency`">`currency`</span> specified) that will be taken off the subtotal of any invoices for this customer.
22
+ */
23
+ readonly amountOff: pulumi.Output<number>;
24
+ readonly appliesTos: pulumi.Output<outputs.CouponAppliesTo[] | undefined>;
25
+ /**
26
+ * Time at which the object was created. Measured in seconds since the Unix epoch.
27
+ */
28
+ readonly created: pulumi.Output<number>;
29
+ /**
30
+ * If <span pulumi-lang-nodejs="`amountOff`" pulumi-lang-dotnet="`AmountOff`" pulumi-lang-go="`amountOff`" pulumi-lang-python="`amount_off`" pulumi-lang-yaml="`amountOff`" pulumi-lang-java="`amountOff`" pulumi-lang-hcl="`amount_off`">`amountOff`</span> has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
31
+ */
32
+ readonly currency: pulumi.Output<string>;
33
+ /**
34
+ * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
35
+ */
36
+ readonly currencyOptions: pulumi.Output<outputs.CouponCurrencyOption[] | undefined>;
37
+ /**
38
+ * One of <span pulumi-lang-nodejs="`forever`" pulumi-lang-dotnet="`Forever`" pulumi-lang-go="`forever`" pulumi-lang-python="`forever`" pulumi-lang-yaml="`forever`" pulumi-lang-java="`forever`" pulumi-lang-hcl="`forever`">`forever`</span>, <span pulumi-lang-nodejs="`once`" pulumi-lang-dotnet="`Once`" pulumi-lang-go="`once`" pulumi-lang-python="`once`" pulumi-lang-yaml="`once`" pulumi-lang-java="`once`" pulumi-lang-hcl="`once`">`once`</span>, or <span pulumi-lang-nodejs="`repeating`" pulumi-lang-dotnet="`Repeating`" pulumi-lang-go="`repeating`" pulumi-lang-python="`repeating`" pulumi-lang-yaml="`repeating`" pulumi-lang-java="`repeating`" pulumi-lang-hcl="`repeating`">`repeating`</span>. Describes how long a customer who applies this coupon will get the discount.
39
+ */
40
+ readonly duration: pulumi.Output<string>;
41
+ /**
42
+ * If <span pulumi-lang-nodejs="`duration`" pulumi-lang-dotnet="`Duration`" pulumi-lang-go="`duration`" pulumi-lang-python="`duration`" pulumi-lang-yaml="`duration`" pulumi-lang-java="`duration`" pulumi-lang-hcl="`duration`">`duration`</span> is <span pulumi-lang-nodejs="`repeating`" pulumi-lang-dotnet="`Repeating`" pulumi-lang-go="`repeating`" pulumi-lang-python="`repeating`" pulumi-lang-yaml="`repeating`" pulumi-lang-java="`repeating`" pulumi-lang-hcl="`repeating`">`repeating`</span>, the number of months the coupon applies. Null if coupon <span pulumi-lang-nodejs="`duration`" pulumi-lang-dotnet="`Duration`" pulumi-lang-go="`duration`" pulumi-lang-python="`duration`" pulumi-lang-yaml="`duration`" pulumi-lang-java="`duration`" pulumi-lang-hcl="`duration`">`duration`</span> is <span pulumi-lang-nodejs="`forever`" pulumi-lang-dotnet="`Forever`" pulumi-lang-go="`forever`" pulumi-lang-python="`forever`" pulumi-lang-yaml="`forever`" pulumi-lang-java="`forever`" pulumi-lang-hcl="`forever`">`forever`</span> or <span pulumi-lang-nodejs="`once`" pulumi-lang-dotnet="`Once`" pulumi-lang-go="`once`" pulumi-lang-python="`once`" pulumi-lang-yaml="`once`" pulumi-lang-java="`once`" pulumi-lang-hcl="`once`">`once`</span>.
43
+ */
44
+ readonly durationInMonths: pulumi.Output<number>;
45
+ /**
46
+ * If the object exists in live mode, the value is <span pulumi-lang-nodejs="`true`" pulumi-lang-dotnet="`True`" pulumi-lang-go="`true`" pulumi-lang-python="`true`" pulumi-lang-yaml="`true`" pulumi-lang-java="`true`" pulumi-lang-hcl="`true`">`true`</span>. If the object exists in test mode, the value is <span pulumi-lang-nodejs="`false`" pulumi-lang-dotnet="`False`" pulumi-lang-go="`false`" pulumi-lang-python="`false`" pulumi-lang-yaml="`false`" pulumi-lang-java="`false`" pulumi-lang-hcl="`false`">`false`</span>.
47
+ */
48
+ readonly livemode: pulumi.Output<boolean>;
49
+ /**
50
+ * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
51
+ */
52
+ readonly maxRedemptions: pulumi.Output<number>;
53
+ /**
54
+ * Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
55
+ */
56
+ readonly metadata: pulumi.Output<{
57
+ [key: string]: string;
58
+ }>;
59
+ /**
60
+ * Name of the coupon displayed to customers on for instance invoices or receipts.
61
+ */
62
+ readonly name: pulumi.Output<string>;
63
+ /**
64
+ * String representing the object's type. Objects of the same type share the same value.
65
+ */
66
+ readonly object: pulumi.Output<string>;
67
+ /**
68
+ * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with<span pulumi-lang-nodejs=" percentOff " pulumi-lang-dotnet=" PercentOff " pulumi-lang-go=" percentOff " pulumi-lang-python=" percent_off " pulumi-lang-yaml=" percentOff " pulumi-lang-java=" percentOff " pulumi-lang-hcl=" percent_off "> percentOff </span>of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
69
+ */
70
+ readonly percentOff: pulumi.Output<number>;
71
+ /**
72
+ * Date after which the coupon can no longer be redeemed.
73
+ */
74
+ readonly redeemBy: pulumi.Output<number>;
75
+ /**
76
+ * Number of times this coupon has been applied to a customer.
77
+ */
78
+ readonly timesRedeemed: pulumi.Output<number>;
79
+ /**
80
+ * Taking account of the above properties, whether this coupon can still be applied to a customer.
81
+ */
82
+ readonly valid: pulumi.Output<boolean>;
83
+ /**
84
+ * Create a Coupon resource with the given unique name, arguments, and options.
85
+ *
86
+ * @param name The _unique_ name of the resource.
87
+ * @param args The arguments to use to populate this resource's properties.
88
+ * @param opts A bag of options that control this resource's behavior.
89
+ */
90
+ constructor(name: string, args?: CouponArgs, opts?: pulumi.CustomResourceOptions);
91
+ }
92
+ /**
93
+ * Input properties used for looking up and filtering Coupon resources.
94
+ */
95
+ export interface CouponState {
96
+ /**
97
+ * Amount (in the <span pulumi-lang-nodejs="`currency`" pulumi-lang-dotnet="`Currency`" pulumi-lang-go="`currency`" pulumi-lang-python="`currency`" pulumi-lang-yaml="`currency`" pulumi-lang-java="`currency`" pulumi-lang-hcl="`currency`">`currency`</span> specified) that will be taken off the subtotal of any invoices for this customer.
98
+ */
99
+ amountOff?: pulumi.Input<number>;
100
+ appliesTos?: pulumi.Input<pulumi.Input<inputs.CouponAppliesTo>[]>;
101
+ /**
102
+ * Time at which the object was created. Measured in seconds since the Unix epoch.
103
+ */
104
+ created?: pulumi.Input<number>;
105
+ /**
106
+ * If <span pulumi-lang-nodejs="`amountOff`" pulumi-lang-dotnet="`AmountOff`" pulumi-lang-go="`amountOff`" pulumi-lang-python="`amount_off`" pulumi-lang-yaml="`amountOff`" pulumi-lang-java="`amountOff`" pulumi-lang-hcl="`amount_off`">`amountOff`</span> has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
107
+ */
108
+ currency?: pulumi.Input<string>;
109
+ /**
110
+ * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
111
+ */
112
+ currencyOptions?: pulumi.Input<pulumi.Input<inputs.CouponCurrencyOption>[]>;
113
+ /**
114
+ * One of <span pulumi-lang-nodejs="`forever`" pulumi-lang-dotnet="`Forever`" pulumi-lang-go="`forever`" pulumi-lang-python="`forever`" pulumi-lang-yaml="`forever`" pulumi-lang-java="`forever`" pulumi-lang-hcl="`forever`">`forever`</span>, <span pulumi-lang-nodejs="`once`" pulumi-lang-dotnet="`Once`" pulumi-lang-go="`once`" pulumi-lang-python="`once`" pulumi-lang-yaml="`once`" pulumi-lang-java="`once`" pulumi-lang-hcl="`once`">`once`</span>, or <span pulumi-lang-nodejs="`repeating`" pulumi-lang-dotnet="`Repeating`" pulumi-lang-go="`repeating`" pulumi-lang-python="`repeating`" pulumi-lang-yaml="`repeating`" pulumi-lang-java="`repeating`" pulumi-lang-hcl="`repeating`">`repeating`</span>. Describes how long a customer who applies this coupon will get the discount.
115
+ */
116
+ duration?: pulumi.Input<string>;
117
+ /**
118
+ * If <span pulumi-lang-nodejs="`duration`" pulumi-lang-dotnet="`Duration`" pulumi-lang-go="`duration`" pulumi-lang-python="`duration`" pulumi-lang-yaml="`duration`" pulumi-lang-java="`duration`" pulumi-lang-hcl="`duration`">`duration`</span> is <span pulumi-lang-nodejs="`repeating`" pulumi-lang-dotnet="`Repeating`" pulumi-lang-go="`repeating`" pulumi-lang-python="`repeating`" pulumi-lang-yaml="`repeating`" pulumi-lang-java="`repeating`" pulumi-lang-hcl="`repeating`">`repeating`</span>, the number of months the coupon applies. Null if coupon <span pulumi-lang-nodejs="`duration`" pulumi-lang-dotnet="`Duration`" pulumi-lang-go="`duration`" pulumi-lang-python="`duration`" pulumi-lang-yaml="`duration`" pulumi-lang-java="`duration`" pulumi-lang-hcl="`duration`">`duration`</span> is <span pulumi-lang-nodejs="`forever`" pulumi-lang-dotnet="`Forever`" pulumi-lang-go="`forever`" pulumi-lang-python="`forever`" pulumi-lang-yaml="`forever`" pulumi-lang-java="`forever`" pulumi-lang-hcl="`forever`">`forever`</span> or <span pulumi-lang-nodejs="`once`" pulumi-lang-dotnet="`Once`" pulumi-lang-go="`once`" pulumi-lang-python="`once`" pulumi-lang-yaml="`once`" pulumi-lang-java="`once`" pulumi-lang-hcl="`once`">`once`</span>.
119
+ */
120
+ durationInMonths?: pulumi.Input<number>;
121
+ /**
122
+ * If the object exists in live mode, the value is <span pulumi-lang-nodejs="`true`" pulumi-lang-dotnet="`True`" pulumi-lang-go="`true`" pulumi-lang-python="`true`" pulumi-lang-yaml="`true`" pulumi-lang-java="`true`" pulumi-lang-hcl="`true`">`true`</span>. If the object exists in test mode, the value is <span pulumi-lang-nodejs="`false`" pulumi-lang-dotnet="`False`" pulumi-lang-go="`false`" pulumi-lang-python="`false`" pulumi-lang-yaml="`false`" pulumi-lang-java="`false`" pulumi-lang-hcl="`false`">`false`</span>.
123
+ */
124
+ livemode?: pulumi.Input<boolean>;
125
+ /**
126
+ * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
127
+ */
128
+ maxRedemptions?: pulumi.Input<number>;
129
+ /**
130
+ * Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
131
+ */
132
+ metadata?: pulumi.Input<{
133
+ [key: string]: pulumi.Input<string>;
134
+ }>;
135
+ /**
136
+ * Name of the coupon displayed to customers on for instance invoices or receipts.
137
+ */
138
+ name?: pulumi.Input<string>;
139
+ /**
140
+ * String representing the object's type. Objects of the same type share the same value.
141
+ */
142
+ object?: pulumi.Input<string>;
143
+ /**
144
+ * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with<span pulumi-lang-nodejs=" percentOff " pulumi-lang-dotnet=" PercentOff " pulumi-lang-go=" percentOff " pulumi-lang-python=" percent_off " pulumi-lang-yaml=" percentOff " pulumi-lang-java=" percentOff " pulumi-lang-hcl=" percent_off "> percentOff </span>of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
145
+ */
146
+ percentOff?: pulumi.Input<number>;
147
+ /**
148
+ * Date after which the coupon can no longer be redeemed.
149
+ */
150
+ redeemBy?: pulumi.Input<number>;
151
+ /**
152
+ * Number of times this coupon has been applied to a customer.
153
+ */
154
+ timesRedeemed?: pulumi.Input<number>;
155
+ /**
156
+ * Taking account of the above properties, whether this coupon can still be applied to a customer.
157
+ */
158
+ valid?: pulumi.Input<boolean>;
159
+ }
160
+ /**
161
+ * The set of arguments for constructing a Coupon resource.
162
+ */
163
+ export interface CouponArgs {
164
+ /**
165
+ * Amount (in the <span pulumi-lang-nodejs="`currency`" pulumi-lang-dotnet="`Currency`" pulumi-lang-go="`currency`" pulumi-lang-python="`currency`" pulumi-lang-yaml="`currency`" pulumi-lang-java="`currency`" pulumi-lang-hcl="`currency`">`currency`</span> specified) that will be taken off the subtotal of any invoices for this customer.
166
+ */
167
+ amountOff?: pulumi.Input<number>;
168
+ appliesTos?: pulumi.Input<pulumi.Input<inputs.CouponAppliesTo>[]>;
169
+ /**
170
+ * If <span pulumi-lang-nodejs="`amountOff`" pulumi-lang-dotnet="`AmountOff`" pulumi-lang-go="`amountOff`" pulumi-lang-python="`amount_off`" pulumi-lang-yaml="`amountOff`" pulumi-lang-java="`amountOff`" pulumi-lang-hcl="`amount_off`">`amountOff`</span> has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
171
+ */
172
+ currency?: pulumi.Input<string>;
173
+ /**
174
+ * Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
175
+ */
176
+ currencyOptions?: pulumi.Input<pulumi.Input<inputs.CouponCurrencyOption>[]>;
177
+ /**
178
+ * One of <span pulumi-lang-nodejs="`forever`" pulumi-lang-dotnet="`Forever`" pulumi-lang-go="`forever`" pulumi-lang-python="`forever`" pulumi-lang-yaml="`forever`" pulumi-lang-java="`forever`" pulumi-lang-hcl="`forever`">`forever`</span>, <span pulumi-lang-nodejs="`once`" pulumi-lang-dotnet="`Once`" pulumi-lang-go="`once`" pulumi-lang-python="`once`" pulumi-lang-yaml="`once`" pulumi-lang-java="`once`" pulumi-lang-hcl="`once`">`once`</span>, or <span pulumi-lang-nodejs="`repeating`" pulumi-lang-dotnet="`Repeating`" pulumi-lang-go="`repeating`" pulumi-lang-python="`repeating`" pulumi-lang-yaml="`repeating`" pulumi-lang-java="`repeating`" pulumi-lang-hcl="`repeating`">`repeating`</span>. Describes how long a customer who applies this coupon will get the discount.
179
+ */
180
+ duration?: pulumi.Input<string>;
181
+ /**
182
+ * If <span pulumi-lang-nodejs="`duration`" pulumi-lang-dotnet="`Duration`" pulumi-lang-go="`duration`" pulumi-lang-python="`duration`" pulumi-lang-yaml="`duration`" pulumi-lang-java="`duration`" pulumi-lang-hcl="`duration`">`duration`</span> is <span pulumi-lang-nodejs="`repeating`" pulumi-lang-dotnet="`Repeating`" pulumi-lang-go="`repeating`" pulumi-lang-python="`repeating`" pulumi-lang-yaml="`repeating`" pulumi-lang-java="`repeating`" pulumi-lang-hcl="`repeating`">`repeating`</span>, the number of months the coupon applies. Null if coupon <span pulumi-lang-nodejs="`duration`" pulumi-lang-dotnet="`Duration`" pulumi-lang-go="`duration`" pulumi-lang-python="`duration`" pulumi-lang-yaml="`duration`" pulumi-lang-java="`duration`" pulumi-lang-hcl="`duration`">`duration`</span> is <span pulumi-lang-nodejs="`forever`" pulumi-lang-dotnet="`Forever`" pulumi-lang-go="`forever`" pulumi-lang-python="`forever`" pulumi-lang-yaml="`forever`" pulumi-lang-java="`forever`" pulumi-lang-hcl="`forever`">`forever`</span> or <span pulumi-lang-nodejs="`once`" pulumi-lang-dotnet="`Once`" pulumi-lang-go="`once`" pulumi-lang-python="`once`" pulumi-lang-yaml="`once`" pulumi-lang-java="`once`" pulumi-lang-hcl="`once`">`once`</span>.
183
+ */
184
+ durationInMonths?: pulumi.Input<number>;
185
+ /**
186
+ * Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
187
+ */
188
+ maxRedemptions?: pulumi.Input<number>;
189
+ /**
190
+ * Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
191
+ */
192
+ metadata?: pulumi.Input<{
193
+ [key: string]: pulumi.Input<string>;
194
+ }>;
195
+ /**
196
+ * Name of the coupon displayed to customers on for instance invoices or receipts.
197
+ */
198
+ name?: pulumi.Input<string>;
199
+ /**
200
+ * Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with<span pulumi-lang-nodejs=" percentOff " pulumi-lang-dotnet=" PercentOff " pulumi-lang-go=" percentOff " pulumi-lang-python=" percent_off " pulumi-lang-yaml=" percentOff " pulumi-lang-java=" percentOff " pulumi-lang-hcl=" percent_off "> percentOff </span>of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
201
+ */
202
+ percentOff?: pulumi.Input<number>;
203
+ /**
204
+ * Date after which the coupon can no longer be redeemed.
205
+ */
206
+ redeemBy?: pulumi.Input<number>;
207
+ }
208
+ //# sourceMappingURL=coupon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coupon.d.ts","sourceRoot":"","sources":["../coupon.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C,qBAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,MAAM;IAO9H;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM;IAOjD;;OAEG;IACH,SAAwB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzD,SAAwB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC,CAAC;IACzF;;OAEG;IACH,SAAgC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/D;;OAE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,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CACnC"}
package/bin/coupon.js ADDED
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.Coupon = void 0;
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ class Coupon extends pulumi.CustomResource {
32
+ /**
33
+ * Get an existing Coupon resource's state with the given name, ID, and optional extra
34
+ * properties used to qualify the lookup.
35
+ *
36
+ * @param name The _unique_ name of the resulting resource.
37
+ * @param id The _unique_ provider ID of the resource to lookup.
38
+ * @param state Any extra arguments used during the lookup.
39
+ * @param opts Optional settings to control the behavior of the CustomResource.
40
+ */
41
+ static get(name, id, state, opts) {
42
+ return new Coupon(name, state, { ...opts, id: id });
43
+ }
44
+ /** @internal */
45
+ static __pulumiType = 'stripe:index/coupon:Coupon';
46
+ /**
47
+ * Returns true if the given object is an instance of Coupon. This is designed to work even
48
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
49
+ */
50
+ static isInstance(obj) {
51
+ if (obj === undefined || obj === null) {
52
+ return false;
53
+ }
54
+ return obj['__pulumiType'] === Coupon.__pulumiType;
55
+ }
56
+ constructor(name, argsOrState, opts) {
57
+ let resourceInputs = {};
58
+ opts = opts || {};
59
+ if (opts.id) {
60
+ const state = argsOrState;
61
+ resourceInputs["amountOff"] = state?.amountOff;
62
+ resourceInputs["appliesTos"] = state?.appliesTos;
63
+ resourceInputs["created"] = state?.created;
64
+ resourceInputs["currency"] = state?.currency;
65
+ resourceInputs["currencyOptions"] = state?.currencyOptions;
66
+ resourceInputs["duration"] = state?.duration;
67
+ resourceInputs["durationInMonths"] = state?.durationInMonths;
68
+ resourceInputs["livemode"] = state?.livemode;
69
+ resourceInputs["maxRedemptions"] = state?.maxRedemptions;
70
+ resourceInputs["metadata"] = state?.metadata;
71
+ resourceInputs["name"] = state?.name;
72
+ resourceInputs["object"] = state?.object;
73
+ resourceInputs["percentOff"] = state?.percentOff;
74
+ resourceInputs["redeemBy"] = state?.redeemBy;
75
+ resourceInputs["timesRedeemed"] = state?.timesRedeemed;
76
+ resourceInputs["valid"] = state?.valid;
77
+ }
78
+ else {
79
+ const args = argsOrState;
80
+ resourceInputs["amountOff"] = args?.amountOff;
81
+ resourceInputs["appliesTos"] = args?.appliesTos;
82
+ resourceInputs["currency"] = args?.currency;
83
+ resourceInputs["currencyOptions"] = args?.currencyOptions;
84
+ resourceInputs["duration"] = args?.duration;
85
+ resourceInputs["durationInMonths"] = args?.durationInMonths;
86
+ resourceInputs["maxRedemptions"] = args?.maxRedemptions;
87
+ resourceInputs["metadata"] = args?.metadata;
88
+ resourceInputs["name"] = args?.name;
89
+ resourceInputs["percentOff"] = args?.percentOff;
90
+ resourceInputs["redeemBy"] = args?.redeemBy;
91
+ resourceInputs["created"] = undefined /*out*/;
92
+ resourceInputs["livemode"] = undefined /*out*/;
93
+ resourceInputs["object"] = undefined /*out*/;
94
+ resourceInputs["timesRedeemed"] = undefined /*out*/;
95
+ resourceInputs["valid"] = undefined /*out*/;
96
+ }
97
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
98
+ super(Coupon.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
99
+ }
100
+ }
101
+ exports.Coupon = Coupon;
102
+ //# sourceMappingURL=coupon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coupon.js","sourceRoot":"","sources":["../coupon.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAmB,EAAE,IAAmC;QACjH,OAAO,IAAI,MAAM,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,4BAA4B,CAAC;IAEnE;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,MAAM,CAAC,YAAY,CAAC;IACvD,CAAC;IAwED,YAAY,IAAY,EAAE,WAAsC,EAAE,IAAmC;QACjG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,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