schematichq 1.4.17 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/.fern/replay.lock +15 -3
  4. data/.fernignore +1 -0
  5. data/CONTRIBUTING.md +2 -2
  6. data/README.md +23 -0
  7. data/WASM_VERSION +1 -1
  8. data/lib/schematic/accesstokens/client.rb +1 -1
  9. data/lib/schematic/accounts/client.rb +21 -21
  10. data/lib/schematic/billing/client.rb +26 -26
  11. data/lib/schematic/billing/types/create_billing_subscription_request_body.rb +2 -0
  12. data/lib/schematic/catalogs/client.rb +10 -10
  13. data/lib/schematic/checkout/client.rb +9 -9
  14. data/lib/schematic/client.rb +1 -1
  15. data/lib/schematic/companies/client.rb +43 -43
  16. data/lib/schematic/components/client.rb +8 -8
  17. data/lib/schematic/componentspublic/client.rb +1 -1
  18. data/lib/schematic/credits/client.rb +112 -47
  19. data/lib/schematic/credits/types/create_company_credit_grant.rb +2 -0
  20. data/lib/schematic/credits/types/release_credit_reservation_response.rb +13 -0
  21. data/lib/schematic/credits/types/reserve_credits_request_body.rb +19 -0
  22. data/lib/schematic/credits/types/reserve_credits_response.rb +13 -0
  23. data/lib/schematic/dataexports/client.rb +3 -3
  24. data/lib/schematic/datastream/client.rb +5 -2
  25. data/lib/schematic/datastream/websocket_client.rb +59 -1
  26. data/lib/schematic/entitlements/client.rb +25 -25
  27. data/lib/schematic/events/client.rb +9 -9
  28. data/lib/schematic/features/client.rb +57 -17
  29. data/lib/schematic/features/types/check_and_reserve_flag_request_body.rb +21 -0
  30. data/lib/schematic/features/types/check_and_reserve_flag_response.rb +13 -0
  31. data/lib/schematic/insights/client.rb +6 -6
  32. data/lib/schematic/integrationsapi/client.rb +14 -14
  33. data/lib/schematic/internal/multipart/multipart_form_data.rb +8 -3
  34. data/lib/schematic/internal/types/model.rb +14 -6
  35. data/lib/schematic/licenses/client.rb +3 -3
  36. data/lib/schematic/planbundle/client.rb +3 -3
  37. data/lib/schematic/plangroups/client.rb +3 -3
  38. data/lib/schematic/plangroups/types/create_plan_group_request_body.rb +2 -0
  39. data/lib/schematic/plangroups/types/update_plan_group_request_body.rb +2 -0
  40. data/lib/schematic/planmigrations/client.rb +11 -11
  41. data/lib/schematic/plans/client.rb +24 -18
  42. data/lib/schematic/plans/types/count_plans_params.rb +2 -0
  43. data/lib/schematic/plans/types/count_plans_request.rb +2 -0
  44. data/lib/schematic/plans/types/list_plans_params.rb +2 -0
  45. data/lib/schematic/plans/types/list_plans_request.rb +2 -0
  46. data/lib/schematic/scheduledcheckout/client.rb +4 -4
  47. data/lib/schematic/schematic_client.rb +4 -0
  48. data/lib/schematic/types/billing_arrears_anchor.rb +12 -0
  49. data/lib/schematic/types/billing_arrears_cadence.rb +12 -0
  50. data/lib/schematic/types/billing_credit_grant_response_data.rb +8 -0
  51. data/lib/schematic/types/billing_plan_credit_grant_response_data.rb +12 -0
  52. data/lib/schematic/types/check_and_reserve_flag_response_data.rb +39 -0
  53. data/lib/schematic/types/checkout_data_response_data.rb +4 -0
  54. data/lib/schematic/types/company_plan_credit_grant_view.rb +12 -0
  55. data/lib/schematic/types/create_billing_plan_credit_grant_request_body.rb +12 -0
  56. data/lib/schematic/types/credit_company_grant_view.rb +14 -0
  57. data/lib/schematic/types/credit_reservation_response_data.rb +25 -0
  58. data/lib/schematic/types/credit_usage_reason.rb +2 -0
  59. data/lib/schematic/types/event_body_track.rb +2 -0
  60. data/lib/schematic/types/event_detail_response_data.rb +2 -0
  61. data/lib/schematic/types/event_response_data.rb +2 -0
  62. data/lib/schematic/types/flag_check_reservation_response_data.rb +23 -0
  63. data/lib/schematic/types/get_onboarding_state_resp.rb +4 -0
  64. data/lib/schematic/types/issue_temporary_access_token_response_data.rb +3 -1
  65. data/lib/schematic/types/onboarding_requirement.rb +1 -0
  66. data/lib/schematic/types/onboarding_roadmap_view.rb +11 -0
  67. data/lib/schematic/types/plan_credit_grant_view.rb +12 -0
  68. data/lib/schematic/types/plan_group_detail_response_data.rb +2 -0
  69. data/lib/schematic/types/plan_group_response_data.rb +2 -0
  70. data/lib/schematic/types/rules_engine_schema_version.rb +1 -1
  71. data/lib/schematic/types/rulesengine_company.rb +2 -0
  72. data/lib/schematic/types/rulesengine_credit_postpaid_config.rb +9 -0
  73. data/lib/schematic/types/slack_connect_invite_status.rb +15 -0
  74. data/lib/schematic/types/slack_connect_invite_view.rb +15 -0
  75. data/lib/schematic/types/temporary_access_token_issuer_type.rb +12 -0
  76. data/lib/schematic/types/temporary_access_token_response_data.rb +3 -1
  77. data/lib/schematic/types/update_billing_plan_credit_grant_request_body.rb +12 -0
  78. data/lib/schematic/types/webhook_event_detail_response_data.rb +2 -0
  79. data/lib/schematic/types/webhook_event_response_data.rb +2 -0
  80. data/lib/schematic/version.rb +1 -1
  81. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  82. data/lib/schematic/webhooks/client.rb +10 -10
  83. data/lib/schematic.rb +15 -1
  84. data/reference.md +272 -15
  85. data/testapp/app.rb +8 -1
  86. metadata +17 -3
  87. data/lib/schematic/types/release_credit_lease_request_body.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec00574afecedfe21546aa5e1881fbba6e0c4c308503fcd0ffaa5770be83830a
