Skip to content

Commit 8f4b022

Browse files
feat(api): api update
1 parent bd3dd9e commit 8f4b022

4 files changed

Lines changed: 850 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 191
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-ad7932b7b6d7b8330a96e38dffb2a855202293dd3fff6faedf02c9e462eaefd9.yml
3-
openapi_spec_hash: a5992eb21f48bf525b074d907a9f1b56
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-f8571888366aab87729cc4b87836dddb5b708a942e4ef591c163c65ee330a65a.yml
3+
openapi_spec_hash: cb786e6f7f67a83344bf5144855215f1
44
config_hash: 1a836d20bb988f001cc66d1526f71306

src/whop_sdk/resources/invoices.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ def create(
6262
plan: invoice_create_params.CreateInvoiceInputWithProductAndMemberIDPlan,
6363
product: invoice_create_params.CreateInvoiceInputWithProductAndMemberIDProduct,
6464
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
65+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductAndMemberIDBillingAddress]
66+
| Omit = omit,
6567
charge_buyer_fee: Optional[bool] | Omit = omit,
6668
customer_name: Optional[str] | Omit = omit,
69+
mailing_address_id: Optional[str] | Omit = omit,
6770
payment_method_id: Optional[str] | Omit = omit,
6871
payment_token_id: Optional[str] | Omit = omit,
6972
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -104,11 +107,17 @@ def create(
104107
Only valid when collection_method is charge_automatically. If not provided, the
105108
charge will be processed immediately.
106109
110+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
111+
be used together with mailing_address_id.
112+
107113
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
108114
109115
customer_name: The name of the customer. Required when creating an invoice for a customer who
110116
is not yet a member of the company.
111117
118+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
119+
Cannot be used together with billing_address.
120+
112121
payment_method_id: The unique identifier of the payment method to charge. Required when
113122
collection_method is charge_automatically.
114123
@@ -136,8 +145,11 @@ def create(
136145
plan: invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressPlan,
137146
product: invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressProduct,
138147
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
148+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressBillingAddress]
149+
| Omit = omit,
139150
charge_buyer_fee: Optional[bool] | Omit = omit,
140151
customer_name: Optional[str] | Omit = omit,
152+
mailing_address_id: Optional[str] | Omit = omit,
141153
payment_method_id: Optional[str] | Omit = omit,
142154
payment_token_id: Optional[str] | Omit = omit,
143155
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -178,11 +190,17 @@ def create(
178190
Only valid when collection_method is charge_automatically. If not provided, the
179191
charge will be processed immediately.
180192
193+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
194+
be used together with mailing_address_id.
195+
181196
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
182197
183198
customer_name: The name of the customer. Required when creating an invoice for a customer who
184199
is not yet a member of the company.
185200
201+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
202+
Cannot be used together with billing_address.
203+
186204
payment_method_id: The unique identifier of the payment method to charge. Required when
187205
collection_method is charge_automatically.
188206
@@ -210,8 +228,11 @@ def create(
210228
plan: invoice_create_params.CreateInvoiceInputWithProductIDAndMemberIDPlan,
211229
product_id: str,
212230
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
231+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndMemberIDBillingAddress]
232+
| Omit = omit,
213233
charge_buyer_fee: Optional[bool] | Omit = omit,
214234
customer_name: Optional[str] | Omit = omit,
235+
mailing_address_id: Optional[str] | Omit = omit,
215236
payment_method_id: Optional[str] | Omit = omit,
216237
payment_token_id: Optional[str] | Omit = omit,
217238
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -251,11 +272,17 @@ def create(
251272
Only valid when collection_method is charge_automatically. If not provided, the
252273
charge will be processed immediately.
253274
275+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
276+
be used together with mailing_address_id.
277+
254278
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
255279
256280
customer_name: The name of the customer. Required when creating an invoice for a customer who
257281
is not yet a member of the company.
258282
283+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
284+
Cannot be used together with billing_address.
285+
259286
payment_method_id: The unique identifier of the payment method to charge. Required when
260287
collection_method is charge_automatically.
261288
@@ -283,8 +310,11 @@ def create(
283310
plan: invoice_create_params.CreateInvoiceInputWithProductIDAndEmailAddressPlan,
284311
product_id: str,
285312
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
313+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndEmailAddressBillingAddress]
314+
| Omit = omit,
286315
charge_buyer_fee: Optional[bool] | Omit = omit,
287316
customer_name: Optional[str] | Omit = omit,
317+
mailing_address_id: Optional[str] | Omit = omit,
288318
payment_method_id: Optional[str] | Omit = omit,
289319
payment_token_id: Optional[str] | Omit = omit,
290320
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -324,11 +354,17 @@ def create(
324354
Only valid when collection_method is charge_automatically. If not provided, the
325355
charge will be processed immediately.
326356
357+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
358+
be used together with mailing_address_id.
359+
327360
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
328361
329362
customer_name: The name of the customer. Required when creating an invoice for a customer who
330363
is not yet a member of the company.
331364
365+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
366+
Cannot be used together with billing_address.
367+
332368
payment_method_id: The unique identifier of the payment method to charge. Required when
333369
collection_method is charge_automatically.
334370
@@ -366,8 +402,14 @@ def create(
366402
| invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressProduct
367403
| Omit = omit,
368404
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
405+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductAndMemberIDBillingAddress]
406+
| Optional[invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressBillingAddress]
407+
| Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndMemberIDBillingAddress]
408+
| Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndEmailAddressBillingAddress]
409+
| Omit = omit,
369410
charge_buyer_fee: Optional[bool] | Omit = omit,
370411
customer_name: Optional[str] | Omit = omit,
412+
mailing_address_id: Optional[str] | Omit = omit,
371413
payment_method_id: Optional[str] | Omit = omit,
372414
payment_token_id: Optional[str] | Omit = omit,
373415
email_address: str | Omit = omit,
@@ -390,8 +432,10 @@ def create(
390432
"plan": plan,
391433
"product": product,
392434
"automatically_finalizes_at": automatically_finalizes_at,
435+
"billing_address": billing_address,
393436
"charge_buyer_fee": charge_buyer_fee,
394437
"customer_name": customer_name,
438+
"mailing_address_id": mailing_address_id,
395439
"payment_method_id": payment_method_id,
396440
"payment_token_id": payment_token_id,
397441
"email_address": email_address,
@@ -608,8 +652,11 @@ async def create(
608652
plan: invoice_create_params.CreateInvoiceInputWithProductAndMemberIDPlan,
609653
product: invoice_create_params.CreateInvoiceInputWithProductAndMemberIDProduct,
610654
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
655+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductAndMemberIDBillingAddress]
656+
| Omit = omit,
611657
charge_buyer_fee: Optional[bool] | Omit = omit,
612658
customer_name: Optional[str] | Omit = omit,
659+
mailing_address_id: Optional[str] | Omit = omit,
613660
payment_method_id: Optional[str] | Omit = omit,
614661
payment_token_id: Optional[str] | Omit = omit,
615662
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -650,11 +697,17 @@ async def create(
650697
Only valid when collection_method is charge_automatically. If not provided, the
651698
charge will be processed immediately.
652699
700+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
701+
be used together with mailing_address_id.
702+
653703
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
654704
655705
customer_name: The name of the customer. Required when creating an invoice for a customer who
656706
is not yet a member of the company.
657707
708+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
709+
Cannot be used together with billing_address.
710+
658711
payment_method_id: The unique identifier of the payment method to charge. Required when
659712
collection_method is charge_automatically.
660713
@@ -682,8 +735,11 @@ async def create(
682735
plan: invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressPlan,
683736
product: invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressProduct,
684737
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
738+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressBillingAddress]
739+
| Omit = omit,
685740
charge_buyer_fee: Optional[bool] | Omit = omit,
686741
customer_name: Optional[str] | Omit = omit,
742+
mailing_address_id: Optional[str] | Omit = omit,
687743
payment_method_id: Optional[str] | Omit = omit,
688744
payment_token_id: Optional[str] | Omit = omit,
689745
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -724,11 +780,17 @@ async def create(
724780
Only valid when collection_method is charge_automatically. If not provided, the
725781
charge will be processed immediately.
726782
783+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
784+
be used together with mailing_address_id.
785+
727786
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
728787
729788
customer_name: The name of the customer. Required when creating an invoice for a customer who
730789
is not yet a member of the company.
731790
791+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
792+
Cannot be used together with billing_address.
793+
732794
payment_method_id: The unique identifier of the payment method to charge. Required when
733795
collection_method is charge_automatically.
734796
@@ -756,8 +818,11 @@ async def create(
756818
plan: invoice_create_params.CreateInvoiceInputWithProductIDAndMemberIDPlan,
757819
product_id: str,
758820
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
821+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndMemberIDBillingAddress]
822+
| Omit = omit,
759823
charge_buyer_fee: Optional[bool] | Omit = omit,
760824
customer_name: Optional[str] | Omit = omit,
825+
mailing_address_id: Optional[str] | Omit = omit,
761826
payment_method_id: Optional[str] | Omit = omit,
762827
payment_token_id: Optional[str] | Omit = omit,
763828
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -797,11 +862,17 @@ async def create(
797862
Only valid when collection_method is charge_automatically. If not provided, the
798863
charge will be processed immediately.
799864
865+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
866+
be used together with mailing_address_id.
867+
800868
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
801869
802870
customer_name: The name of the customer. Required when creating an invoice for a customer who
803871
is not yet a member of the company.
804872
873+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
874+
Cannot be used together with billing_address.
875+
805876
payment_method_id: The unique identifier of the payment method to charge. Required when
806877
collection_method is charge_automatically.
807878
@@ -829,8 +900,11 @@ async def create(
829900
plan: invoice_create_params.CreateInvoiceInputWithProductIDAndEmailAddressPlan,
830901
product_id: str,
831902
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
903+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndEmailAddressBillingAddress]
904+
| Omit = omit,
832905
charge_buyer_fee: Optional[bool] | Omit = omit,
833906
customer_name: Optional[str] | Omit = omit,
907+
mailing_address_id: Optional[str] | Omit = omit,
834908
payment_method_id: Optional[str] | Omit = omit,
835909
payment_token_id: Optional[str] | Omit = omit,
836910
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -870,11 +944,17 @@ async def create(
870944
Only valid when collection_method is charge_automatically. If not provided, the
871945
charge will be processed immediately.
872946
947+
billing_address: Inline billing address to create a new mailing address for this invoice. Cannot
948+
be used together with mailing_address_id.
949+
873950
charge_buyer_fee: Whether to charge the customer a buyer fee on this invoice.
874951
875952
customer_name: The name of the customer. Required when creating an invoice for a customer who
876953
is not yet a member of the company.
877954
955+
mailing_address_id: The unique identifier of an existing mailing address to attach to this invoice.
956+
Cannot be used together with billing_address.
957+
878958
payment_method_id: The unique identifier of the payment method to charge. Required when
879959
collection_method is charge_automatically.
880960
@@ -912,8 +992,14 @@ async def create(
912992
| invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressProduct
913993
| Omit = omit,
914994
automatically_finalizes_at: Union[str, datetime, None] | Omit = omit,
995+
billing_address: Optional[invoice_create_params.CreateInvoiceInputWithProductAndMemberIDBillingAddress]
996+
| Optional[invoice_create_params.CreateInvoiceInputWithProductAndEmailAddressBillingAddress]
997+
| Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndMemberIDBillingAddress]
998+
| Optional[invoice_create_params.CreateInvoiceInputWithProductIDAndEmailAddressBillingAddress]
999+
| Omit = omit,
9151000
charge_buyer_fee: Optional[bool] | Omit = omit,
9161001
customer_name: Optional[str] | Omit = omit,
1002+
mailing_address_id: Optional[str] | Omit = omit,
9171003
payment_method_id: Optional[str] | Omit = omit,
9181004
payment_token_id: Optional[str] | Omit = omit,
9191005
email_address: str | Omit = omit,
@@ -936,8 +1022,10 @@ async def create(
9361022
"plan": plan,
9371023
"product": product,
9381024
"automatically_finalizes_at": automatically_finalizes_at,
1025+
"billing_address": billing_address,
9391026
"charge_buyer_fee": charge_buyer_fee,
9401027
"customer_name": customer_name,
1028+
"mailing_address_id": mailing_address_id,
9411029
"payment_method_id": payment_method_id,
9421030
"payment_token_id": payment_token_id,
9431031
"email_address": email_address,

0 commit comments

Comments
 (0)