Skip to content

Commit f8c52ad

Browse files
Add generated code
1 parent 8d5cbfc commit f8c52ad

9 files changed

Lines changed: 357 additions & 2 deletions

lib/Service/AccountService.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,35 @@ public function updatePerson($parentId, $id, $params = null, $opts = null)
389389
return $this->request('post', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
390390
}
391391

392+
/**
393+
* Serializes a Account update request into a batch job JSONL line.
394+
*
395+
* @param string $account
396+
* @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, specified_commercial_transactions_act_url?: null|string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, automatic_indirect_tax?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, crypto_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, gopay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, id_bank_transfer_payments?: array{requested?: bool}, id_bank_transfer_payments_bca?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mb_way_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, paypal_payments?: array{requested?: bool}, paypay_payments?: array{requested?: bool}, payto_payments?: array{requested?: bool}, pix_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, qris_payments?: array{requested?: bool}, rechnung_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, shopeepay_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, stripe_balance_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, treasury_evolve?: array{requested?: bool}, treasury_fifth_third?: array{requested?: bool}, treasury_goldman_sachs?: array{requested?: bool}, twint_payments?: array{requested?: bool}, upi_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, representative_declaration?: array{date?: int, ip?: string, user_agent?: string}, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_address?: array{files?: string[]}, proof_of_registration?: array{files?: string[], signer?: array{person?: string}}, proof_of_ultimate_beneficial_ownership?: array{files?: string[], signer?: array{person?: string}}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|string}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|array<string, string>, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, metadata?: null|array<string, string>, risk_controls?: array{charges?: array{pause_requested?: bool}, payouts?: array{pause_requested?: bool}}, settings?: array{bacs_debit_payments?: array{display_name?: string}, bank_bca_onboarding?: array{account_holder_name?: string, business_account_number?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, capital?: array{payout_destination?: array<string, string>, payout_destination_selector?: array<string, string[]>}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{email_customers_on_successful_payment?: bool, statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, monthly_payout_days?: int[], weekly_anchor?: string, weekly_payout_days?: string[]}, statement_descriptor?: string}, paypay_payments?: array{additional_files?: string[], goods_type?: string, site?: array{accessible?: array{}, in_development?: array{password: string, username?: string}, restricted?: array{payment_flow_file?: string}, type?: string}}, smart_disputes?: array{auto_respond?: array{preference?: string}}, tax_forms?: array{consented_to_paperless_delivery?: bool}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params
397+
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
398+
*
399+
* @return string
400+
*/
401+
public function serializeBatchUpdate($account, $params = null, $opts = null)
402+
{
403+
$itemId = (new \Stripe\Util\RandomGenerator())->uuid();
404+
$opts = \Stripe\Util\RequestOptions::parse($opts);
405+
$stripeVersion = isset($opts->headers['Stripe-Version']) ? $opts->headers['Stripe-Version'] : \Stripe\Stripe::getApiVersion();
406+
407+
$item = [
408+
'id' => $itemId,
409+
'params' => $params,
410+
'stripe_version' => $stripeVersion,
411+
];
412+
$item['path_params'] = ['account' => $account];
413+
$stripeContext = isset($opts->headers['Stripe-Context']) ? $opts->headers['Stripe-Context'] : null;
414+
if (null !== $stripeContext) {
415+
$item['context'] = $stripeContext;
416+
}
417+
418+
return \json_encode($item);
419+
}
420+
392421
/**
393422
* Retrieves the details of an account.
394423
*

lib/Service/CreditNoteService.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,31 @@ public function voidCreditNote($id, $params = null, $opts = null)
159159
{
160160
return $this->request('post', $this->buildPath('/v1/credit_notes/%s/void', $id), $params, $opts);
161161
}
162+
163+
/**
164+
* Serializes a CreditNote create request into a batch job JSONL line.
165+
*
166+
* @param null|array{amount?: int, credit_amount?: int, effective_at?: int, email_type?: string, expand?: string[], invoice: string, lines?: (array{amount?: int, description?: string, invoice_line_item?: string, metadata?: array<string, string>, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate: string, taxable_amount: int}[], tax_rates?: null|string[], type: string, unit_amount?: int, unit_amount_decimal?: string})[], memo?: string, metadata?: array<string, string>, out_of_band_amount?: int, reason?: string, refund_amount?: int, refunds?: array{amount_refunded?: int, payment_record_refund?: array{payment_record: string, refund_group: string}, refund?: string, type?: string}[], shipping_cost?: array{shipping_rate?: string}} $params
167+
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
168+
*
169+
* @return string
170+
*/
171+
public function serializeBatchCreate($params = null, $opts = null)
172+
{
173+
$itemId = (new \Stripe\Util\RandomGenerator())->uuid();
174+
$opts = \Stripe\Util\RequestOptions::parse($opts);
175+
$stripeVersion = isset($opts->headers['Stripe-Version']) ? $opts->headers['Stripe-Version'] : \Stripe\Stripe::getApiVersion();
176+
177+
$item = [
178+
'id' => $itemId,
179+
'params' => $params,
180+
'stripe_version' => $stripeVersion,
181+
];
182+
$stripeContext = isset($opts->headers['Stripe-Context']) ? $opts->headers['Stripe-Context'] : null;
183+
if (null !== $stripeContext) {
184+
$item['context'] = $stripeContext;
185+
}
186+
187+
return \json_encode($item);
188+
}
162189
}