4
- data.tar.gz: fcfeb1feba843c69814311bbf25d5987aaee0abcd7c0b6f57725d6cdb6aad606
3
+ metadata.gz: 387b9e1797224dd91fe745e03f2bb53c108b3cbd2745f34f6a86d1749d6dccf4
4
+ data.tar.gz: b3f58bff3d0c385c1262223ed5468cdcf60c57c0dd49b4f47569f916b970daf8
5
5
  SHA512:
6
- metadata.gz: 1a8054ded9284e483552fd743da2237cca4a97b28558d656b9014d0a2a8f87430d14d48647449e891566bc617736751ee4419288c75211162e5cac32861c7717
7
- data.tar.gz: 5320a797e92c4707ee497ab2f56467b22f3a827ac8b111906a5d24cbca65635e5f914ba6e3347670e0657cc53f8328cecbcf9ee214d94fb2fa9f553027e52591
6
+ metadata.gz: 6877feadf2c653609d7efd24cb20ec4a56fccbf6814b6fb60fce63b506d07bcf3ee1c98db9763810f2b0332fb41b281d55026bf055772ad93f98a95b14fb7bad
7
+ data.tar.gz: f5d4e167928b54798817bc7ab627da15b2ef4e0ef44550568d82c4b2fb8dd47836f3be540f9688ea98fd8e0fca2f222083f5e9c89a590e8cf3679845420a59c8
data/.fern/metadata.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "cliVersion": "5.50.0",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
- "generatorVersion": "1.24.0",
4
+ "generatorVersion": "1.24.1",
5
5
  "generatorConfig": {
6
6
  "module": "SchematicHQ",
7
7
  "rubocopVariableNumberStyle": "disabled",
@@ -13,10 +13,10 @@
13
13
  "webrick": ">= 1.0"
14
14
  }
15
15
  },
16
- "originGitCommit": "31f498c0a9babdc0eec5ae88e1212a254b2f2561",
16
+ "originGitCommit": "96570a6bf7ba01ea0851f22f559b8c62c1c9b5d4",
17
17
  "originGitCommitIsDirty": false,
18
18
  "invokedBy": "ci",
19
- "requestedVersion": "1.4.17",
19
+ "requestedVersion": "1.5.0",
20
20
  "ciProvider": "github",
21
- "sdkVersion": "1.4.17"
21
+ "sdkVersion": "1.5.0"
22
22
  }
data/.fern/replay.lock CHANGED
@@ -84,14 +84,26 @@ generations:
84
84
  cli_version: unknown
85
85
  generator_versions:
86
86
  fernapi/fern-ruby-sdk: 1.24.0
87
- current_generation: d57c23ea04698dbe0f4b64fdf38a7a56aebc3b6e
87
+ - commit_sha: 9f7c0e7191008450dd67353d317c276d6d1c43ed
88
+ tree_hash: 86ca39f848321da10832015e9ef9ef023cfc185a
89
+ timestamp: 2026-09-07T10:02:16.279Z
90
+ cli_version: unknown
91
+ generator_versions:
92
+ fernapi/fern-ruby-sdk: 1.24.0
93
+ - commit_sha: d05fffcdc7a4621681b02daf3eac12c13724b8cf
94
+ tree_hash: b1709e6bbbf80361f6fc24bfb086ae6bc9348ce1
95
+ timestamp: 2026-09-14T19:48:58.256Z
96
+ cli_version: unknown
97
+ generator_versions:
98
+ fernapi/fern-ruby-sdk: 1.24.1
99
+ current_generation: d05fffcdc7a4621681b02daf3eac12c13724b8cf
88
100
  patches:
