metronome-sdk 2.0.0 → 2.2.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 +75 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +7 -1
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +38 -26
- data/lib/metronome_sdk/internal/util.rb +7 -2
- data/lib/metronome_sdk/models/contract.rb +1 -0
- data/lib/metronome_sdk/models/contract_v2.rb +69 -23
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +45 -21
- data/lib/metronome_sdk/models/subscription.rb +38 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +33 -1
- data/lib/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +195 -29
- data/lib/metronome_sdk/models/v1/contract_list_balances_params.rb +9 -1
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +105 -3
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +14 -10
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +1 -0
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_response.rb +111 -0
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +32 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +21 -2
- data/lib/metronome_sdk/models/v1/customers/billing_config_delete_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +21 -2
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +1 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +34 -1
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +144 -4
- data/lib/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/payment.rb +7 -1
- data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rb +74 -0
- data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rb +12 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_create_params.rb +74 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_create_response.rb +31 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_list_params.rb +26 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_list_response.rb +105 -0
- data/lib/metronome_sdk/models/v1/usage_search_response.rb +6 -3
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +17 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +17 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +300 -10
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +177 -3
- data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/contracts.rb +10 -4
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +10 -5
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +12 -5
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +2 -1
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +2 -1
- data/lib/metronome_sdk/resources/v1/customers/plans.rb +8 -4
- data/lib/metronome_sdk/resources/v1/customers.rb +12 -8
- data/lib/metronome_sdk/resources/v1/plans.rb +8 -4
- data/lib/metronome_sdk/resources/v1/settings/billing_providers.rb +75 -0
- data/lib/metronome_sdk/resources/v1/settings.rb +57 -0
- data/lib/metronome_sdk/resources/v1.rb +4 -0
- data/lib/metronome_sdk/resources/v2/contracts.rb +10 -2
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +11 -0
- data/manifest.yaml +2 -0
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +5 -0
- data/rbi/metronome_sdk/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/metronome_sdk/internal/type/base_model.rbi +8 -4
- data/rbi/metronome_sdk/models/contract.rbi +5 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +122 -33
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +63 -27
- data/rbi/metronome_sdk/models/subscription.rbi +64 -3
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +69 -0
- data/rbi/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +360 -33
- data/rbi/metronome_sdk/models/v1/contract_list_balances_params.rbi +11 -0
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +215 -0
- data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +18 -11
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_response.rbi +281 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +67 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +29 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_delete_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +24 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +2 -2
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +76 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +268 -0
- data/rbi/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/payment.rbi +11 -3
- data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbi +128 -0
- data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rbi +25 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_params.rbi +162 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_response.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_list_params.rbi +50 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_list_response.rbi +245 -0
- data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +11 -3
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +22 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +22 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +630 -9
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +367 -3
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +13 -1
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +10 -5
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +14 -4
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +3 -2
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +2 -1
- data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1/customers.rbi +19 -9
- data/rbi/metronome_sdk/resources/v1/plans.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1/settings/billing_providers.rbi +63 -0
- data/rbi/metronome_sdk/resources/v1/settings.rbi +51 -0
- data/rbi/metronome_sdk/resources/v1.rbi +3 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +12 -0
- data/sig/metronome_sdk/internal/transport/base_client.rbs +2 -0
- data/sig/metronome_sdk/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/metronome_sdk/models/contract.rbs +2 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +33 -6
- data/sig/metronome_sdk/models/subscription.rbs +22 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +28 -0
- data/sig/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +104 -0
- data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +85 -0
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_response.rbs +119 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +26 -1
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +16 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_delete_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +32 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +130 -0
- data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbs +7 -0
- data/sig/metronome_sdk/models/v1/payment.rbs +10 -3
- data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbs +61 -0
- data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rbs +13 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_create_params.rbs +66 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_create_response.rbs +34 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_list_params.rbs +28 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_list_response.rbs +102 -0
- data/sig/metronome_sdk/models/v1/usage_search_response.rbs +3 -1
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +14 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +14 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +234 -3
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +131 -3
- data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -0
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/billing_config.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/customers.rbs +2 -1
- data/sig/metronome_sdk/resources/v1/settings/billing_providers.rbs +23 -0
- data/sig/metronome_sdk/resources/v1/settings.rbs +20 -0
- data/sig/metronome_sdk/resources/v1.rbs +2 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +4 -0
- metadata +29 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24c53b426a786c58cd7f8d4ae93526596c3a4fa93b6b662e5de17309317f36e5
|
|
4
|
+
data.tar.gz: 1409a92e54deccc0ae37945c293b208cf27149114eae2509af99fe87a4584ece
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7472b69ef8d4e84138a0b0818d3cf770268065044819e86804727fc00dc92c66b4f1e36ffac58131da73983ab124d3872aae8054bbc4731581aab51168eb08b3
|
|
7
|
+
data.tar.gz: 5cffe8618d7460adf817768b5a91d0d478c1ed1103211571def61d3e76c5fa31adf91847158d62e188fd170edc88d718f1501c5966249314acd45f92dfa1a716
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,80 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.0 (2025-12-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.1.0...v2.2.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v2.1.0...v2.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* [ORCH-605] uses x-mint groups to enable conditional rendering of gated revenue system config apis ([22ceee8](https://github.com/Metronome-Industries/metronome-ruby/commit/22ceee870bf6b1642ff4283b37485be599658e47))
|
|
10
|
+
* [ORCH-752] Update contract creation endpoints to allow setting revenue system configuration ([c2ca4f7](https://github.com/Metronome-Industries/metronome-ruby/commit/c2ca4f7ef46b0ead89b74a6e75a37a2ba55d9dc8))
|
|
11
|
+
* Add `commit_transactions` to the body of `/upsertAvalaraCredentials` endpoint ([d99cab3](https://github.com/Metronome-Industries/metronome-ruby/commit/d99cab3cda4f2da4f80ec925c76583e31ea1763a))
|
|
12
|
+
* Add `seat_filter` field to creation request and response parameters of the alert object ([165e3f0](https://github.com/Metronome-Industries/metronome-ruby/commit/165e3f0deab903b00fb7b4b235179b52a4f8093f))
|
|
13
|
+
* add quantity to plan pricing adjustment response ([cbf2539](https://github.com/Metronome-Industries/metronome-ruby/commit/cbf2539bbab6fac9f0d4984cd0f88c9f6b0ceea2))
|
|
14
|
+
* adds external_payment_id to ExternalInvoice ([ff5f18f](https://github.com/Metronome-Industries/metronome-ruby/commit/ff5f18f6b14e08b4c499689ca329b357a03177a9))
|
|
15
|
+
* everything ([6188141](https://github.com/Metronome-Industries/metronome-ruby/commit/618814115adbe126a1b0b5a330244034a14c98f7))
|
|
16
|
+
* GET-6845 get openapi specs ready for GA ([dc48f09](https://github.com/Metronome-Industries/metronome-ruby/commit/dc48f094c3283251a7f452aa4cc3db917ee7eba6))
|
|
17
|
+
* include aggregation BM info from searchEvents ([ea0dfc0](https://github.com/Metronome-Industries/metronome-ruby/commit/ea0dfc021a244b0e0d3ebfbcdacfc053f5194b61))
|
|
18
|
+
* ORCH-833/948/946/947 - updated the API to accept aws_customer_account_id all gated behind a feature flag ([4c2e292](https://github.com/Metronome-Industries/metronome-ruby/commit/4c2e2926ed8b6d0844b3670312f9780f14df2beb))
|
|
19
|
+
* remove beta language, FF, stainless skip ([b504def](https://github.com/Metronome-Industries/metronome-ruby/commit/b504defa5b97aa3f622bbc746e76ac12691d1e90))
|
|
20
|
+
* Return values for set customer billing configuration endpoint ([1641a74](https://github.com/Metronome-Industries/metronome-ruby/commit/1641a74439ebf507fb85f0478bbd056f6047c173))
|
|
21
|
+
* update create alert api to allow LowRemainingSeatBalanceReached alert ([54a60e6](https://github.com/Metronome-Industries/metronome-ruby/commit/54a60e6027b889e61554b7a006c780e3a9fc4815))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* better thread safety via early initializing SSL store during HTTP client creation ([341992d](https://github.com/Metronome-Industries/metronome-ruby/commit/341992d633b9191d24209713f5f6a734d2229601))
|
|
27
|
+
* calling `break` out of streams should be instantaneous ([0db918b](https://github.com/Metronome-Industries/metronome-ruby/commit/0db918bb075b3420715faf0e73ef96cc01d58697))
|
|
28
|
+
* issue where json.parse errors when receiving HTTP 204 with nobody ([7a27bb6](https://github.com/Metronome-Industries/metronome-ruby/commit/7a27bb648e886deaf33358cde8f5c3c5d80ccf42))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Chores
|
|
32
|
+
|
|
33
|
+
* **client:** send user-agent header ([379e4e4](https://github.com/Metronome-Industries/metronome-ruby/commit/379e4e46eb858bce94633dd193fbc1526ea1c42c))
|
|
34
|
+
* explicitly require "base64" gem ([5d4a7dc](https://github.com/Metronome-Industries/metronome-ruby/commit/5d4a7dc568346f2fc33ab39cf1517582923d98d5))
|
|
35
|
+
* **internal:** codegen related update ([9878983](https://github.com/Metronome-Industries/metronome-ruby/commit/9878983e4d67b0d04d543d7a49afdd14e9eb4f73))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Documentation
|
|
39
|
+
|
|
40
|
+
* document missing fields for schemas related to recurring credits and commits ([d848e15](https://github.com/Metronome-Industries/metronome-ruby/commit/d848e159b2046aebccea5d2b3915779adf891791))
|
|
41
|
+
|
|
42
|
+
## 2.1.0 (2025-10-31)
|
|
43
|
+
|
|
44
|
+
Full Changelog: [v2.0.0...v2.1.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v2.0.0...v2.1.0)
|
|
45
|
+
|
|
46
|
+
### Features
|
|
47
|
+
|
|
48
|
+
* [ORCH-282] plumb `payment_method_id` to the payment gateway object ([bba092f](https://github.com/Metronome-Industries/metronome-ruby/commit/bba092fbe0b66d2f2df6187c579bdc0458375a65))
|
|
49
|
+
* [ORCH-797] add billing_provider_error to invoice.external_invoice ([7f77e42](https://github.com/Metronome-Industries/metronome-ruby/commit/7f77e42d219f720783d480096248bf153e771336))
|
|
50
|
+
* Add avalara creds + billing provider APIs to SDK. Add avalara creds API to docs. ([9808e39](https://github.com/Metronome-Industries/metronome-ruby/commit/9808e39003df39e50183c64e806ef4589819353d))
|
|
51
|
+
* add beta tag to stripe auto charge items ([652727e](https://github.com/Metronome-Industries/metronome-ruby/commit/652727e1f6df7269a3b6db00f401460aab32ce6d))
|
|
52
|
+
* add exclude_zero_balances field behind a FF for anthropic ([9e7b1a4](https://github.com/Metronome-Industries/metronome-ruby/commit/9e7b1a461fe7eb13fd846f18f0ea329f6b1083b7))
|
|
53
|
+
* add METRONOME to BillingProvider type ([2f7e988](https://github.com/Metronome-Industries/metronome-ruby/commit/2f7e9882bf53acae0356e748be68e37067ef9bd9))
|
|
54
|
+
* docs(api) Documentation for seat-based subscription linked recurring commits beta release ([2e53b04](https://github.com/Metronome-Industries/metronome-ruby/commit/2e53b04d23b9e49184bd91d32c712a4c59a73f0a))
|
|
55
|
+
* handle thread interrupts in the core HTTP client ([db696fe](https://github.com/Metronome-Industries/metronome-ruby/commit/db696fe074207b842d076aaafa549c5695c87dd5))
|
|
56
|
+
* ignore_duplicates ([cd50ce6](https://github.com/Metronome-Industries/metronome-ruby/commit/cd50ce63586d55d98557e050024cad863be60b99))
|
|
57
|
+
* internal: moving plans docs to deprecated section of new docs site ([f5f12b4](https://github.com/Metronome-Industries/metronome-ruby/commit/f5f12b4af2bbc39d892b885b6b6f768128330806))
|
|
58
|
+
* not ready for review ([efabbf6](https://github.com/Metronome-Industries/metronome-ruby/commit/efabbf64195a0575e5136ba7de0a0552a11a7592))
|
|
59
|
+
* not ready for review ([624dd4f](https://github.com/Metronome-Industries/metronome-ruby/commit/624dd4f2c827279317bb7ac53cb9c8ab9aa4dde8))
|
|
60
|
+
* Relax requirement on customer level commits for invoice_contract_id if do_not_invoice is set to true ([af4a8a7](https://github.com/Metronome-Industries/metronome-ruby/commit/af4a8a72d376d709a69b9cd248e54ef12eaa8124))
|
|
61
|
+
* update get customer alerts api to include low seat balance type ([1e08e6d](https://github.com/Metronome-Industries/metronome-ruby/commit/1e08e6d2f1186dd47e17a6bf986d8732ec9801b3))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* **api:** Make id field required in /v2/notifications/edit ([34c16c6](https://github.com/Metronome-Industries/metronome-ruby/commit/34c16c6bcebdfc18765883b017708225cf6d312c))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Chores
|
|
70
|
+
|
|
71
|
+
* **api:** Note SQL BM is not supported in previewCustomerEvents description ([1bb482c](https://github.com/Metronome-Industries/metronome-ruby/commit/1bb482c536bc70849b425b45a073431cf4dff009))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Documentation
|
|
75
|
+
|
|
76
|
+
* add migrate amendments to edits page ([6b10754](https://github.com/Metronome-Industries/metronome-ruby/commit/6b1075422730cb9b1b254ac7549c76b8f5f8d475))
|
|
77
|
+
|
|
3
78
|
## 2.0.0 (2025-10-16)
|
|
4
79
|
|
|
5
80
|
Full Changelog: [v1.0.0...v2.0.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v1.0.0...v2.0.0)
|
data/README.md
CHANGED
|
@@ -201,7 +201,8 @@ module MetronomeSDK
|
|
|
201
201
|
self.class::PLATFORM_HEADERS,
|
|
202
202
|
{
|
|
203
203
|
"accept" => "application/json",
|
|
204
|
-
"content-type" => "application/json"
|
|
204
|
+
"content-type" => "application/json",
|
|
205
|
+
"user-agent" => user_agent
|
|
205
206
|
},
|
|
206
207
|
headers
|
|
207
208
|
)
|
|
@@ -219,6 +220,11 @@ module MetronomeSDK
|
|
|
219
220
|
# @return [Hash{String=>String}]
|
|
220
221
|
private def auth_headers = {}
|
|
221
222
|
|
|
223
|
+
# @api private
|
|
224
|
+
#
|
|
225
|
+
# @return [String]
|
|
226
|
+
private def user_agent = "#{self.class.name}/Ruby #{MetronomeSDK::VERSION}"
|
|
227
|
+
|
|
222
228
|
# @api private
|
|
223
229
|
#
|
|
224
230
|
# @return [String]
|
|
@@ -16,10 +16,11 @@ module MetronomeSDK
|
|
|
16
16
|
class << self
|
|
17
17
|
# @api private
|
|
18
18
|
#
|
|
19
|
+
# @param cert_store [OpenSSL::X509::Store]
|
|
19
20
|
# @param url [URI::Generic]
|
|
20
21
|
#
|
|
21
22
|
# @return [Net::HTTP]
|
|
22
|
-
def connect(url)
|
|
23
|
+
def connect(cert_store:, url:)
|
|
23
24
|
port =
|
|
24
25
|
case [url.port, url.scheme]
|
|
25
26
|
in [Integer, _]
|
|
@@ -33,6 +34,8 @@ module MetronomeSDK
|
|
|
33
34
|
Net::HTTP.new(url.host, port).tap do
|
|
34
35
|
_1.use_ssl = %w[https wss].include?(url.scheme)
|
|
35
36
|
_1.max_retries = 0
|
|
37
|
+
|
|
38
|
+
(_1.cert_store = cert_store) if _1.use_ssl?
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
|
|
@@ -102,7 +105,7 @@ module MetronomeSDK
|
|
|
102
105
|
pool =
|
|
103
106
|
@mutex.synchronize do
|
|
104
107
|
@pools[origin] ||= ConnectionPool.new(size: @size) do
|
|
105
|
-
self.class.connect(url)
|
|
108
|
+
self.class.connect(cert_store: @cert_store, url: url)
|
|
106
109
|
end
|
|
107
110
|
end
|
|
108
111
|
|
|
@@ -128,40 +131,50 @@ module MetronomeSDK
|
|
|
128
131
|
url, deadline = request.fetch_values(:url, :deadline)
|
|
129
132
|
|
|
130
133
|
req = nil
|
|
131
|
-
eof = false
|
|
132
134
|
finished = false
|
|
133
|
-
closing = nil
|
|
134
135
|
|
|
135
136
|
# rubocop:disable Metrics/BlockLength
|
|
136
137
|
enum = Enumerator.new do |y|
|
|
137
138
|
next if finished
|
|
138
139
|
|
|
139
140
|
with_pool(url, deadline: deadline) do |conn|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
conn.start
|
|
148
|
-
end
|
|
141
|
+
eof = false
|
|
142
|
+
closing = nil
|
|
143
|
+
::Thread.handle_interrupt(Object => :never) do
|
|
144
|
+
::Thread.handle_interrupt(Object => :immediate) do
|
|
145
|
+
req, closing = self.class.build_request(request) do
|
|
146
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
147
|
+
end
|
|
149
148
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
rsp.read_body do |bytes|
|
|
156
|
-
y << bytes.force_encoding(Encoding::BINARY)
|
|
157
|
-
break if finished
|
|
149
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
150
|
+
unless conn.started?
|
|
151
|
+
conn.keep_alive_timeout = self.class::KEEP_ALIVE_TIMEOUT
|
|
152
|
+
conn.start
|
|
153
|
+
end
|
|
158
154
|
|
|
159
155
|
self.class.calibrate_socket_timeout(conn, deadline)
|
|
156
|
+
::Kernel.catch(:jump) do
|
|
157
|
+
conn.request(req) do |rsp|
|
|
158
|
+
y << [req, rsp]
|
|
159
|
+
::Kernel.throw(:jump) if finished
|
|
160
|
+
|
|
161
|
+
rsp.read_body do |bytes|
|
|
162
|
+
y << bytes.force_encoding(Encoding::BINARY)
|
|
163
|
+
::Kernel.throw(:jump) if finished
|
|
164
|
+
|
|
165
|
+
self.class.calibrate_socket_timeout(conn, deadline)
|
|
166
|
+
end
|
|
167
|
+
eof = true
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
ensure
|
|
172
|
+
begin
|
|
173
|
+
conn.finish if !eof && conn&.started?
|
|
174
|
+
ensure
|
|
175
|
+
closing&.call
|
|
160
176
|
end
|
|
161
|
-
eof = true
|
|
162
177
|
end
|
|
163
|
-
ensure
|
|
164
|
-
conn.finish if !eof && conn&.started?
|
|
165
178
|
end
|
|
166
179
|
rescue Timeout::Error
|
|
167
180
|
raise MetronomeSDK::Errors::APITimeoutError.new(url: url, request: req)
|
|
@@ -174,8 +187,6 @@ module MetronomeSDK
|
|
|
174
187
|
body = MetronomeSDK::Internal::Util.fused_enum(enum, external: true) do
|
|
175
188
|
finished = true
|
|
176
189
|
loop { enum.next }
|
|
177
|
-
ensure
|
|
178
|
-
closing&.call
|
|
179
190
|
end
|
|
180
191
|
[Integer(response.code), response, body]
|
|
181
192
|
end
|
|
@@ -186,6 +197,7 @@ module MetronomeSDK
|
|
|
186
197
|
def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
|
|
187
198
|
@mutex = Mutex.new
|
|
188
199
|
@size = size
|
|
200
|
+
@cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
|
|
189
201
|
@pools = {}
|
|
190
202
|
end
|
|
191
203
|
|
|
@@ -657,7 +657,8 @@ module MetronomeSDK
|
|
|
657
657
|
def decode_content(headers, stream:, suppress_error: false)
|
|
658
658
|
case (content_type = headers["content-type"])
|
|
659
659
|
in MetronomeSDK::Internal::Util::JSON_CONTENT
|
|
660
|
-
json = stream.to_a.join
|
|
660
|
+
return nil if (json = stream.to_a.join).empty?
|
|
661
|
+
|
|
661
662
|
begin
|
|
662
663
|
JSON.parse(json, symbolize_names: true)
|
|
663
664
|
rescue JSON::ParserError => e
|
|
@@ -667,7 +668,11 @@ module MetronomeSDK
|
|
|
667
668
|
in MetronomeSDK::Internal::Util::JSONL_CONTENT
|
|
668
669
|
lines = decode_lines(stream)
|
|
669
670
|
chain_fused(lines) do |y|
|
|
670
|
-
lines.each
|
|
671
|
+
lines.each do
|
|
672
|
+
next if _1.empty?
|
|
673
|
+
|
|
674
|
+
y << JSON.parse(_1, symbolize_names: true)
|
|
675
|
+
end
|
|
671
676
|
end
|
|
672
677
|
in %r{^text/event-stream}
|
|
673
678
|
lines = decode_lines(stream)
|
|
@@ -445,7 +445,13 @@ module MetronomeSDK
|
|
|
445
445
|
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
|
446
446
|
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
|
447
447
|
|
|
448
|
-
# @!
|
|
448
|
+
# @!attribute subscription_config
|
|
449
|
+
# Attach a subscription to the recurring commit/credit.
|
|
450
|
+
#
|
|
451
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
452
|
+
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
453
|
+
|
|
454
|
+
# @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
|
|
449
455
|
# Some parameter documentations has been truncated, see
|
|
450
456
|
# {MetronomeSDK::Models::ContractV2::Commit} for more details.
|
|
451
457
|
#
|
|
@@ -498,6 +504,8 @@ module MetronomeSDK
|
|
|
498
504
|
# @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
|
|
499
505
|
#
|
|
500
506
|
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
|
507
|
+
#
|
|
508
|
+
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
501
509
|
|
|
502
510
|
# @see MetronomeSDK::Models::ContractV2::Commit#product
|
|
503
511
|
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -1646,6 +1654,15 @@ module MetronomeSDK
|
|
|
1646
1654
|
# @return [MetronomeSDK::Models::ContractV2::Credit::Contract, nil]
|
|
1647
1655
|
optional :contract, -> { MetronomeSDK::ContractV2::Credit::Contract }
|
|
1648
1656
|
|
|
1657
|
+
# @!attribute created_at
|
|
1658
|
+
# Timestamp of when the credit was created.
|
|
1659
|
+
#
|
|
1660
|
+
# - Recurring credits: latter of credit service period date and parent credit
|
|
1661
|
+
# start date
|
|
1662
|
+
#
|
|
1663
|
+
# @return [Time, nil]
|
|
1664
|
+
optional :created_at, Time
|
|
1665
|
+
|
|
1649
1666
|
# @!attribute custom_fields
|
|
1650
1667
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1651
1668
|
#
|
|
@@ -1703,7 +1720,13 @@ module MetronomeSDK
|
|
|
1703
1720
|
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
|
1704
1721
|
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
|
1705
1722
|
|
|
1706
|
-
# @!
|
|
1723
|
+
# @!attribute subscription_config
|
|
1724
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1725
|
+
#
|
|
1726
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
1727
|
+
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
1728
|
+
|
|
1729
|
+
# @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, created_at: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
|
|
1707
1730
|
# Some parameter documentations has been truncated, see
|
|
1708
1731
|
# {MetronomeSDK::Models::ContractV2::Credit} for more details.
|
|
1709
1732
|
#
|
|
@@ -1725,6 +1748,8 @@ module MetronomeSDK
|
|
|
1725
1748
|
#
|
|
1726
1749
|
# @param contract [MetronomeSDK::Models::ContractV2::Credit::Contract]
|
|
1727
1750
|
#
|
|
1751
|
+
# @param created_at [Time] Timestamp of when the credit was created.
|
|
1752
|
+
#
|
|
1728
1753
|
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1729
1754
|
#
|
|
1730
1755
|
# @param description [String]
|
|
@@ -1742,6 +1767,8 @@ module MetronomeSDK
|
|
|
1742
1767
|
# @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
|
|
1743
1768
|
#
|
|
1744
1769
|
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
|
1770
|
+
#
|
|
1771
|
+
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
1745
1772
|
|
|
1746
1773
|
# @see MetronomeSDK::Models::ContractV2::Credit#product
|
|
1747
1774
|
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2148,6 +2175,7 @@ module MetronomeSDK
|
|
|
2148
2175
|
QUICKBOOKS_ONLINE = :quickbooks_online
|
|
2149
2176
|
WORKDAY = :workday
|
|
2150
2177
|
GCP_MARKETPLACE = :gcp_marketplace
|
|
2178
|
+
METRONOME = :metronome
|
|
2151
2179
|
|
|
2152
2180
|
# @!method self.values
|
|
2153
2181
|
# @return [Array<Symbol>]
|
|
@@ -2246,10 +2274,13 @@ module MetronomeSDK
|
|
|
2246
2274
|
# @see MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration#parent_behavior
|
|
2247
2275
|
class ParentBehavior < MetronomeSDK::Internal::Type::BaseModel
|
|
2248
2276
|
# @!attribute invoice_consolidation_type
|
|
2249
|
-
# Indicates the desired behavior of consolidated invoices
|
|
2250
|
-
# in a customer hierarchy
|
|
2251
|
-
#
|
|
2252
|
-
#
|
|
2277
|
+
# Account hierarchy M3 - Indicates the desired behavior of consolidated invoices
|
|
2278
|
+
# generated by the parent in a customer hierarchy
|
|
2279
|
+
#
|
|
2280
|
+
# **CONCATENATE**: Statements on the invoices of child customers will be appended
|
|
2281
|
+
# to the consolidated invoice
|
|
2282
|
+
#
|
|
2283
|
+
# **NONE**: Do not generate consolidated invoices
|
|
2253
2284
|
#
|
|
2254
2285
|
# @return [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType, nil]
|
|
2255
2286
|
optional :invoice_consolidation_type,
|
|
@@ -2260,12 +2291,15 @@ module MetronomeSDK
|
|
|
2260
2291
|
# {MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior}
|
|
2261
2292
|
# for more details.
|
|
2262
2293
|
#
|
|
2263
|
-
# @param invoice_consolidation_type [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType] Indicates the desired behavior of consolidated invoices
|
|
2294
|
+
# @param invoice_consolidation_type [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType] Account hierarchy M3 - Indicates the desired behavior of consolidated invoices g
|
|
2264
2295
|
|
|
2265
|
-
# Indicates the desired behavior of consolidated invoices
|
|
2266
|
-
# in a customer hierarchy
|
|
2267
|
-
#
|
|
2268
|
-
#
|
|
2296
|
+
# Account hierarchy M3 - Indicates the desired behavior of consolidated invoices
|
|
2297
|
+
# generated by the parent in a customer hierarchy
|
|
2298
|
+
#
|
|
2299
|
+
# **CONCATENATE**: Statements on the invoices of child customers will be appended
|
|
2300
|
+
# to the consolidated invoice
|
|
2301
|
+
#
|
|
2302
|
+
# **NONE**: Do not generate consolidated invoices
|
|
2269
2303
|
#
|
|
2270
2304
|
# @see MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior#invoice_consolidation_type
|
|
2271
2305
|
module InvoiceConsolidationType
|
|
@@ -2289,17 +2323,23 @@ module MetronomeSDK
|
|
|
2289
2323
|
-> { MetronomeSDK::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Parent }
|
|
2290
2324
|
|
|
2291
2325
|
# @!attribute payer
|
|
2292
|
-
#
|
|
2326
|
+
# Account hierarchy M3 - Indicates which customer should pay for the child's
|
|
2327
|
+
# invoice charges **SELF**: The child pays for its own invoice charges **PARENT**:
|
|
2328
|
+
# The parent pays for the child's invoice charges
|
|
2293
2329
|
#
|
|
2294
2330
|
# @return [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Payer, nil]
|
|
2295
2331
|
optional :payer,
|
|
2296
2332
|
enum: -> { MetronomeSDK::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Payer }
|
|
2297
2333
|
|
|
2298
2334
|
# @!attribute usage_statement_behavior
|
|
2299
|
-
# Indicates the behavior of the child's invoice statements
|
|
2300
|
-
#
|
|
2301
|
-
#
|
|
2302
|
-
#
|
|
2335
|
+
# Account hierarchy M3 - Indicates the behavior of the child's invoice statements
|
|
2336
|
+
# on the parent's invoices.
|
|
2337
|
+
#
|
|
2338
|
+
# **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
2339
|
+
# consolidated invoices
|
|
2340
|
+
#
|
|
2341
|
+
# **SEPARATE**: Child's invoice statements will appear not appear on parent's
|
|
2342
|
+
# consolidated invoices
|
|
2303
2343
|
#
|
|
2304
2344
|
# @return [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::UsageStatementBehavior, nil]
|
|
2305
2345
|
optional :usage_statement_behavior,
|
|
@@ -2312,9 +2352,9 @@ module MetronomeSDK
|
|
|
2312
2352
|
#
|
|
2313
2353
|
# @param parent [MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Parent] The single parent contract/customer for this child.
|
|
2314
2354
|
#
|
|
2315
|
-
# @param payer [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Payer]
|
|
2355
|
+
# @param payer [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Payer] Account hierarchy M3 - Indicates which customer should pay for the child's invoi
|
|
2316
2356
|
#
|
|
2317
|
-
# @param usage_statement_behavior [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::UsageStatementBehavior] Indicates the behavior of the child's invoice statements
|
|
2357
|
+
# @param usage_statement_behavior [Symbol, MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::UsageStatementBehavior] Account hierarchy M3 - Indicates the behavior of the child's invoice statements
|
|
2318
2358
|
|
|
2319
2359
|
# @see MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2#parent
|
|
2320
2360
|
class Parent < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2335,7 +2375,9 @@ module MetronomeSDK
|
|
|
2335
2375
|
# @param customer_id [String]
|
|
2336
2376
|
end
|
|
2337
2377
|
|
|
2338
|
-
#
|
|
2378
|
+
# Account hierarchy M3 - Indicates which customer should pay for the child's
|
|
2379
|
+
# invoice charges **SELF**: The child pays for its own invoice charges **PARENT**:
|
|
2380
|
+
# The parent pays for the child's invoice charges
|
|
2339
2381
|
#
|
|
2340
2382
|
# @see MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2#payer
|
|
2341
2383
|
module Payer
|
|
@@ -2348,10 +2390,14 @@ module MetronomeSDK
|
|
|
2348
2390
|
# @return [Array<Symbol>]
|
|
2349
2391
|
end
|
|
2350
2392
|
|
|
2351
|
-
# Indicates the behavior of the child's invoice statements
|
|
2352
|
-
#
|
|
2353
|
-
#
|
|
2354
|
-
#
|
|
2393
|
+
# Account hierarchy M3 - Indicates the behavior of the child's invoice statements
|
|
2394
|
+
# on the parent's invoices.
|
|
2395
|
+
#
|
|
2396
|
+
# **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
2397
|
+
# consolidated invoices
|
|
2398
|
+
#
|
|
2399
|
+
# **SEPARATE**: Child's invoice statements will appear not appear on parent's
|
|
2400
|
+
# consolidated invoices
|
|
2355
2401
|
#
|
|
2356
2402
|
# @see MetronomeSDK::Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2#usage_statement_behavior
|
|
2357
2403
|
module UsageStatementBehavior
|
|
@@ -49,10 +49,13 @@ module MetronomeSDK
|
|
|
49
49
|
# @see MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration#parent_behavior
|
|
50
50
|
class ParentBehavior < MetronomeSDK::Internal::Type::BaseModel
|
|
51
51
|
# @!attribute invoice_consolidation_type
|
|
52
|
-
# Indicates the desired behavior of consolidated invoices
|
|
53
|
-
# in a customer hierarchy
|
|
54
|
-
#
|
|
55
|
-
#
|
|
52
|
+
# Account hierarchy M3 - Indicates the desired behavior of consolidated invoices
|
|
53
|
+
# generated by the parent in a customer hierarchy
|
|
54
|
+
#
|
|
55
|
+
# **CONCATENATE**: Statements on the invoices of child customers will be appended
|
|
56
|
+
# to the consolidated invoice
|
|
57
|
+
#
|
|
58
|
+
# **NONE**: Do not generate consolidated invoices
|
|
56
59
|
#
|
|
57
60
|
# @return [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType, nil]
|
|
58
61
|
optional :invoice_consolidation_type,
|
|
@@ -63,12 +66,15 @@ module MetronomeSDK
|
|
|
63
66
|
# {MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior}
|
|
64
67
|
# for more details.
|
|
65
68
|
#
|
|
66
|
-
# @param invoice_consolidation_type [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType] Indicates the desired behavior of consolidated invoices
|
|
69
|
+
# @param invoice_consolidation_type [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType] Account hierarchy M3 - Indicates the desired behavior of consolidated invoices g
|
|
67
70
|
|
|
68
|
-
# Indicates the desired behavior of consolidated invoices
|
|
69
|
-
# in a customer hierarchy
|
|
70
|
-
#
|
|
71
|
-
#
|
|
71
|
+
# Account hierarchy M3 - Indicates the desired behavior of consolidated invoices
|
|
72
|
+
# generated by the parent in a customer hierarchy
|
|
73
|
+
#
|
|
74
|
+
# **CONCATENATE**: Statements on the invoices of child customers will be appended
|
|
75
|
+
# to the consolidated invoice
|
|
76
|
+
#
|
|
77
|
+
# **NONE**: Do not generate consolidated invoices
|
|
72
78
|
#
|
|
73
79
|
# @see MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior#invoice_consolidation_type
|
|
74
80
|
module InvoiceConsolidationType
|
|
@@ -91,16 +97,25 @@ module MetronomeSDK
|
|
|
91
97
|
required :parent, -> { MetronomeSDK::HierarchyConfiguration::ChildHierarchyConfiguration::Parent }
|
|
92
98
|
|
|
93
99
|
# @!attribute payer
|
|
94
|
-
# Indicates
|
|
100
|
+
# Account hierarchy M3 - Indicates which customer should pay for the child's
|
|
101
|
+
# invoice charges
|
|
102
|
+
#
|
|
103
|
+
# **SELF**: The child pays for its own invoice charges
|
|
104
|
+
#
|
|
105
|
+
# **PARENT**: The parent pays for the child's invoice charges
|
|
95
106
|
#
|
|
96
107
|
# @return [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::Payer, nil]
|
|
97
108
|
optional :payer, enum: -> { MetronomeSDK::HierarchyConfiguration::ChildHierarchyConfiguration::Payer }
|
|
98
109
|
|
|
99
110
|
# @!attribute usage_statement_behavior
|
|
100
|
-
# Indicates the behavior of the child's invoice statements
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
#
|
|
111
|
+
# Account hierarchy M3 - Indicates the behavior of the child's invoice statements
|
|
112
|
+
# on the parent's invoices.
|
|
113
|
+
#
|
|
114
|
+
# **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
115
|
+
# consolidated invoices
|
|
116
|
+
#
|
|
117
|
+
# **SEPARATE**: Child's invoice statements will appear not appear on parent's
|
|
118
|
+
# consolidated invoices
|
|
104
119
|
#
|
|
105
120
|
# @return [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::UsageStatementBehavior, nil]
|
|
106
121
|
optional :usage_statement_behavior,
|
|
@@ -113,9 +128,9 @@ module MetronomeSDK
|
|
|
113
128
|
#
|
|
114
129
|
# @param parent [MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::Parent] The single parent contract/customer for this child.
|
|
115
130
|
#
|
|
116
|
-
# @param payer [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::Payer] Indicates
|
|
131
|
+
# @param payer [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::Payer] Account hierarchy M3 - Indicates which customer should pay for the child's invoi
|
|
117
132
|
#
|
|
118
|
-
# @param usage_statement_behavior [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::UsageStatementBehavior] Indicates the behavior of the child's invoice statements
|
|
133
|
+
# @param usage_statement_behavior [Symbol, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration::UsageStatementBehavior] Account hierarchy M3 - Indicates the behavior of the child's invoice statements
|
|
119
134
|
|
|
120
135
|
# @see MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration#parent
|
|
121
136
|
class Parent < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -136,7 +151,12 @@ module MetronomeSDK
|
|
|
136
151
|
# @param customer_id [String]
|
|
137
152
|
end
|
|
138
153
|
|
|
139
|
-
# Indicates
|
|
154
|
+
# Account hierarchy M3 - Indicates which customer should pay for the child's
|
|
155
|
+
# invoice charges
|
|
156
|
+
#
|
|
157
|
+
# **SELF**: The child pays for its own invoice charges
|
|
158
|
+
#
|
|
159
|
+
# **PARENT**: The parent pays for the child's invoice charges
|
|
140
160
|
#
|
|
141
161
|
# @see MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration#payer
|
|
142
162
|
module Payer
|
|
@@ -149,10 +169,14 @@ module MetronomeSDK
|
|
|
149
169
|
# @return [Array<Symbol>]
|
|
150
170
|
end
|
|
151
171
|
|
|
152
|
-
# Indicates the behavior of the child's invoice statements
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
#
|
|
172
|
+
# Account hierarchy M3 - Indicates the behavior of the child's invoice statements
|
|
173
|
+
# on the parent's invoices.
|
|
174
|
+
#
|
|
175
|
+
# **CONSOLIDATE**: Child's invoice statements will be added to parent's
|
|
176
|
+
# consolidated invoices
|
|
177
|
+
#
|
|
178
|
+
# **SEPARATE**: Child's invoice statements will appear not appear on parent's
|
|
179
|
+
# consolidated invoices
|
|
156
180
|
#
|
|
157
181
|
# @see MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration#usage_statement_behavior
|
|
158
182
|
module UsageStatementBehavior
|