orb-billing 1.48.0 → 1.50.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/orb/models/changed_subscription_resources.rb +21 -1
- data/lib/orb/models/customers/credit_fetch_balance_by_external_id_params.rb +31 -0
- data/lib/orb/models/customers/credit_fetch_balance_by_external_id_response.rb +61 -0
- data/lib/orb/models/customers/credit_fetch_balance_params.rb +31 -0
- data/lib/orb/models/customers/credit_fetch_balance_response.rb +60 -0
- data/lib/orb/models/invoice.rb +21 -1
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +21 -1
- data/lib/orb/models/invoice_issue_summary_response.rb +21 -1
- data/lib/orb/models/invoice_issued_summary_webhook_event.rb +21 -1
- data/lib/orb/models/invoice_list_summary_response.rb +21 -1
- data/lib/orb/models/subscription_list_summary_params.rb +108 -0
- data/lib/orb/models/subscription_list_summary_response.rb +130 -0
- data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +7 -4
- data/lib/orb/resources/customers/credits.rb +76 -0
- data/lib/orb/resources/subscriptions.rb +60 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +6 -0
- data/rbi/orb/models/changed_subscription_resources.rbi +24 -0
- data/rbi/orb/models/customers/credit_fetch_balance_by_external_id_params.rbi +54 -0
- data/rbi/orb/models/customers/credit_fetch_balance_by_external_id_response.rbi +86 -0
- data/rbi/orb/models/customers/credit_fetch_balance_params.rbi +54 -0
- data/rbi/orb/models/customers/credit_fetch_balance_response.rbi +86 -0
- data/rbi/orb/models/invoice.rbi +24 -0
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +24 -0
- data/rbi/orb/models/invoice_issue_summary_response.rbi +24 -0
- data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +24 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +24 -0
- data/rbi/orb/models/subscription_list_summary_params.rbi +148 -0
- data/rbi/orb/models/subscription_list_summary_response.rbi +214 -0
- data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +7 -4
- data/rbi/orb/resources/customers/credits.rbi +60 -0
- data/rbi/orb/resources/subscriptions.rbi +47 -0
- data/sig/orb/models/changed_subscription_resources.rbs +10 -0
- data/sig/orb/models/customers/credit_fetch_balance_by_external_id_params.rbs +30 -0
- data/sig/orb/models/customers/credit_fetch_balance_by_external_id_response.rbs +42 -0
- data/sig/orb/models/customers/credit_fetch_balance_params.rbs +30 -0
- data/sig/orb/models/customers/credit_fetch_balance_response.rbs +42 -0
- data/sig/orb/models/invoice.rbs +10 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +10 -0
- data/sig/orb/models/invoice_issue_summary_response.rbs +10 -0
- data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +10 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +10 -0
- data/sig/orb/models/subscription_list_summary_params.rbs +90 -0
- data/sig/orb/models/subscription_list_summary_response.rbs +94 -0
- data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/customers/credits.rbs +12 -0
- data/sig/orb/resources/subscriptions.rbs +15 -0
- metadata +19 -1
|
@@ -395,6 +395,22 @@ module Orb
|
|
|
395
395
|
# @return [Time, nil]
|
|
396
396
|
required :scheduled_issue_at, Time, nil?: true
|
|
397
397
|
|
|
398
|
+
# @!attribute service_period_end
|
|
399
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
400
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
401
|
+
# line items.
|
|
402
|
+
#
|
|
403
|
+
# @return [Time, nil]
|
|
404
|
+
required :service_period_end, Time, nil?: true
|
|
405
|
+
|
|
406
|
+
# @!attribute service_period_start
|
|
407
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
408
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
409
|
+
# line items.
|
|
410
|
+
#
|
|
411
|
+
# @return [Time, nil]
|
|
412
|
+
required :service_period_start, Time, nil?: true
|
|
413
|
+
|
|
398
414
|
# @!attribute shipping_address
|
|
399
415
|
#
|
|
400
416
|
# @return [Orb::Models::Address, nil]
|
|
@@ -439,7 +455,7 @@ module Orb
|
|
|
439
455
|
# @return [Boolean]
|
|
440
456
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
441
457
|
|
|
442
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
458
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
443
459
|
# Some parameter documentations has been truncated, see
|
|
444
460
|
# {Orb::Models::Webhooks::InvoiceManuallyMarkedAsVoidStandardWebhookEvent::Invoice}
|
|
445
461
|
# for more details.
|
|
@@ -501,6 +517,10 @@ module Orb
|
|
|
501
517
|
#
|
|
502
518
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
503
519
|
#
|
|
520
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
521
|
+
#
|
|
522
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
523
|
+
#
|
|
504
524
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
505
525
|
#
|
|
506
526
|
# @param status [Symbol, Orb::Models::Webhooks::InvoiceManuallyMarkedAsVoidStandardWebhookEvent::Invoice::Status]
|
|
@@ -396,6 +396,22 @@ module Orb
|
|
|
396
396
|
# @return [Time, nil]
|
|
397
397
|
required :scheduled_issue_at, Time, nil?: true
|
|
398
398
|
|
|
399
|
+
# @!attribute service_period_end
|
|
400
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
401
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
402
|
+
# line items.
|
|
403
|
+
#
|
|
404
|
+
# @return [Time, nil]
|
|
405
|
+
required :service_period_end, Time, nil?: true
|
|
406
|
+
|
|
407
|
+
# @!attribute service_period_start
|
|
408
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
409
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
410
|
+
# line items.
|
|
411
|
+
#
|
|
412
|
+
# @return [Time, nil]
|
|
413
|
+
required :service_period_start, Time, nil?: true
|
|
414
|
+
|
|
399
415
|
# @!attribute shipping_address
|
|
400
416
|
#
|
|
401
417
|
# @return [Orb::Models::Address, nil]
|
|
@@ -439,7 +455,7 @@ module Orb
|
|
|
439
455
|
# @return [Boolean]
|
|
440
456
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
441
457
|
|
|
442
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
458
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
443
459
|
# Some parameter documentations has been truncated, see
|
|
444
460
|
# {Orb::Models::Webhooks::InvoicePaymentFailedStandardWebhookEvent::Invoice} for
|
|
445
461
|
# more details.
|
|
@@ -501,6 +517,10 @@ module Orb
|
|
|
501
517
|
#
|
|
502
518
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
503
519
|
#
|
|
520
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
521
|
+
#
|
|
522
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
523
|
+
#
|
|
504
524
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
505
525
|
#
|
|
506
526
|
# @param status [Symbol, Orb::Models::Webhooks::InvoicePaymentFailedStandardWebhookEvent::Invoice::Status]
|
|
@@ -395,6 +395,22 @@ module Orb
|
|
|
395
395
|
# @return [Time, nil]
|
|
396
396
|
required :scheduled_issue_at, Time, nil?: true
|
|
397
397
|
|
|
398
|
+
# @!attribute service_period_end
|
|
399
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
400
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
401
|
+
# line items.
|
|
402
|
+
#
|
|
403
|
+
# @return [Time, nil]
|
|
404
|
+
required :service_period_end, Time, nil?: true
|
|
405
|
+
|
|
406
|
+
# @!attribute service_period_start
|
|
407
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
408
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
409
|
+
# line items.
|
|
410
|
+
#
|
|
411
|
+
# @return [Time, nil]
|
|
412
|
+
required :service_period_start, Time, nil?: true
|
|
413
|
+
|
|
398
414
|
# @!attribute shipping_address
|
|
399
415
|
#
|
|
400
416
|
# @return [Orb::Models::Address, nil]
|
|
@@ -439,7 +455,7 @@ module Orb
|
|
|
439
455
|
# @return [Boolean]
|
|
440
456
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
441
457
|
|
|
442
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
458
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
443
459
|
# Some parameter documentations has been truncated, see
|
|
444
460
|
# {Orb::Models::Webhooks::InvoicePaymentProcessingStandardWebhookEvent::Invoice}
|
|
445
461
|
# for more details.
|
|
@@ -501,6 +517,10 @@ module Orb
|
|
|
501
517
|
#
|
|
502
518
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
503
519
|
#
|
|
520
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
521
|
+
#
|
|
522
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
523
|
+
#
|
|
504
524
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
505
525
|
#
|
|
506
526
|
# @param status [Symbol, Orb::Models::Webhooks::InvoicePaymentProcessingStandardWebhookEvent::Invoice::Status]
|
|
@@ -397,6 +397,22 @@ module Orb
|
|
|
397
397
|
# @return [Time, nil]
|
|
398
398
|
required :scheduled_issue_at, Time, nil?: true
|
|
399
399
|
|
|
400
|
+
# @!attribute service_period_end
|
|
401
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
402
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
403
|
+
# line items.
|
|
404
|
+
#
|
|
405
|
+
# @return [Time, nil]
|
|
406
|
+
required :service_period_end, Time, nil?: true
|
|
407
|
+
|
|
408
|
+
# @!attribute service_period_start
|
|
409
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
410
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
411
|
+
# line items.
|
|
412
|
+
#
|
|
413
|
+
# @return [Time, nil]
|
|
414
|
+
required :service_period_start, Time, nil?: true
|
|
415
|
+
|
|
400
416
|
# @!attribute shipping_address
|
|
401
417
|
#
|
|
402
418
|
# @return [Orb::Models::Address, nil]
|
|
@@ -440,7 +456,7 @@ module Orb
|
|
|
440
456
|
# @return [Boolean]
|
|
441
457
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
442
458
|
|
|
443
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
459
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
444
460
|
# Some parameter documentations has been truncated, see
|
|
445
461
|
# {Orb::Models::Webhooks::InvoicePaymentSucceededStandardWebhookEvent::Invoice}
|
|
446
462
|
# for more details.
|
|
@@ -502,6 +518,10 @@ module Orb
|
|
|
502
518
|
#
|
|
503
519
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
504
520
|
#
|
|
521
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
522
|
+
#
|
|
523
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
524
|
+
#
|
|
505
525
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
506
526
|
#
|
|
507
527
|
# @param status [Symbol, Orb::Models::Webhooks::InvoicePaymentSucceededStandardWebhookEvent::Invoice::Status]
|
|
@@ -393,6 +393,22 @@ module Orb
|
|
|
393
393
|
# @return [Time, nil]
|
|
394
394
|
required :scheduled_issue_at, Time, nil?: true
|
|
395
395
|
|
|
396
|
+
# @!attribute service_period_end
|
|
397
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
398
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
399
|
+
# line items.
|
|
400
|
+
#
|
|
401
|
+
# @return [Time, nil]
|
|
402
|
+
required :service_period_end, Time, nil?: true
|
|
403
|
+
|
|
404
|
+
# @!attribute service_period_start
|
|
405
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
406
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
407
|
+
# line items.
|
|
408
|
+
#
|
|
409
|
+
# @return [Time, nil]
|
|
410
|
+
required :service_period_start, Time, nil?: true
|
|
411
|
+
|
|
396
412
|
# @!attribute shipping_address
|
|
397
413
|
#
|
|
398
414
|
# @return [Orb::Models::Address, nil]
|
|
@@ -436,7 +452,7 @@ module Orb
|
|
|
436
452
|
# @return [Boolean]
|
|
437
453
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
438
454
|
|
|
439
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
455
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
440
456
|
# Some parameter documentations has been truncated, see
|
|
441
457
|
# {Orb::Models::Webhooks::InvoiceSyncFailedStandardWebhookEvent::Invoice} for more
|
|
442
458
|
# details.
|
|
@@ -498,6 +514,10 @@ module Orb
|
|
|
498
514
|
#
|
|
499
515
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
500
516
|
#
|
|
517
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
518
|
+
#
|
|
519
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
520
|
+
#
|
|
501
521
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
502
522
|
#
|
|
503
523
|
# @param status [Symbol, Orb::Models::Webhooks::InvoiceSyncFailedStandardWebhookEvent::Invoice::Status]
|
|
@@ -395,6 +395,22 @@ module Orb
|
|
|
395
395
|
# @return [Time, nil]
|
|
396
396
|
required :scheduled_issue_at, Time, nil?: true
|
|
397
397
|
|
|
398
|
+
# @!attribute service_period_end
|
|
399
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
400
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
401
|
+
# line items.
|
|
402
|
+
#
|
|
403
|
+
# @return [Time, nil]
|
|
404
|
+
required :service_period_end, Time, nil?: true
|
|
405
|
+
|
|
406
|
+
# @!attribute service_period_start
|
|
407
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
408
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
409
|
+
# line items.
|
|
410
|
+
#
|
|
411
|
+
# @return [Time, nil]
|
|
412
|
+
required :service_period_start, Time, nil?: true
|
|
413
|
+
|
|
398
414
|
# @!attribute shipping_address
|
|
399
415
|
#
|
|
400
416
|
# @return [Orb::Models::Address, nil]
|
|
@@ -438,7 +454,7 @@ module Orb
|
|
|
438
454
|
# @return [Boolean]
|
|
439
455
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
440
456
|
|
|
441
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
457
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
442
458
|
# Some parameter documentations has been truncated, see
|
|
443
459
|
# {Orb::Models::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice} for
|
|
444
460
|
# more details.
|
|
@@ -500,6 +516,10 @@ module Orb
|
|
|
500
516
|
#
|
|
501
517
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
502
518
|
#
|
|
519
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
520
|
+
#
|
|
521
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
522
|
+
#
|
|
503
523
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
504
524
|
#
|
|
505
525
|
# @param status [Symbol, Orb::Models::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status]
|
|
@@ -395,6 +395,22 @@ module Orb
|
|
|
395
395
|
# @return [Time, nil]
|
|
396
396
|
required :scheduled_issue_at, Time, nil?: true
|
|
397
397
|
|
|
398
|
+
# @!attribute service_period_end
|
|
399
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
400
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
401
|
+
# line items.
|
|
402
|
+
#
|
|
403
|
+
# @return [Time, nil]
|
|
404
|
+
required :service_period_end, Time, nil?: true
|
|
405
|
+
|
|
406
|
+
# @!attribute service_period_start
|
|
407
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
408
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
409
|
+
# line items.
|
|
410
|
+
#
|
|
411
|
+
# @return [Time, nil]
|
|
412
|
+
required :service_period_start, Time, nil?: true
|
|
413
|
+
|
|
398
414
|
# @!attribute shipping_address
|
|
399
415
|
#
|
|
400
416
|
# @return [Orb::Models::Address, nil]
|
|
@@ -438,7 +454,7 @@ module Orb
|
|
|
438
454
|
# @return [Boolean]
|
|
439
455
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
440
456
|
|
|
441
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
457
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
442
458
|
# Some parameter documentations has been truncated, see
|
|
443
459
|
# {Orb::Models::Webhooks::InvoiceUndoMarkAsPaidStandardWebhookEvent::Invoice} for
|
|
444
460
|
# more details.
|
|
@@ -500,6 +516,10 @@ module Orb
|
|
|
500
516
|
#
|
|
501
517
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
502
518
|
#
|
|
519
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
520
|
+
#
|
|
521
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
522
|
+
#
|
|
503
523
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
504
524
|
#
|
|
505
525
|
# @param status [Symbol, Orb::Models::Webhooks::InvoiceUndoMarkAsPaidStandardWebhookEvent::Invoice::Status]
|
|
@@ -474,6 +474,22 @@ module Orb
|
|
|
474
474
|
# @return [Time, nil]
|
|
475
475
|
required :scheduled_issue_at, Time, nil?: true
|
|
476
476
|
|
|
477
|
+
# @!attribute service_period_end
|
|
478
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
479
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
480
|
+
# line items.
|
|
481
|
+
#
|
|
482
|
+
# @return [Time, nil]
|
|
483
|
+
required :service_period_end, Time, nil?: true
|
|
484
|
+
|
|
485
|
+
# @!attribute service_period_start
|
|
486
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
487
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
488
|
+
# line items.
|
|
489
|
+
#
|
|
490
|
+
# @return [Time, nil]
|
|
491
|
+
required :service_period_start, Time, nil?: true
|
|
492
|
+
|
|
477
493
|
# @!attribute shipping_address
|
|
478
494
|
#
|
|
479
495
|
# @return [Orb::Models::Address, nil]
|
|
@@ -518,7 +534,7 @@ module Orb
|
|
|
518
534
|
# @return [Boolean]
|
|
519
535
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
520
536
|
|
|
521
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
537
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
522
538
|
# Some parameter documentations has been truncated, see
|
|
523
539
|
# {Orb::Models::Webhooks::SalesOrderAccountingSyncFailedStandardWebhookEvent::Invoice}
|
|
524
540
|
# for more details.
|
|
@@ -580,6 +596,10 @@ module Orb
|
|
|
580
596
|
#
|
|
581
597
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
582
598
|
#
|
|
599
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
600
|
+
#
|
|
601
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
602
|
+
#
|
|
583
603
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
584
604
|
#
|
|
585
605
|
# @param status [Symbol, Orb::Models::Webhooks::SalesOrderAccountingSyncFailedStandardWebhookEvent::Invoice::Status]
|
data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb
CHANGED
|
@@ -475,6 +475,22 @@ module Orb
|
|
|
475
475
|
# @return [Time, nil]
|
|
476
476
|
required :scheduled_issue_at, Time, nil?: true
|
|
477
477
|
|
|
478
|
+
# @!attribute service_period_end
|
|
479
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
480
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
481
|
+
# line items.
|
|
482
|
+
#
|
|
483
|
+
# @return [Time, nil]
|
|
484
|
+
required :service_period_end, Time, nil?: true
|
|
485
|
+
|
|
486
|
+
# @!attribute service_period_start
|
|
487
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
488
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
489
|
+
# line items.
|
|
490
|
+
#
|
|
491
|
+
# @return [Time, nil]
|
|
492
|
+
required :service_period_start, Time, nil?: true
|
|
493
|
+
|
|
478
494
|
# @!attribute shipping_address
|
|
479
495
|
#
|
|
480
496
|
# @return [Orb::Models::Address, nil]
|
|
@@ -519,7 +535,7 @@ module Orb
|
|
|
519
535
|
# @return [Boolean]
|
|
520
536
|
required :will_auto_issue, Orb::Internal::Type::Boolean
|
|
521
537
|
|
|
522
|
-
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
538
|
+
# @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, issue_failed_at:, issued_at:, memo:, metadata:, paid_at:, payment_attempts:, payment_failed_at:, payment_received_at:, payment_started_at:, scheduled_issue_at:, service_period_end:, service_period_start:, shipping_address:, status:, subscription:, sync_failed_at:, total:, voided_at:, will_auto_issue:)
|
|
523
539
|
# Some parameter documentations has been truncated, see
|
|
524
540
|
# {Orb::Models::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice}
|
|
525
541
|
# for more details.
|
|
@@ -581,6 +597,10 @@ module Orb
|
|
|
581
597
|
#
|
|
582
598
|
# @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche
|
|
583
599
|
#
|
|
600
|
+
# @param service_period_end [Time, nil] The latest `end_date` of the invoice's line items, including any line items hidd
|
|
601
|
+
#
|
|
602
|
+
# @param service_period_start [Time, nil] The earliest `start_date` of the invoice's line items, including any line items
|
|
603
|
+
#
|
|
584
604
|
# @param shipping_address [Orb::Models::Address, nil]
|
|
585
605
|
#
|
|
586
606
|
# @param status [Symbol, Orb::Models::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status]
|
data/lib/orb/models.rb
CHANGED
|
@@ -751,6 +751,8 @@ module Orb
|
|
|
751
751
|
|
|
752
752
|
SubscriptionListParams = Orb::Models::SubscriptionListParams
|
|
753
753
|
|
|
754
|
+
SubscriptionListSummaryParams = Orb::Models::SubscriptionListSummaryParams
|
|
755
|
+
|
|
754
756
|
SubscriptionMinified = Orb::Models::SubscriptionMinified
|
|
755
757
|
|
|
756
758
|
SubscriptionPlanChangedWebhookEvent = Orb::Models::SubscriptionPlanChangedWebhookEvent
|
data/lib/orb/resources/alerts.rb
CHANGED
|
@@ -233,8 +233,9 @@ module Orb
|
|
|
233
233
|
# before invoice-level adjustments and credits) denominated in the alert's
|
|
234
234
|
# currency exceeds predefined thresholds during the current billing cycle;
|
|
235
235
|
# `price_filters` can scope which prices contribute. Each plan can have one
|
|
236
|
-
# `cost_exceeded` alert
|
|
237
|
-
#
|
|
236
|
+
# `cost_exceeded` alert, one `usage_exceeded` alert per metric that is a part of
|
|
237
|
+
# the plan, and up to 50 `spend_exceeded` alerts, one per combination of currency
|
|
238
|
+
# and `price_filters`, so separate products can each have their own spend alert.
|
|
238
239
|
#
|
|
239
240
|
# @overload create_for_plan(plan_id, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, plan_version: nil, price_filters: nil, request_options: {})
|
|
240
241
|
#
|
|
@@ -285,8 +286,10 @@ module Orb
|
|
|
285
286
|
# spend (the pricing subtotal, before invoice-level adjustments and credits)
|
|
286
287
|
# denominated in the alert's currency exceeds predefined thresholds during the
|
|
287
288
|
# current billing cycle; `price_filters` can scope which prices contribute. Each
|
|
288
|
-
# subscription can have one `cost_exceeded` alert
|
|
289
|
-
#
|
|
289
|
+
# subscription can have one `cost_exceeded` alert, one `usage_exceeded` alert per
|
|
290
|
+
# metric that is a part of the subscription, and up to 50 `spend_exceeded` alerts,
|
|
291
|
+
# one per combination of currency and `price_filters`, so separate products can
|
|
292
|
+
# each have their own spend alert.
|
|
290
293
|
#
|
|
291
294
|
# @overload create_for_subscription(subscription_id, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, price_filters: nil, threshold_overrides: nil, request_options: {})
|
|
292
295
|
#
|
|
@@ -75,6 +75,82 @@ module Orb
|
|
|
75
75
|
)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
# This endpoint returns a customer's credit balance in a single currency or custom
|
|
79
|
+
# pricing unit: the total available balance, the balance waiting on payment, and
|
|
80
|
+
# the next upcoming expiration.
|
|
81
|
+
#
|
|
82
|
+
# `balance` is the sum of `balance` across the customer's `active` credit blocks,
|
|
83
|
+
# as listed by
|
|
84
|
+
# [Fetch customer credit balance](/api-reference/credit/fetch-customer-credit-balance).
|
|
85
|
+
# Expired, depleted, and voided blocks are not included. Blocks in
|
|
86
|
+
# `pending_payment` status are totaled in `pending_payment_balance` instead, and
|
|
87
|
+
# become available once their invoice is paid.
|
|
88
|
+
#
|
|
89
|
+
# Note that `currency` defaults to credits if not specified. To use a real world
|
|
90
|
+
# currency, set `currency` to an ISO 4217 string. A customer with no credits in
|
|
91
|
+
# that currency returns a balance of `0`.
|
|
92
|
+
#
|
|
93
|
+
# @overload fetch_balance(customer_id, currency: nil, request_options: {})
|
|
94
|
+
#
|
|
95
|
+
# @param customer_id [String]
|
|
96
|
+
#
|
|
97
|
+
# @param currency [String, nil] The ledger currency or custom pricing unit to use.
|
|
98
|
+
#
|
|
99
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
100
|
+
#
|
|
101
|
+
# @return [Orb::Models::Customers::CreditFetchBalanceResponse]
|
|
102
|
+
#
|
|
103
|
+
# @see Orb::Models::Customers::CreditFetchBalanceParams
|
|
104
|
+
def fetch_balance(customer_id, params = {})
|
|
105
|
+
parsed, options = Orb::Customers::CreditFetchBalanceParams.dump_request(params)
|
|
106
|
+
query = Orb::Internal::Util.encode_query_params(parsed)
|
|
107
|
+
@client.request(
|
|
108
|
+
method: :get,
|
|
109
|
+
path: ["customers/%1$s/credits/balance", customer_id],
|
|
110
|
+
query: query,
|
|
111
|
+
model: Orb::Models::Customers::CreditFetchBalanceResponse,
|
|
112
|
+
options: options
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# This endpoint returns a customer's credit balance in a single currency or custom
|
|
117
|
+
# pricing unit: the total available balance, the balance waiting on payment, and
|
|
118
|
+
# the next upcoming expiration.
|
|
119
|
+
#
|
|
120
|
+
# `balance` is the sum of `balance` across the customer's `active` credit blocks,
|
|
121
|
+
# as listed by
|
|
122
|
+
# [Fetch customer credit balance](/api-reference/credit/fetch-customer-credit-balance).
|
|
123
|
+
# Expired, depleted, and voided blocks are not included. Blocks in
|
|
124
|
+
# `pending_payment` status are totaled in `pending_payment_balance` instead, and
|
|
125
|
+
# become available once their invoice is paid.
|
|
126
|
+
#
|
|
127
|
+
# Note that `currency` defaults to credits if not specified. To use a real world
|
|
128
|
+
# currency, set `currency` to an ISO 4217 string. A customer with no credits in
|
|
129
|
+
# that currency returns a balance of `0`.
|
|
130
|
+
#
|
|
131
|
+
# @overload fetch_balance_by_external_id(external_customer_id, currency: nil, request_options: {})
|
|
132
|
+
#
|
|
133
|
+
# @param external_customer_id [String]
|
|
134
|
+
#
|
|
135
|
+
# @param currency [String, nil] The ledger currency or custom pricing unit to use.
|
|
136
|
+
#
|
|
137
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
138
|
+
#
|
|
139
|
+
# @return [Orb::Models::Customers::CreditFetchBalanceByExternalIDResponse]
|
|
140
|
+
#
|
|
141
|
+
# @see Orb::Models::Customers::CreditFetchBalanceByExternalIDParams
|
|
142
|
+
def fetch_balance_by_external_id(external_customer_id, params = {})
|
|
143
|
+
parsed, options = Orb::Customers::CreditFetchBalanceByExternalIDParams.dump_request(params)
|
|
144
|
+
query = Orb::Internal::Util.encode_query_params(parsed)
|
|
145
|
+
@client.request(
|
|
146
|
+
method: :get,
|
|
147
|
+
path: ["customers/external_customer_id/%1$s/credits/balance", external_customer_id],
|
|
148
|
+
query: query,
|
|
149
|
+
model: Orb::Models::Customers::CreditFetchBalanceByExternalIDResponse,
|
|
150
|
+
options: options
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
|
|
78
154
|
# Some parameter documentations has been truncated, see
|
|
79
155
|
# {Orb::Models::Customers::CreditListByExternalIDParams} for more details.
|
|
80
156
|
#
|
|
@@ -897,6 +897,66 @@ module Orb
|
|
|
897
897
|
)
|
|
898
898
|
end
|
|
899
899
|
|
|
900
|
+
# Some parameter documentations has been truncated, see
|
|
901
|
+
# {Orb::Models::SubscriptionListSummaryParams} for more details.
|
|
902
|
+
#
|
|
903
|
+
# This is a lighter-weight version of
|
|
904
|
+
# [List subscriptions](/api-reference/subscription/list-subscriptions), with the
|
|
905
|
+
# same filters, pagination and order. It returns each subscription's own fields,
|
|
906
|
+
# with its plan and customer as references, and leaves out price intervals,
|
|
907
|
+
# billing periods, plan phases and other derived fields, making it faster to
|
|
908
|
+
# respond. Fetch a subscription for those.
|
|
909
|
+
#
|
|
910
|
+
# This is the same summary of a subscription that standard
|
|
911
|
+
# [webhook payloads](/integrations-and-exports/webhook-payload-styles) carry.
|
|
912
|
+
#
|
|
913
|
+
# @overload list_summary(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, customer_id: nil, external_customer_id: nil, external_plan_id: nil, limit: nil, plan_id: nil, status: nil, request_options: {})
|
|
914
|
+
#
|
|
915
|
+
# @param created_at_gt [Time, nil]
|
|
916
|
+
#
|
|
917
|
+
# @param created_at_gte [Time, nil]
|
|
918
|
+
#
|
|
919
|
+
# @param created_at_lt [Time, nil]
|
|
920
|
+
#
|
|
921
|
+
# @param created_at_lte [Time, nil]
|
|
922
|
+
#
|
|
923
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
924
|
+
#
|
|
925
|
+
# @param customer_id [String, nil]
|
|
926
|
+
#
|
|
927
|
+
# @param external_customer_id [String, nil]
|
|
928
|
+
#
|
|
929
|
+
# @param external_plan_id [String, nil]
|
|
930
|
+
#
|
|
931
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
932
|
+
#
|
|
933
|
+
# @param plan_id [String, nil]
|
|
934
|
+
#
|
|
935
|
+
# @param status [Symbol, Orb::Models::SubscriptionListSummaryParams::Status, nil]
|
|
936
|
+
#
|
|
937
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
938
|
+
#
|
|
939
|
+
# @return [Orb::Internal::Page<Orb::Models::SubscriptionListSummaryResponse>]
|
|
940
|
+
#
|
|
941
|
+
# @see Orb::Models::SubscriptionListSummaryParams
|
|
942
|
+
def list_summary(params = {})
|
|
943
|
+
parsed, options = Orb::SubscriptionListSummaryParams.dump_request(params)
|
|
944
|
+
query = Orb::Internal::Util.encode_query_params(parsed)
|
|
945
|
+
@client.request(
|
|
946
|
+
method: :get,
|
|
947
|
+
path: "subscriptions/summary",
|
|
948
|
+
query: query.transform_keys(
|
|
949
|
+
created_at_gt: "created_at[gt]",
|
|
950
|
+
created_at_gte: "created_at[gte]",
|
|
951
|
+
created_at_lt: "created_at[lt]",
|
|
952
|
+
created_at_lte: "created_at[lte]"
|
|
953
|
+
),
|
|
954
|
+
page: Orb::Internal::Page,
|
|
955
|
+
model: Orb::Models::SubscriptionListSummaryResponse,
|
|
956
|
+
options: options
|
|
957
|
+
)
|
|
958
|
+
end
|
|
959
|
+
|
|
900
960
|
# Some parameter documentations has been truncated, see
|
|
901
961
|
# {Orb::Models::SubscriptionPriceIntervalsParams} for more details.
|
|
902
962
|
#
|
data/lib/orb/version.rb
CHANGED
data/lib/orb.rb
CHANGED
|
@@ -147,6 +147,10 @@ require_relative "orb/models/customers/cost_list_by_external_id_params"
|
|
|
147
147
|
require_relative "orb/models/customers/cost_list_by_external_id_response"
|
|
148
148
|
require_relative "orb/models/customers/cost_list_params"
|
|
149
149
|
require_relative "orb/models/customers/cost_list_response"
|
|
150
|
+
require_relative "orb/models/customers/credit_fetch_balance_by_external_id_params"
|
|
151
|
+
require_relative "orb/models/customers/credit_fetch_balance_by_external_id_response"
|
|
152
|
+
require_relative "orb/models/customers/credit_fetch_balance_params"
|
|
153
|
+
require_relative "orb/models/customers/credit_fetch_balance_response"
|
|
150
154
|
require_relative "orb/models/customers/credit_list_by_external_id_params"
|
|
151
155
|
require_relative "orb/models/customers/credit_list_by_external_id_response"
|
|
152
156
|
require_relative "orb/models/customers/credit_list_params"
|
|
@@ -495,6 +499,8 @@ require_relative "orb/models/subscription_invoicing_threshold_exceeded_webhook_e
|
|
|
495
499
|
require_relative "orb/models/subscription_license_allocation_reset_webhook_event"
|
|
496
500
|
require_relative "orb/models/subscription_license_balance_threshold_reached_webhook_event"
|
|
497
501
|
require_relative "orb/models/subscription_list_params"
|
|
502
|
+
require_relative "orb/models/subscription_list_summary_params"
|
|
503
|
+
require_relative "orb/models/subscription_list_summary_response"
|
|
498
504
|
require_relative "orb/models/subscription_minified"
|
|
499
505
|
require_relative "orb/models/subscription_plan_changed_webhook_event"
|
|
500
506
|
require_relative "orb/models/subscription_plan_change_scheduled_webhook_event"
|