89
101
  - id: patch-5da692c2
90
102
  content_hash: sha256:e652287219a0a709e16112ced444e6472c6fa8bdfe888edf868caaf9769a9472
91
103
  original_commit: 5da692c20aef08577d900f9a860b5f78a549418e
92
104
  original_message: inject host time into datastream wasm rules engine (SCHY-471)
93
105
  original_author: Christopher Brady <chris@schematichq.com>
94
- base_generation: d57c23ea04698dbe0f4b64fdf38a7a56aebc3b6e
106
+ base_generation: d05fffcdc7a4621681b02daf3eac12c13724b8cf
95
107
  files:
96
108
  - test/rules_engine_clock_test.rb
97
109
  patch_content: |
@@ -259,7 +271,7 @@ patches:
259
271
  original_commit: ee61788c5a83fce5dd5768b2536391459550d176
260
272
  original_message: fix rubocop offenses in clock regression test (SCHY-471)
261
273
  original_author: Christopher Brady <chris@schematichq.com>
262
- base_generation: d57c23ea04698dbe0f4b64fdf38a7a56aebc3b6e
274
+ base_generation: d05fffcdc7a4621681b02daf3eac12c13724b8cf
263
275
  files:
264
276
  - test/rules_engine_clock_test.rb
265
277
  patch_content: |
data/.fernignore CHANGED
@@ -2,6 +2,7 @@
2
2
  .github/
3
3
  .gitignore
4
4
  CLAUDE.md
5
+ CONTRIBUTING.md
5
6
  LICENSE
6
7
  README.md
7
8
  WASM_VERSION
data/CONTRIBUTING.md CHANGED
@@ -30,7 +30,7 @@ gem build *.gemspec
30
30
  Run the test suite:
31
31
 
32
32
  ```bash
33
- bundle exec rspec
33
+ bundle exec ruby -I lib -I test test/custom.test.rb
34
34
  ```
35
35
 
36
36
  ### Linting and Formatting
@@ -93,7 +93,7 @@ This approach is best for:
93
93
 
94
94
  1. Create a new branch for your changes
95
95
  2. Make your modifications
96
- 3. Run tests to ensure nothing breaks: `bundle exec rspec`
96
+ 3. Run tests to ensure nothing breaks: `bundle exec ruby -I lib -I test test/custom.test.rb`
97
97
  4. Run linting: `bundle exec rubocop`
98
98
  5. Build the gem: `gem build *.gemspec`
99
99
  6. Commit your changes with a clear commit message
data/README.md CHANGED
@@ -492,6 +492,7 @@ You can customize DataStream behavior via the `datastream_options` hash:
492
492
  | `replicator_mode` | `Boolean` | `false` | Enable replicator mode (see below) |
493
493
  | `replicator_health_url` | `String` | `http://localhost:8090/ready` | URL to poll for replicator health |
494
494
  | `replicator_health_interval` | `Integer` | 30 | Health check interval in seconds |
495
+ | `max_frame_size` | `Integer` | 20971520 (20 MB) | Maximum size, in bytes, of a single incoming WebSocket frame |
495
496
 
496
497
  ```ruby
497
498
  require "schematichq"
@@ -505,6 +506,28 @@ client = Schematic::SchematicClient.new(
505
506
  )
506
507
  ```
507
508
 
509
+ ### Frame size limit
510
+
511
+ DataStream sends the full flag set as a single WebSocket frame on connect. If that
512
+ frame exceeds the limit, the SDK cannot decode it and logs an error naming the
513
+ limit; raise `max_frame_size` to accept a larger payload.
514
+
515
+ ```ruby
516
+ client = Schematic::SchematicClient.new(
517
+ api_key: ENV["SCHEMATIC_API_KEY"],
518
+ use_data_stream: true,
519
+ datastream_options: {
520
+ max_frame_size: 64 * 1024 * 1024 # 64 MB
521
+ }
522
+ )
523
+ ```
524
+
525
+ The underlying `websocket` gem stores this limit in a module-level global
526
+ (`WebSocket.max_frame_size`), so it has no per-connection setting. The SDK leaves
527
+ that global alone unless you pass `max_frame_size`, and when you do it only ever
528
+ raises the limit, never lowers it, so it cannot shrink the ceiling for other
529
+ WebSocket users in the same process.
530
+
508
531
  ## Replicator Mode