lib/Service/CustomerService.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,4 +500,33 @@ public function verifySource($parentId, $id, $params = null, $opts = null)
500500
{
501501
return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s/verify', $parentId, $id), $params, $opts);
502502
}
503+
504+
/**
505+
* Serializes a Customer update request into a batch job JSONL line.
506+
*
507+
* @param string $customer
508+
* @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, business_name?: null|string, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], individual_name?: null|string, invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|array<string, string>, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params
509+
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
510+
*
511+
* @return string
512+
*/
513+
public function serializeBatchUpdate($customer, $params = null, $opts = null)
514+
{
515+
$itemId = (new \Stripe\Util\RandomGenerator())->uuid();
516+
$opts = \Stripe\Util\RequestOptions::parse($opts);
517+
$stripeVersion = isset($opts->headers['Stripe-Version']) ? $opts->headers['Stripe-Version'] : \Stripe\Stripe::getApiVersion();
518+
519+
$item = [
520+
'id' => $itemId,
521+
'params' => $params,
522+
'stripe_version' => $stripeVersion,
523+
];
524+
$item['path_params'] = ['customer' => $customer];
525+
$stripeContext = isset($opts->headers['Stripe-Context']) ? $opts->headers['Stripe-Context'] : null;
526+
if (null !== $stripeContext) {
527+
$item['context'] = $stripeContext;
528+
}
529+
530+
return \json_encode($item);
531+
}
503532
}

lib/Service/InvoiceService.php

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,4 +404,62 @@ public function voidInvoice($id, $params = null, $opts = null)
404404
{
405405
return $this->request('post', $this->buildPath('/v1/invoices/%s/void', $id), $params, $opts);
406406
}
407+
408+
/**
409+
* Serializes a Invoice pay request into a batch job JSONL line.
410+
*
411+
* @param string $invoice
412+
* @param null|array{expand?: string[], forgive?: bool, mandate?: null|string, off_session?: bool, paid_out_of_band?: bool, payment_method?: string, source?: string} $params
413+
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
414+
*
415+
* @return string
416+
*/
417+
public function serializeBatchPay($invoice, $params = null, $opts = null)
418+
{
419+
$itemId = (new \Stripe\Util\RandomGenerator())->uuid();
420+
$opts = \Stripe\Util\RequestOptions::parse($opts);
421+
$stripeVersion = isset($opts->headers['Stripe-Version']) ? $opts->headers['Stripe-Version'] : \Stripe\Stripe::getApiVersion();
422+
423+
$item = [
424+
'id' => $itemId,
425+
'params' => $params,
426+
'stripe_version' => $stripeVersion,
427+
];
428+
$item['path_params'] = ['invoice' => $invoice];
429+
$stripeContext = isset($opts->headers['Stripe-Context']) ? $opts->headers['Stripe-Context'] : null;
430+
if (null !== $stripeContext) {
431+
$item['context'] = $stripeContext;
432+
}
433+
434+
return \json_encode($item);
435+
}
436+
437+
/**
438+
* Serializes a Invoice update request into a batch job JSONL line.
439+
*
440+
* @param string $invoice
441+
* @param null|array{account_tax_ids?: null|string[], amounts_due?: null|array{amount: int, days_until_due?: int, description: string, due_date?: int}[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_margins?: null|string[], default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, discount_end?: array{duration?: array{interval: string, interval_count: int}, timestamp?: int, type: string}, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|array<string, string>, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, id_bank_transfer?: null|array{}, konbini?: null|array{}, payto?: null|array{mandate_options?: array{amount?: int, purpose?: string}}, pix?: null|array{amount_includes_iof?: string, expires_after_seconds?: int}, sepa_debit?: null|array{}, upi?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string, end_date?: int}}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[], institution?: string}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: array<string, array{amount: int, tax_behavior?: string}>}, metadata?: array<string, string>, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params
442+
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
443+
*
444+
* @return string
445+
*/
446+
public function serializeBatchUpdate($invoice, $params = null, $opts = null)
447+
{
448+
$itemId = (new \Stripe\Util\RandomGenerator())->uuid();
449+
$opts = \Stripe\Util\RequestOptions::parse($opts);
450+
$stripeVersion = isset($opts->headers['Stripe-Version']) ? $opts->headers['Stripe-Version'] : \Stripe\Stripe::getApiVersion();
451+
452+
$item = [
453+
'id' => $itemId,
454+
'params' => $params,
455+
'stripe_version' => $stripeVersion,
456+
];
457+
$item['path_params'] = ['invoice' => $invoice];
458+
$stripeContext = isset($opts->headers['Stripe-Context']) ? $opts->headers['Stripe-Context'] : null;
459+
if (null !== $stripeContext) {
460+
$item['context'] = $stripeContext;
461+
}
462+
463+
return \json_encode($item);
464+
}
407465
}

0 commit comments

Comments
 (0)