509
532
 
510
533
  When running the `schematic-datastream-replicator` service, you can configure the Schematic client to operate in Replicator Mode. In this mode, the client reads from a shared cache populated by the external replicator rather than establishing its own WebSocket connection.
data/WASM_VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.3
1
+ 0.7.4
@@ -43,7 +43,7 @@ module Schematic
43
43
  end
44
44
  code = response.code.to_i
45
45
  if code.between?(200, 299)
46
- Schematic::Accesstokens::Types::IssueTemporaryAccessTokenResponse.load(response.body)
46
+ (response.body.to_s.empty? ? nil : Schematic::Accesstokens::Types::IssueTemporaryAccessTokenResponse.load(response.body))
47
47
  else
48
48
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
49
49
  raise error_class.new(response.body, code: code)
@@ -56,7 +56,7 @@ module Schematic
56
56
  end
57
57
  code = response.code.to_i
58
58
  if code.between?(200, 299)
59
- Schematic::Accounts::Types::ListAccountMembersResponse.load(response.body)
59
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::ListAccountMembersResponse.load(response.body))
60
60
  else
61
61
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
62
62
  raise error_class.new(response.body, code: code)
@@ -91,7 +91,7 @@ module Schematic
91
91
  end
92
92
  code = response.code.to_i
93
93
  if code.between?(200, 299)
94
- Schematic::Accounts::Types::GetAccountMemberResponse.load(response.body)
94
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::GetAccountMemberResponse.load(response.body))
95
95
  else
96
96
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
97
97
  raise error_class.new(response.body, code: code)
@@ -144,7 +144,7 @@ module Schematic
144
144
  end
145
145
  code = response.code.to_i
146
146
  if code.between?(200, 299)
147
- Schematic::Accounts::Types::CountAccountMembersResponse.load(response.body)
147
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CountAccountMembersResponse.load(response.body))
148
148
  else
149
149
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
150
150
  raise error_class.new(response.body, code: code)
@@ -194,7 +194,7 @@ module Schematic
194
194
  end
195
195
  code = response.code.to_i
196
196
  if code.between?(200, 299)
197
- Schematic::Accounts::Types::ListApiKeysResponse.load(response.body)
197
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::ListApiKeysResponse.load(response.body))
198
198
  else
199
199
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
200
200
  raise error_class.new(response.body, code: code)
@@ -229,7 +229,7 @@ module Schematic
229
229
  end
230
230
  code = response.code.to_i
231
231
  if code.between?(200, 299)
232
- Schematic::Accounts::Types::CreateApiKeyResponse.load(response.body)
232
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CreateApiKeyResponse.load(response.body))
233
233
  else
234
234
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
235
235
  raise error_class.new(response.body, code: code)
@@ -264,7 +264,7 @@ module Schematic
264
264
  end
265
265
  code = response.code.to_i
266
266
  if code.between?(200, 299)
267
- Schematic::Accounts::Types::GetApiKeyResponse.load(response.body)
267
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::GetApiKeyResponse.load(response.body))
268
268
  else
269
269
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
270
270
  raise error_class.new(response.body, code: code)
@@ -304,7 +304,7 @@ module Schematic
304
304
  end
305
305
  code = response.code.to_i
306
306
  if code.between?(200, 299)
307
- Schematic::Accounts::Types::UpdateApiKeyResponse.load(response.body)
307
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateApiKeyResponse.load(response.body))
308
308
  else
309
309
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
310
310
  raise error_class.new(response.body, code: code)
@@ -339,7 +339,7 @@ module Schematic
339
339
  end
340
340
  code = response.code.to_i
341
341
  if code.between?(200, 299)
342
- Schematic::Accounts::Types::DeleteApiKeyResponse.load(response.body)
342
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::DeleteApiKeyResponse.load(response.body))
343
343
  else
344
344
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
345
345
  raise error_class.new(response.body, code: code)
@@ -389,7 +389,7 @@ module Schematic
389
389
  end
390
390
  code = response.code.to_i
391
391
  if code.between?(200, 299)
392
- Schematic::Accounts::Types::CountApiKeysResponse.load(response.body)
392
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CountApiKeysResponse.load(response.body))
393
393
  else
394
394
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
395
395
  raise error_class.new(response.body, code: code)
@@ -448,7 +448,7 @@ module Schematic
448
448
  end
449
449
  code = response.code.to_i
450
450
  if code.between?(200, 299)
451
- Schematic::Accounts::Types::ListAuditLogsResponse.load(response.body)
451
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::ListAuditLogsResponse.load(response.body))
452
452
  else
453
453
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
454
454
  raise error_class.new(response.body, code: code)
@@ -483,7 +483,7 @@ module Schematic
483
483
  end
484
484
  code = response.code.to_i
485
485
  if code.between?(200, 299)
486
- Schematic::Accounts::Types::GetAuditLogResponse.load(response.body)
486
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::GetAuditLogResponse.load(response.body))
487
487
  else
488
488
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
489
489
  raise error_class.new(response.body, code: code)
@@ -542,7 +542,7 @@ module Schematic
542
542
  end
543
543
  code = response.code.to_i
544
544
  if code.between?(200, 299)
545
- Schematic::Accounts::Types::CountAuditLogsResponse.load(response.body)
545
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CountAuditLogsResponse.load(response.body))
546
546
  else
547
547
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
548
548
  raise error_class.new(response.body, code: code)
@@ -589,7 +589,7 @@ module Schematic
589
589
  end
590
590
  code = response.code.to_i
591
591
  if code.between?(200, 299)
592
- Schematic::Accounts::Types::ListEnvironmentsResponse.load(response.body)
592
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::ListEnvironmentsResponse.load(response.body))
593
593
  else
594
594
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
595
595
  raise error_class.new(response.body, code: code)
@@ -627,7 +627,7 @@ module Schematic
627
627
  end
628
628
  code = response.code.to_i
629
629
  if code.between?(200, 299)
630
- Schematic::Accounts::Types::CreateEnvironmentResponse.load(response.body)
630
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::CreateEnvironmentResponse.load(response.body))
631
631
  else
632
632
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
633
633
  raise error_class.new(response.body, code: code)
@@ -662,7 +662,7 @@ module Schematic
662
662
  end
663
663
  code = response.code.to_i
664
664
  if code.between?(200, 299)
665
- Schematic::Accounts::Types::GetEnvironmentResponse.load(response.body)
665
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::GetEnvironmentResponse.load(response.body))
666
666
  else
667
667
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
668
668
  raise error_class.new(response.body, code: code)
@@ -702,7 +702,7 @@ module Schematic
702
702
  end
703
703
  code = response.code.to_i
704
704
  if code.between?(200, 299)
705
- Schematic::Accounts::Types::UpdateEnvironmentResponse.load(response.body)
705
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateEnvironmentResponse.load(response.body))
706
706
  else
707
707
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
708
708
  raise error_class.new(response.body, code: code)
@@ -737,7 +737,7 @@ module Schematic
737
737
  end
738
738
  code = response.code.to_i
739
739
  if code.between?(200, 299)
740
- Schematic::Accounts::Types::DeleteEnvironmentResponse.load(response.body)
740
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::DeleteEnvironmentResponse.load(response.body))
741
741
  else
742
742
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
743
743
  raise error_class.new(response.body, code: code)
@@ -770,7 +770,7 @@ module Schematic
770
770
  end
771
771
  code = response.code.to_i
772
772
  if code.between?(200, 299)
773
- Schematic::Accounts::Types::GetOnboardingStateResponse.load(response.body)
773
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::GetOnboardingStateResponse.load(response.body))
774
774
  else
775
775
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
776
776
  raise error_class.new(response.body, code: code)
@@ -805,7 +805,7 @@ module Schematic
805
805
  end
806
806
  code = response.code.to_i
807
807
  if code.between?(200, 299)
808
- Schematic::Accounts::Types::UpdateOnboardingStateResponse.load(response.body)
808
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::UpdateOnboardingStateResponse.load(response.body))
809
809
  else
810
810
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
811
811
  raise error_class.new(response.body, code: code)
@@ -838,7 +838,7 @@ module Schematic
838
838
  end
839
839
  code = response.code.to_i
840
840
  if code.between?(200, 299)
841
- Schematic::Accounts::Types::QuickstartResponse.load(response.body)
841
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::QuickstartResponse.load(response.body))
842
842
  else
843
843
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
844
844
  raise error_class.new(response.body, code: code)
@@ -871,7 +871,7 @@ module Schematic
871
871
  end
872
872
  code = response.code.to_i
873
873
  if code.between?(200, 299)
874
- Schematic::Accounts::Types::GetWhoAmIResponse.load(response.body)
874
+ (response.body.to_s.empty? ? nil : Schematic::Accounts::Types::GetWhoAmIResponse.load(response.body))
875
875
  else
876
876
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
877
877
  raise error_class.new(response.body, code: code)
@@ -53,7 +53,7 @@ module Schematic
53
53
  end
54
54
  code = response.code.to_i
55
55
  if code.between?(200, 299)
56
- Schematic::Billing::Types::ListCouponsResponse.load(response.body)
56
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListCouponsResponse.load(response.body))
57
57
  else
58
58
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
59
59
  raise error_class.new(response.body, code: code)
@@ -97,7 +97,7 @@ module Schematic
97
97
  end
98
98
  code = response.code.to_i
99
99
  if code.between?(200, 299)
100
- Schematic::Billing::Types::UpsertBillingCouponResponse.load(response.body)
100
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertBillingCouponResponse.load(response.body))
101
101
  else
102
102
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
103
103
  raise error_class.new(response.body, code: code)
@@ -132,7 +132,7 @@ module Schematic
132
132
  end
133
133
  code = response.code.to_i
134
134
  if code.between?(200, 299)
135
- Schematic::Billing::Types::DeleteBillingCouponResponse.load(response.body)
135
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::DeleteBillingCouponResponse.load(response.body))
136
136
  else
137
137
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
138
138
  raise error_class.new(response.body, code: code)
@@ -167,7 +167,7 @@ module Schematic
167
167
  end
168
168
  code = response.code.to_i
169
169
  if code.between?(200, 299)
170
- Schematic::Billing::Types::DeleteBillingCustomerResponse.load(response.body)
170
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::DeleteBillingCustomerResponse.load(response.body))
171
171
  else
172
172
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
173
173
  raise error_class.new(response.body, code: code)
@@ -209,7 +209,7 @@ module Schematic
209
209
  end
210
210
  code = response.code.to_i
211
211
  if code.between?(200, 299)
212
- Schematic::Billing::Types::UpsertBillingCustomerResponse.load(response.body)
212
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertBillingCustomerResponse.load(response.body))
213
213
  else
214
214
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
215
215
  raise error_class.new(response.body, code: code)
@@ -265,7 +265,7 @@ module Schematic
265
265
  end
266
266
  code = response.code.to_i
267
267
  if code.between?(200, 299)
268
- Schematic::Billing::Types::ListCustomersWithSubscriptionsResponse.load(response.body)
268
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListCustomersWithSubscriptionsResponse.load(response.body))
269
269
  else
270
270
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
271
271
  raise error_class.new(response.body, code: code)
@@ -321,7 +321,7 @@ module Schematic
321
321
  end
322
322
  code = response.code.to_i
323
323
  if code.between?(200, 299)
324
- Schematic::Billing::Types::CountCustomersResponse.load(response.body)
324
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::CountCustomersResponse.load(response.body))
325
325
  else
326
326
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
327
327
  raise error_class.new(response.body, code: code)
@@ -374,7 +374,7 @@ module Schematic
374
374
  end
375
375
  code = response.code.to_i
376
376
  if code.between?(200, 299)
377
- Schematic::Billing::Types::ListInvoicesResponse.load(response.body)
377
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListInvoicesResponse.load(response.body))
378
378
  else
379
379
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
380
380
  raise error_class.new(response.body, code: code)
@@ -417,7 +417,7 @@ module Schematic
417
417
  end
418
418
  code = response.code.to_i
419
419
  if code.between?(200, 299)
420
- Schematic::Billing::Types::UpsertInvoiceResponse.load(response.body)
420
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertInvoiceResponse.load(response.body))
421
421
  else
422
422
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
423
423
  raise error_class.new(response.body, code: code)
@@ -452,7 +452,7 @@ module Schematic
452
452
  end
453
453
  code = response.code.to_i
454
454
  if code.between?(200, 299)
455
- Schematic::Billing::Types::DeleteBillingInvoiceResponse.load(response.body)
455
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::DeleteBillingInvoiceResponse.load(response.body))
456
456
  else
457
457
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
458
458
  raise error_class.new(response.body, code: code)
@@ -499,7 +499,7 @@ module Schematic
499
499
  end
500
500
  code = response.code.to_i
501
501
  if code.between?(200, 299)
502
- Schematic::Billing::Types::ListMetersResponse.load(response.body)
502
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListMetersResponse.load(response.body))
503
503
  else
504
504
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
505
505
  raise error_class.new(response.body, code: code)
@@ -539,7 +539,7 @@ module Schematic
539
539
  end
540
540
  code = response.code.to_i
541
541
  if code.between?(200, 299)
542
- Schematic::Billing::Types::UpsertBillingMeterResponse.load(response.body)
542
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertBillingMeterResponse.load(response.body))
543
543
  else
544
544
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
545
545
  raise error_class.new(response.body, code: code)
@@ -589,7 +589,7 @@ module Schematic
589
589
  end
590
590
  code = response.code.to_i
591
591
  if code.between?(200, 299)
592
- Schematic::Billing::Types::ListPaymentMethodsResponse.load(response.body)
592
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListPaymentMethodsResponse.load(response.body))
593
593
  else
594
594
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
595
595
  raise error_class.new(response.body, code: code)
@@ -628,7 +628,7 @@ module Schematic
628
628
  end
629
629
  code = response.code.to_i
630
630
  if code.between?(200, 299)
631
- Schematic::Billing::Types::UpsertPaymentMethodResponse.load(response.body)
631
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertPaymentMethodResponse.load(response.body))
632
632
  else
633
633
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
634
634
  raise error_class.new(response.body, code: code)
@@ -663,7 +663,7 @@ module Schematic
663
663
  end
664
664
  code = response.code.to_i
665
665
  if code.between?(200, 299)
666
- Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse.load(response.body)
666
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::DeletePaymentMethodByExternalIdResponse.load(response.body))
667
667
  else
668
668
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
669
669
  raise error_class.new(response.body, code: code)
@@ -755,7 +755,7 @@ module Schematic
755
755
  end
756
756
  code = response.code.to_i
757
757
  if code.between?(200, 299)
758
- Schematic::Billing::Types::ListBillingPricesResponse.load(response.body)
758
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListBillingPricesResponse.load(response.body))
759
759
  else
760
760
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
761
761
  raise error_class.new(response.body, code: code)
@@ -803,7 +803,7 @@ module Schematic
803
803
  end
804
804
  code = response.code.to_i
805
805
  if code.between?(200, 299)
806
- Schematic::Billing::Types::UpsertBillingPriceResponse.load(response.body)
806
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertBillingPriceResponse.load(response.body))
807
807
  else
808
808
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
809
809
  raise error_class.new(response.body, code: code)
@@ -838,7 +838,7 @@ module Schematic
838
838
  end
839
839
  code = response.code.to_i
840
840
  if code.between?(200, 299)
841
- Schematic::Billing::Types::DeleteBillingProductResponse.load(response.body)
841
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::DeleteBillingProductResponse.load(response.body))
842
842
  else
843
843
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
844
844
  raise error_class.new(response.body, code: code)
@@ -930,7 +930,7 @@ module Schematic
930
930
  end
931
931
  code = response.code.to_i
932
932
  if code.between?(200, 299)
933
- Schematic::Billing::Types::ListBillingProductPricesResponse.load(response.body)
933
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListBillingProductPricesResponse.load(response.body))
934
934
  else
935
935
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
936
936
  raise error_class.new(response.body, code: code)
@@ -965,7 +965,7 @@ module Schematic
965
965
  end
966
966
  code = response.code.to_i
967
967
  if code.between?(200, 299)
968
- Schematic::Billing::Types::DeleteProductPriceResponse.load(response.body)
968
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::DeleteProductPriceResponse.load(response.body))
969
969
  else
970
970
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
971
971
  raise error_class.new(response.body, code: code)
@@ -1003,7 +1003,7 @@ module Schematic
1003
1003
  end
1004
1004
  code = response.code.to_i
1005
1005
  if code.between?(200, 299)
1006
- Schematic::Billing::Types::UpsertBillingProductResponse.load(response.body)
1006
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertBillingProductResponse.load(response.body))
1007
1007
  else
1008
1008
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1009
1009
  raise error_class.new(response.body, code: code)
@@ -1080,7 +1080,7 @@ module Schematic
1080
1080
  end
1081
1081
  code = response.code.to_i
1082
1082
  if code.between?(200, 299)
1083
- Schematic::Billing::Types::ListBillingProductsResponse.load(response.body)
1083
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListBillingProductsResponse.load(response.body))
1084
1084
  else
1085
1085
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1086
1086
  raise error_class.new(response.body, code: code)
@@ -1157,7 +1157,7 @@ module Schematic
1157
1157
  end
1158
1158
  code = response.code.to_i
1159
1159
  if code.between?(200, 299)
1160
- Schematic::Billing::Types::CountBillingProductsResponse.load(response.body)
1160
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::CountBillingProductsResponse.load(response.body))
1161
1161
  else
1162
1162
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1163
1163
  raise error_class.new(response.body, code: code)
@@ -1210,7 +1210,7 @@ module Schematic
1210
1210
  end
1211
1211
  code = response.code.to_i
1212
1212
  if code.between?(200, 299)
1213
- Schematic::Billing::Types::ListCompanyBillingProfilesResponse.load(response.body)
1213
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::ListCompanyBillingProfilesResponse.load(response.body))
1214
1214
  else
1215
1215
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1216
1216
  raise error_class.new(response.body, code: code)
@@ -1253,7 +1253,7 @@ module Schematic
1253
1253
  end
1254
1254
  code = response.code.to_i
1255
1255
  if code.between?(200, 299)
1256
- Schematic::Billing::Types::UpdateCompanyBillingProfileResponse.load(response.body)
1256
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpdateCompanyBillingProfileResponse.load(response.body))
1257
1257
  else
1258
1258
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1259
1259
  raise error_class.new(response.body, code: code)
@@ -1310,7 +1310,7 @@ module Schematic
1310
1310
  end
1311
1311
  code = response.code.to_i
1312
1312
  if code.between?(200, 299)
1313
- Schematic::Billing::Types::UpsertBillingSubscriptionResponse.load(response.body)
1313
+ (response.body.to_s.empty? ? nil : Schematic::Billing::Types::UpsertBillingSubscriptionResponse.load(response.body))
1314
1314
  else
1315
1315
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
1316
1316
  raise error_class.new(response.body, code: code)
@@ -36,6 +36,8 @@ module Schematic
36
36
 
37
37
  field :provider_type, -> { Schematic::Types::BillingProviderType }, optional: true, nullable: false
38
38
 
39
+ field :started_at, -> { String }, optional: true, nullable: false
40
+
39
41
  field :status, -> { String }, optional: true, nullable: false
40
42
 
41
43
  field :subscription_external_id, -> { String }, optional: false, nullable: false
@@ -53,7 +53,7 @@ module Schematic
53
53
  end
54
54
  code = response.code.to_i
55
55
  if code.between?(200, 299)
56
- Schematic::Catalogs::Types::ListCatalogsResponse.load(response.body)
56
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::ListCatalogsResponse.load(response.body))
57
57
  else
58
58
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
59
59
  raise error_class.new(response.body, code: code)
@@ -88,7 +88,7 @@ module Schematic
88
88
  end
89
89
  code = response.code.to_i
90
90
  if code.between?(200, 299)
91
- Schematic::Catalogs::Types::CreateCatalogResponse.load(response.body)
91
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::CreateCatalogResponse.load(response.body))
92
92
  else
93
93
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
94
94
  raise error_class.new(response.body, code: code)
@@ -123,7 +123,7 @@ module Schematic
123
123
  end
124
124
  code = response.code.to_i
125
125
  if code.between?(200, 299)
126
- Schematic::Catalogs::Types::GetCatalogResponse.load(response.body)
126
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetCatalogResponse.load(response.body))
127
127
  else
128
128
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
129
129
  raise error_class.new(response.body, code: code)
@@ -163,7 +163,7 @@ module Schematic
163
163
  end
164
164
  code = response.code.to_i
165
165
  if code.between?(200, 299)
166
- Schematic::Catalogs::Types::UpdateCatalogResponse.load(response.body)
166
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::UpdateCatalogResponse.load(response.body))
167
167
  else
168
168
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
169
169
  raise error_class.new(response.body, code: code)
@@ -198,7 +198,7 @@ module Schematic
198
198
  end
199
199
  code = response.code.to_i
200
200
  if code.between?(200, 299)
201
- Schematic::Catalogs::Types::DeleteCatalogResponse.load(response.body)
201
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::DeleteCatalogResponse.load(response.body))
202
202
  else
203
203
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
204
204
  raise error_class.new(response.body, code: code)
@@ -233,7 +233,7 @@ module Schematic
233
233
  end
234
234
  code = response.code.to_i
235
235
  if code.between?(200, 299)
236
- Schematic::Catalogs::Types::GetConfigurationResponse.load(response.body)
236
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetConfigurationResponse.load(response.body))
237
237
  else
238
238
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
239
239
  raise error_class.new(response.body, code: code)
@@ -273,7 +273,7 @@ module Schematic
273
273
  end
274
274
  code = response.code.to_i
275
275
  if code.between?(200, 299)
276
- Schematic::Catalogs::Types::UpdateConfigurationResponse.load(response.body)
276
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::UpdateConfigurationResponse.load(response.body))
277
277
  else
278
278
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
279
279
  raise error_class.new(response.body, code: code)
@@ -308,7 +308,7 @@ module Schematic
308
308
  end
309
309
  code = response.code.to_i
310
310
  if code.between?(200, 299)
311
- Schematic::Catalogs::Types::GetCreditBundlesInCatalogResponse.load(response.body)
311
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetCreditBundlesInCatalogResponse.load(response.body))
312
312
  else
313
313
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
314
314
  raise error_class.new(response.body, code: code)
@@ -417,7 +417,7 @@ module Schematic
417
417
  end
418
418
  code = response.code.to_i
419
419
  if code.between?(200, 299)
420
- Schematic::Catalogs::Types::GetDerivedFeaturesResponse.load(response.body)
420
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetDerivedFeaturesResponse.load(response.body))
421
421
  else
422
422
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
423
423
  raise error_class.new(response.body, code: code)
@@ -452,7 +452,7 @@ module Schematic
452
452
  end
453
453
  code = response.code.to_i
454
454
  if code.between?(200, 299)
455
- Schematic::Catalogs::Types::GetPlansInCatalogResponse.load(response.body)
455
+ (response.body.to_s.empty? ? nil : Schematic::Catalogs::Types::GetPlansInCatalogResponse.load(response.body))
456
456
  else
457
457
  error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
458
458
  raise error_class.new(response.body, code: code)