clerk-sdk-ruby 5.0.1 → 5.1.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/lib/clerk/billing.rb +318 -0
- data/lib/clerk/models/components/actortoken_object.rb +0 -3
- data/lib/clerk/models/components/actortoken_status.rb +0 -3
- data/lib/clerk/models/components/allowlistidentifier_identifier_type.rb +0 -3
- data/lib/clerk/models/components/allowlistidentifier_object.rb +0 -3
- data/lib/clerk/models/components/billingpaymentattempt_object.rb +0 -3
- data/lib/clerk/models/components/billingpaymentattempt_status.rb +0 -3
- data/lib/clerk/models/components/{commercepriceresponse.rb → billingpriceresponse.rb} +2 -2
- data/lib/clerk/models/components/{commercepriceresponse.rbi → billingpriceresponse.rbi} +2 -2
- data/lib/clerk/models/components/{commercepriceresponse_object.rb → billingpriceresponse_object.rb} +2 -5
- data/lib/clerk/models/components/billingpriceresponse_object.rbi +11 -0
- data/lib/clerk/models/components/billingstatement_status.rb +0 -3
- data/lib/clerk/models/components/blocklistidentifier_identifier_type.rb +0 -3
- data/lib/clerk/models/components/blocklistidentifier_object.rb +0 -3
- data/lib/clerk/models/components/client_object.rb +0 -3
- data/lib/clerk/models/components/commercepayerresponse.rb +5 -1
- data/lib/clerk/models/components/commercepayerresponse.rbi +2 -0
- data/lib/clerk/models/components/commercepayerresponse_object.rb +0 -3
- data/lib/clerk/models/components/commercepaymentmethodresponse_object.rb +0 -3
- data/lib/clerk/models/components/commercepaymentmethodresponse_status.rb +0 -3
- data/lib/clerk/models/components/commerceplan_object.rb +0 -3
- data/lib/clerk/models/components/commercepricetransitiondetails.rb +1 -1
- data/lib/clerk/models/components/commercepricetransitionresponse_object.rb +0 -3
- data/lib/clerk/models/components/commercesubscription_object.rb +0 -3
- data/lib/clerk/models/components/commercesubscription_status.rb +0 -3
- data/lib/clerk/models/components/commercesubscriptionitem_object.rb +0 -3
- data/lib/clerk/models/components/commercesubscriptionitem_object_commerceplan.rb +0 -3
- data/lib/clerk/models/components/commercesubscriptionitem_plan_period.rb +0 -3
- data/lib/clerk/models/components/commercesubscriptionitem_status.rb +0 -3
- data/lib/clerk/models/components/cookies_object.rb +0 -3
- data/lib/clerk/models/components/createbillingpricerequest.rb +48 -0
- data/lib/clerk/models/components/createbillingpricerequest.rbi +21 -0
- data/lib/clerk/models/components/domain_object.rb +0 -3
- data/lib/clerk/models/components/domains_enrollment_mode.rb +0 -3
- data/lib/clerk/models/components/effective_mode.rb +0 -3
- data/lib/clerk/models/components/emailaddress.rb +1 -1
- data/lib/clerk/models/components/emailaddress_admin.rb +1 -1
- data/lib/clerk/models/components/emailaddress_object.rb +1 -3
- data/lib/clerk/models/components/emailaddress_otp.rb +1 -1
- data/lib/clerk/models/components/emailaddress_ticket.rb +1 -1
- data/lib/clerk/models/components/emailaddress_verification_admin_object.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_admin_status.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_admin_strategy.rb +1 -3
- data/lib/clerk/models/components/emailaddress_verification_otp_object.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_otp_status.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_otp_strategy.rb +1 -3
- data/lib/clerk/models/components/emailaddress_verification_saml_object.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_saml_status.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_saml_strategy.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_ticket_object.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_ticket_status.rb +0 -3
- data/lib/clerk/models/components/emailaddress_verification_ticket_strategy.rb +1 -3
- data/lib/clerk/models/components/enrollment_mode.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_oauth.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount_object.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_ticket.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount_verification_oauth_object.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_oauth_status.rb +1 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_saml_object.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_saml_status.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_saml_strategy.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_ticket_object.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_ticket_status.rb +0 -3
- data/lib/clerk/models/components/enterpriseaccount_verification_ticket_strategy.rb +1 -3
- data/lib/clerk/models/components/externalaccountwithverification.rb +6 -1
- data/lib/clerk/models/components/externalaccountwithverification.rbi +2 -0
- data/lib/clerk/models/components/externalaccountwithverification_oauth.rb +1 -1
- data/lib/clerk/models/components/externalaccountwithverification_object.rb +0 -3
- data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_object.rb +0 -3
- data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_status.rb +1 -3
- data/lib/clerk/models/components/featureresponse_object.rb +0 -3
- data/lib/clerk/models/components/instance_object.rb +0 -3
- data/lib/clerk/models/components/instanceprotect_object.rb +0 -3
- data/lib/clerk/models/components/instancerestrictions_object.rb +0 -3
- data/lib/clerk/models/components/instancesettings_object.rb +0 -3
- data/lib/clerk/models/components/invitation_object.rb +0 -3
- data/lib/clerk/models/components/invitation_revoked_object.rb +0 -3
- data/lib/clerk/models/components/invitation_status.rb +0 -3
- data/lib/clerk/models/components/jwttemplate_object.rb +0 -3
- data/lib/clerk/models/components/machine_created_object.rb +0 -3
- data/lib/clerk/models/components/machine_deleted_object.rb +0 -3
- data/lib/clerk/models/components/machine_object.rb +0 -3
- data/lib/clerk/models/components/machine_secretkey_object.rb +0 -3
- data/lib/clerk/models/components/machinescope_deleted_object.rb +0 -3
- data/lib/clerk/models/components/machinescope_object.rb +0 -3
- data/lib/clerk/models/components/machinewithoutscopedmachines_object.rb +0 -3
- data/lib/clerk/models/components/next_action.rb +0 -3
- data/lib/clerk/models/components/nonce.rb +0 -3
- data/lib/clerk/models/components/oauthaccesstoken_object.rb +0 -3
- data/lib/clerk/models/components/oauthapplication_object.rb +0 -3
- data/lib/clerk/models/components/oauthapplicationwithsecret_object.rb +0 -3
- data/lib/clerk/models/components/object_commercesource.rb +0 -3
- data/lib/clerk/models/components/object_commercestatement.rb +0 -3
- data/lib/clerk/models/components/object_commercestatementgroup.rb +0 -3
- data/lib/clerk/models/components/object_rolesetmigration.rb +0 -3
- data/lib/clerk/models/components/organization.rb +6 -1
- data/lib/clerk/models/components/organization.rbi +2 -0
- data/lib/clerk/models/components/organization_object.rb +0 -3
- data/lib/clerk/models/components/organizationdomain_object.rb +0 -3
- data/lib/clerk/models/components/organizationdomain_status.rb +0 -3
- data/lib/clerk/models/components/organizationinvitation_object.rb +0 -3
- data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata_object.rb +0 -3
- data/lib/clerk/models/components/organizationmembership.rb +1 -1
- data/lib/clerk/models/components/organizationmembership_object.rb +0 -3
- data/lib/clerk/models/components/organizationmembership_object_organization.rb +0 -3
- data/lib/clerk/models/components/organizationmembership_organization.rb +6 -1
- data/lib/clerk/models/components/organizationmembership_organization.rbi +2 -0
- data/lib/clerk/models/components/organizationsettings_object.rb +0 -3
- data/lib/clerk/models/components/organizationwithlogo.rb +6 -1
- data/lib/clerk/models/components/organizationwithlogo.rbi +2 -0
- data/lib/clerk/models/components/organizationwithlogo_object.rb +0 -3
- data/lib/clerk/models/components/paginatedbillingpriceresponse.rb +36 -0
- data/lib/clerk/models/components/paginatedbillingpriceresponse.rbi +15 -0
- data/lib/clerk/models/components/passkey_object.rb +0 -3
- data/lib/clerk/models/components/payer.rb +5 -1
- data/lib/clerk/models/components/payer.rbi +2 -0
- data/lib/clerk/models/components/payment_method.rb +0 -3
- data/lib/clerk/models/components/payment_type.rb +0 -3
- data/lib/clerk/models/components/permission_object.rb +0 -3
- data/lib/clerk/models/components/phonenumber_admin.rb +1 -1
- data/lib/clerk/models/components/phonenumber_object.rb +0 -3
- data/lib/clerk/models/components/phonenumber_otp.rb +1 -1
- data/lib/clerk/models/components/phonenumber_verification_admin_object.rb +0 -3
- data/lib/clerk/models/components/phonenumber_verification_admin_status.rb +0 -3
- data/lib/clerk/models/components/phonenumber_verification_admin_strategy.rb +1 -3
- data/lib/clerk/models/components/phonenumber_verification_otp_object.rb +0 -3
- data/lib/clerk/models/components/phonenumber_verification_otp_status.rb +0 -3
- data/lib/clerk/models/components/phonenumber_verification_otp_strategy.rb +1 -3
- data/lib/clerk/models/components/previous_subscription_item_status.rb +0 -3
- data/lib/clerk/models/components/protocol.rb +0 -3
- data/lib/clerk/models/components/proxycheck_object.rb +0 -3
- data/lib/clerk/models/components/redirecturl_object.rb +0 -3
- data/lib/clerk/models/components/role_object.rb +0 -3
- data/lib/clerk/models/components/roleset_object.rb +0 -3
- data/lib/clerk/models/components/roleset_object_rolesetitem.rb +0 -3
- data/lib/clerk/models/components/rolesetitem_object.rb +0 -3
- data/lib/clerk/models/components/samlaccount_object.rb +0 -3
- data/lib/clerk/models/components/samlaccount_ticket.rb +1 -1
- data/lib/clerk/models/components/samlaccount_verification_saml_object.rb +0 -3
- data/lib/clerk/models/components/samlaccount_verification_saml_status.rb +0 -3
- data/lib/clerk/models/components/samlaccount_verification_saml_strategy.rb +0 -3
- data/lib/clerk/models/components/samlaccount_verification_ticket_object.rb +0 -3
- data/lib/clerk/models/components/samlaccount_verification_ticket_status.rb +0 -3
- data/lib/clerk/models/components/samlaccount_verification_ticket_strategy.rb +1 -3
- data/lib/clerk/models/components/schemas_commerceplan_object.rb +0 -3
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commercepayer.rb +0 -3
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commerceplan.rb +0 -3
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commercesubscriptionitem.rb +0 -3
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_plan_period.rb +0 -3
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_status.rb +0 -3
- data/lib/clerk/models/components/schemas_featureresponse_object.rb +0 -3
- data/lib/clerk/models/components/schemas_samlconnection_object_1.rb +0 -3
- data/lib/clerk/models/components/schemas_samlconnection_object_2.rb +0 -3
- data/lib/clerk/models/components/session_object.rb +0 -3
- data/lib/clerk/models/components/session_status.rb +0 -3
- data/lib/clerk/models/components/signintoken_object.rb +0 -3
- data/lib/clerk/models/components/signintoken_status.rb +0 -3
- data/lib/clerk/models/components/signup_object.rb +0 -3
- data/lib/clerk/models/components/signup_status.rb +0 -3
- data/lib/clerk/models/components/status_commercesource.rb +0 -3
- data/lib/clerk/models/components/status_response.rb +0 -3
- data/lib/clerk/models/components/template_object.rb +0 -3
- data/lib/clerk/models/components/testingtoken_object.rb +0 -3
- data/lib/clerk/models/components/token_object.rb +0 -3
- data/lib/clerk/models/components/totalcount_object.rb +0 -3
- data/lib/clerk/models/components/type.rb +0 -3
- data/lib/clerk/models/components/user_object.rb +0 -3
- data/lib/clerk/models/components/verification_email_link_object.rb +0 -3
- data/lib/clerk/models/components/verification_email_link_status.rb +0 -3
- data/lib/clerk/models/components/verification_email_link_strategy.rb +0 -3
- data/lib/clerk/models/components/verification_from_oauth_object.rb +0 -3
- data/lib/clerk/models/components/verification_from_oauth_status.rb +0 -3
- data/lib/clerk/models/components/verification_google_one_tap_object.rb +0 -3
- data/lib/clerk/models/components/verification_google_one_tap_status.rb +0 -3
- data/lib/clerk/models/components/verification_google_one_tap_strategy.rb +0 -3
- data/lib/clerk/models/components/verification_passkey_object.rb +0 -3
- data/lib/clerk/models/components/verification_passkey_status.rb +0 -3
- data/lib/clerk/models/components/verification_passkey_strategy.rb +0 -3
- data/lib/clerk/models/components/verification_web3_object.rb +0 -3
- data/lib/clerk/models/components/verification_web3_status.rb +0 -3
- data/lib/clerk/models/components/verification_web3_strategy.rb +0 -3
- data/lib/clerk/models/components/waitlistentry_object.rb +0 -3
- data/lib/clerk/models/components/waitlistentry_object_invitation.rb +0 -3
- data/lib/clerk/models/components/waitlistentry_status.rb +0 -3
- data/lib/clerk/models/components/waitlistentry_status_invitation.rb +0 -3
- data/lib/clerk/models/components/web3wallet_admin.rb +1 -1
- data/lib/clerk/models/components/web3wallet_object.rb +0 -3
- data/lib/clerk/models/components/web3wallet_verification_admin_object.rb +0 -3
- data/lib/clerk/models/components/web3wallet_verification_admin_status.rb +0 -3
- data/lib/clerk/models/components/web3wallet_verification_admin_strategy.rb +1 -3
- data/lib/clerk/models/components.rb +4 -2
- data/lib/clerk/models/operations/code_type.rb +0 -3
- data/lib/clerk/models/operations/createapikey_object.rb +0 -3
- data/lib/clerk/models/operations/createbillingprice_response.rb +44 -0
- data/lib/clerk/models/operations/createbillingprice_response.rbi +19 -0
- data/lib/clerk/models/operations/createbulkinvitations_template_slug.rb +0 -3
- data/lib/clerk/models/operations/createbulkwaitlistentries_requestbody.rb +37 -0
- data/lib/clerk/models/operations/createbulkwaitlistentries_requestbody.rbi +15 -0
- data/lib/clerk/models/operations/createbulkwaitlistentries_response.rb +44 -0
- data/lib/clerk/models/operations/createbulkwaitlistentries_response.rbi +19 -0
- data/lib/clerk/models/operations/createinvitation_template_slug.rb +0 -3
- data/lib/clerk/models/operations/createm2mtoken_object.rb +0 -3
- data/lib/clerk/models/operations/createorganization_request.rb +5 -1
- data/lib/clerk/models/operations/createorganization_request.rbi +2 -0
- data/lib/clerk/models/operations/createroleset_type.rb +0 -3
- data/lib/clerk/models/operations/createsessiontoken_object.rb +0 -3
- data/lib/clerk/models/operations/createsessiontokenfromtemplate_object.rb +0 -3
- data/lib/clerk/models/operations/deleteapikey_object.rb +0 -3
- data/lib/clerk/models/operations/enrollment_mode.rb +0 -3
- data/lib/clerk/models/operations/format.rb +0 -3
- data/lib/clerk/models/operations/getapikey_object.rb +0 -3
- data/lib/clerk/models/operations/getapikeys_object.rb +0 -3
- data/lib/clerk/models/operations/getbillingpricelist_request.rb +49 -0
- data/lib/clerk/models/operations/getbillingpricelist_request.rbi +19 -0
- data/lib/clerk/models/operations/getbillingpricelist_response.rb +44 -0
- data/lib/clerk/models/operations/getbillingpricelist_response.rbi +19 -0
- data/lib/clerk/models/operations/getcommerceplanlist_payer_type.rb +0 -3
- data/lib/clerk/models/operations/getcommercesubscriptionitemlist_payer_type.rb +0 -3
- data/lib/clerk/models/operations/getcommercesubscriptionitemlist_status.rb +0 -3
- data/lib/clerk/models/operations/getm2mtokens_object.rb +0 -3
- data/lib/clerk/models/operations/getsessionlist_status.rb +0 -3
- data/lib/clerk/models/operations/gettemplate_template_type.rb +0 -3
- data/lib/clerk/models/operations/gettemplatelist_template_type.rb +0 -3
- data/lib/clerk/models/operations/getuserlist_request.rb +25 -1
- data/lib/clerk/models/operations/getuserlist_request.rbi +8 -0
- data/lib/clerk/models/operations/getuserscount_request.rb +26 -1
- data/lib/clerk/models/operations/getuserscount_request.rbi +8 -0
- data/lib/clerk/models/operations/include_invalid.rb +0 -3
- data/lib/clerk/models/operations/listinstanceorganizationinvitations_status.rb +0 -3
- data/lib/clerk/models/operations/listinvitations_status.rb +0 -3
- data/lib/clerk/models/operations/listorganizationinvitations_status.rb +0 -3
- data/lib/clerk/models/operations/listwaitlistentries_status.rb +0 -3
- data/lib/clerk/models/operations/provider_1.rb +0 -3
- data/lib/clerk/models/operations/provider_2.rb +0 -3
- data/lib/clerk/models/operations/reverttemplate_template_type.rb +0 -3
- data/lib/clerk/models/operations/revokeapikey_object.rb +0 -3
- data/lib/clerk/models/operations/revokem2mtoken_object.rb +0 -3
- data/lib/clerk/models/operations/toggletemplatedelivery_template_type.rb +0 -3
- data/lib/clerk/models/operations/updateapikey_object.rb +0 -3
- data/lib/clerk/models/operations/updateinstanceauthconfig_request.rb +1 -1
- data/lib/clerk/models/operations/updateorganization_requestbody.rb +5 -1
- data/lib/clerk/models/operations/updateorganization_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updateroleset_type.rb +0 -3
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +5 -1
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/upserttemplate_template_type.rb +0 -3
- data/lib/clerk/models/operations/usersgetorganizationinvitations_status.rb +0 -3
- data/lib/clerk/models/operations/verified.rb +0 -3
- data/lib/clerk/models/operations/verifyapikey_object.rb +0 -3
- data/lib/clerk/models/operations/verifym2mtoken_object.rb +0 -3
- data/lib/clerk/models/operations/verifyoauthaccesstoken_object.rb +0 -3
- data/lib/clerk/models/operations.rb +5 -0
- data/lib/clerk/sdkconfiguration.rb +3 -3
- data/lib/clerk/utils/url.rb +1 -1
- data/lib/clerk/utils/utils.rb +9 -0
- data/lib/clerk/waitlistentries.rb +151 -0
- data/lib/crystalline/enum.rbi +17 -0
- data/lib/crystalline/metadata_fields.rb +17 -13
- data/lib/crystalline/module.rb +90 -12
- data/lib/crystalline/types.rb +27 -0
- metadata +25 -10
- data/lib/clerk/models/components/commercepriceresponse_object.rbi +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 365324ee63a1b3987814bcb8fe08c57aea133cb62281c716e4d46ff68b1b81e5
|
|
4
|
+
data.tar.gz: d57c6f9c7642d3b09d3d906cf075af0a495ad73ad14c33312c2967b1f0d83bb3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f024cc4b4509c726d903641128caaa8edb1cdc15cde8030fb06605de1dd8f170a4ca9ec1ca54d69712bdc82d08a9e9ddb951fc84b550c4cef14b3ed8d47e73b6
|
|
7
|
+
data.tar.gz: 847de47005664f5fdeb7420698dafdebd2e3c4afbc03092bad967886ec2db55b20ba91937b2f7fa820e399727bd75da1f40d286fb3372d37fdd9c3ba1c4d2b2c
|
data/lib/clerk/billing.rb
CHANGED
|
@@ -196,6 +196,324 @@ module Clerk
|
|
|
196
196
|
|
|
197
197
|
|
|
198
198
|
|
|
199
|
+
def list_prices(paginated: nil, limit: nil, offset: nil, plan_id: nil, retries: nil, timeout_ms: nil)
|
|
200
|
+
# list_prices - List all billing prices
|
|
201
|
+
# Returns a list of all prices for the instance. The prices are returned sorted by amount ascending,
|
|
202
|
+
# then by creation date descending. This includes both default and custom prices. Pagination is supported.
|
|
203
|
+
request = Models::Operations::GetBillingPriceListRequest.new(
|
|
204
|
+
paginated: paginated,
|
|
205
|
+
limit: limit,
|
|
206
|
+
offset: offset,
|
|
207
|
+
plan_id: plan_id
|
|
208
|
+
)
|
|
209
|
+
url, params = @sdk_configuration.get_server_details
|
|
210
|
+
base_url = Utils.template_url(url, params)
|
|
211
|
+
url = "#{base_url}/billing/prices"
|
|
212
|
+
headers = {}
|
|
213
|
+
|
|
214
|
+
query_params = Utils.get_query_params(Models::Operations::GetBillingPriceListRequest, request, nil)
|
|
215
|
+
headers['Accept'] = 'application/json'
|
|
216
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
217
|
+
retries ||= @sdk_configuration.retry_config
|
|
218
|
+
retries ||= Utils::RetryConfig.new(
|
|
219
|
+
backoff: Utils::BackoffStrategy.new(
|
|
220
|
+
exponent: 1.5,
|
|
221
|
+
initial_interval: 500,
|
|
222
|
+
max_elapsed_time: 3_600_000,
|
|
223
|
+
max_interval: 60_000
|
|
224
|
+
),
|
|
225
|
+
retry_connection_errors: true,
|
|
226
|
+
strategy: 'backoff'
|
|
227
|
+
)
|
|
228
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
229
|
+
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
230
|
+
|
|
231
|
+
security = @sdk_configuration.security_source&.call
|
|
232
|
+
|
|
233
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
234
|
+
timeout ||= @sdk_configuration.timeout
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
connection = @sdk_configuration.client.dup
|
|
238
|
+
connection.request :retry, retry_options
|
|
239
|
+
|
|
240
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
241
|
+
config: @sdk_configuration,
|
|
242
|
+
base_url: base_url,
|
|
243
|
+
oauth2_scopes: nil,
|
|
244
|
+
operation_id: 'GetBillingPriceList',
|
|
245
|
+
security_source: @sdk_configuration.security_source
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
error = nil
|
|
249
|
+
http_response = nil
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
begin
|
|
253
|
+
http_response = connection.get(url) do |req|
|
|
254
|
+
req.headers.merge!(headers)
|
|
255
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
256
|
+
req.params = query_params
|
|
257
|
+
Utils.configure_request_security(req, security)
|
|
258
|
+
|
|
259
|
+
@sdk_configuration.hooks.before_request(
|
|
260
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
261
|
+
hook_ctx: hook_ctx
|
|
262
|
+
),
|
|
263
|
+
request: req
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
rescue StandardError => e
|
|
267
|
+
error = e
|
|
268
|
+
ensure
|
|
269
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
270
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
271
|
+
error: error,
|
|
272
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
273
|
+
hook_ctx: hook_ctx
|
|
274
|
+
),
|
|
275
|
+
response: http_response
|
|
276
|
+
)
|
|
277
|
+
else
|
|
278
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
279
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
280
|
+
hook_ctx: hook_ctx
|
|
281
|
+
),
|
|
282
|
+
response: http_response
|
|
283
|
+
)
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if http_response.nil?
|
|
287
|
+
raise error if !error.nil?
|
|
288
|
+
raise 'no response'
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
293
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
294
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
295
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
296
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
297
|
+
hook_ctx: hook_ctx
|
|
298
|
+
),
|
|
299
|
+
response: http_response
|
|
300
|
+
)
|
|
301
|
+
response_data = http_response.env.response_body
|
|
302
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::PaginatedBillingPriceResponse)
|
|
303
|
+
response = Models::Operations::GetBillingPriceListResponse.new(
|
|
304
|
+
status_code: http_response.status,
|
|
305
|
+
content_type: content_type,
|
|
306
|
+
raw_response: http_response,
|
|
307
|
+
paginated_billing_price_response: obj
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
return response
|
|
311
|
+
else
|
|
312
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
313
|
+
end
|
|
314
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '404', '422'])
|
|
315
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
316
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
317
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
318
|
+
hook_ctx: hook_ctx
|
|
319
|
+
),
|
|
320
|
+
response: http_response
|
|
321
|
+
)
|
|
322
|
+
response_data = http_response.env.response_body
|
|
323
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
324
|
+
obj.raw_response = http_response
|
|
325
|
+
raise obj
|
|
326
|
+
else
|
|
327
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
328
|
+
end
|
|
329
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
330
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
331
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
332
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
333
|
+
hook_ctx: hook_ctx
|
|
334
|
+
),
|
|
335
|
+
response: http_response
|
|
336
|
+
)
|
|
337
|
+
response_data = http_response.env.response_body
|
|
338
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
339
|
+
obj.raw_response = http_response
|
|
340
|
+
raise obj
|
|
341
|
+
else
|
|
342
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
343
|
+
end
|
|
344
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
345
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
346
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
347
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
348
|
+
else
|
|
349
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
350
|
+
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def create_price(request:, retries: nil, timeout_ms: nil)
|
|
357
|
+
# create_price - Create a custom billing price
|
|
358
|
+
# Creates a custom price for a billing plan. Custom prices allow you to offer different pricing
|
|
359
|
+
# to specific customers while maintaining the same plan structure.
|
|
360
|
+
url, params = @sdk_configuration.get_server_details
|
|
361
|
+
base_url = Utils.template_url(url, params)
|
|
362
|
+
url = "#{base_url}/billing/prices"
|
|
363
|
+
headers = {}
|
|
364
|
+
|
|
365
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json)
|
|
366
|
+
headers['content-type'] = req_content_type
|
|
367
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
368
|
+
|
|
369
|
+
if form
|
|
370
|
+
body = Utils.encode_form(form)
|
|
371
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
372
|
+
body = URI.encode_www_form(data)
|
|
373
|
+
else
|
|
374
|
+
body = data
|
|
375
|
+
end
|
|
376
|
+
headers['Accept'] = 'application/json'
|
|
377
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
378
|
+
retries ||= @sdk_configuration.retry_config
|
|
379
|
+
retries ||= Utils::RetryConfig.new(
|
|
380
|
+
backoff: Utils::BackoffStrategy.new(
|
|
381
|
+
exponent: 1.5,
|
|
382
|
+
initial_interval: 500,
|
|
383
|
+
max_elapsed_time: 3_600_000,
|
|
384
|
+
max_interval: 60_000
|
|
385
|
+
),
|
|
386
|
+
retry_connection_errors: true,
|
|
387
|
+
strategy: 'backoff'
|
|
388
|
+
)
|
|
389
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
390
|
+
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
391
|
+
|
|
392
|
+
security = @sdk_configuration.security_source&.call
|
|
393
|
+
|
|
394
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
395
|
+
timeout ||= @sdk_configuration.timeout
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
connection = @sdk_configuration.client.dup
|
|
399
|
+
connection.request :retry, retry_options
|
|
400
|
+
|
|
401
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
402
|
+
config: @sdk_configuration,
|
|
403
|
+
base_url: base_url,
|
|
404
|
+
oauth2_scopes: nil,
|
|
405
|
+
operation_id: 'CreateBillingPrice',
|
|
406
|
+
security_source: @sdk_configuration.security_source
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
error = nil
|
|
410
|
+
http_response = nil
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
begin
|
|
414
|
+
http_response = connection.post(url) do |req|
|
|
415
|
+
req.body = body
|
|
416
|
+
req.headers.merge!(headers)
|
|
417
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
418
|
+
Utils.configure_request_security(req, security)
|
|
419
|
+
|
|
420
|
+
@sdk_configuration.hooks.before_request(
|
|
421
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
422
|
+
hook_ctx: hook_ctx
|
|
423
|
+
),
|
|
424
|
+
request: req
|
|
425
|
+
)
|
|
426
|
+
end
|
|
427
|
+
rescue StandardError => e
|
|
428
|
+
error = e
|
|
429
|
+
ensure
|
|
430
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
431
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
432
|
+
error: error,
|
|
433
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
434
|
+
hook_ctx: hook_ctx
|
|
435
|
+
),
|
|
436
|
+
response: http_response
|
|
437
|
+
)
|
|
438
|
+
else
|
|
439
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
440
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
441
|
+
hook_ctx: hook_ctx
|
|
442
|
+
),
|
|
443
|
+
response: http_response
|
|
444
|
+
)
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if http_response.nil?
|
|
448
|
+
raise error if !error.nil?
|
|
449
|
+
raise 'no response'
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
454
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
455
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
456
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
457
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
458
|
+
hook_ctx: hook_ctx
|
|
459
|
+
),
|
|
460
|
+
response: http_response
|
|
461
|
+
)
|
|
462
|
+
response_data = http_response.env.response_body
|
|
463
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::BillingPriceResponse)
|
|
464
|
+
response = Models::Operations::CreateBillingPriceResponse.new(
|
|
465
|
+
status_code: http_response.status,
|
|
466
|
+
content_type: content_type,
|
|
467
|
+
raw_response: http_response,
|
|
468
|
+
billing_price_response: obj
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
return response
|
|
472
|
+
else
|
|
473
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
474
|
+
end
|
|
475
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '404', '422'])
|
|
476
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
477
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
478
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
479
|
+
hook_ctx: hook_ctx
|
|
480
|
+
),
|
|
481
|
+
response: http_response
|
|
482
|
+
)
|
|
483
|
+
response_data = http_response.env.response_body
|
|
484
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
485
|
+
obj.raw_response = http_response
|
|
486
|
+
raise obj
|
|
487
|
+
else
|
|
488
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
489
|
+
end
|
|
490
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
491
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
492
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
493
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
494
|
+
hook_ctx: hook_ctx
|
|
495
|
+
),
|
|
496
|
+
response: http_response
|
|
497
|
+
)
|
|
498
|
+
response_data = http_response.env.response_body
|
|
499
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
500
|
+
obj.raw_response = http_response
|
|
501
|
+
raise obj
|
|
502
|
+
else
|
|
503
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
504
|
+
end
|
|
505
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
506
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
507
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
508
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
509
|
+
else
|
|
510
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
511
|
+
|
|
512
|
+
end
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
199
517
|
def list_subscription_items(request:, retries: nil, timeout_ms: nil)
|
|
200
518
|
# list_subscription_items - List all subscription items
|
|
201
519
|
# Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date,
|
|
@@ -10,10 +10,7 @@ module Clerk
|
|
|
10
10
|
# AllowlistIdentifierObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
#
|
|
12
12
|
class AllowlistIdentifierObject
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
include ::Crystalline::Enum
|
|
16
|
-
|
|
17
14
|
enums do
|
|
18
15
|
ALLOWLIST_IDENTIFIER = new('allowlist_identifier')
|
|
19
16
|
end
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# BillingPaymentAttemptObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class BillingPaymentAttemptObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_PAYMENT = new('commerce_payment')
|
|
18
15
|
end
|
|
@@ -8,12 +8,12 @@ module Clerk
|
|
|
8
8
|
module Models
|
|
9
9
|
module Components
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class BillingPriceResponse
|
|
12
12
|
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
15
|
# String representing the object's type. Objects of the same type share the same value.
|
|
16
|
-
field :object, Models::Components::
|
|
16
|
+
field :object, Models::Components::BillingPriceResponseObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': Utils.enum_from_string(Models::Components::BillingPriceResponseObject, false) } }
|
|
17
17
|
# Unique identifier for the price.
|
|
18
18
|
field :id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('id'), required: true } }
|
|
19
19
|
# Unique identifier for the associated plan.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class Clerk::Models::Components::
|
|
5
|
+
class Clerk::Models::Components::BillingPriceResponse
|
|
6
6
|
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class Clerk::Models::Components::
|
|
10
|
+
class Clerk::Models::Components::BillingPriceResponse
|
|
11
11
|
def object(); end
|
|
12
12
|
def object=(str_); end
|
|
13
13
|
def id(); end
|
data/lib/clerk/models/components/{commercepriceresponse_object.rb → billingpriceresponse_object.rb}
RENAMED
|
@@ -7,12 +7,9 @@
|
|
|
7
7
|
module Clerk
|
|
8
8
|
module Models
|
|
9
9
|
module Components
|
|
10
|
-
#
|
|
11
|
-
class
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
# BillingPriceResponseObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
|
+
class BillingPriceResponseObject
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_PRICE = new('commerce_price')
|
|
18
15
|
end
|
|
@@ -10,10 +10,7 @@ module Clerk
|
|
|
10
10
|
# BlocklistIdentifierObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
#
|
|
12
12
|
class BlocklistIdentifierObject
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
include ::Crystalline::Enum
|
|
16
|
-
|
|
17
14
|
enums do
|
|
18
15
|
BLOCKLIST_IDENTIFIER = new('blocklist_identifier')
|
|
19
16
|
end
|
|
@@ -20,6 +20,8 @@ module Clerk
|
|
|
20
20
|
field :instance_id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('instance_id'), required: true } }
|
|
21
21
|
# URL of the payer's image/avatar.
|
|
22
22
|
field :image_url, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('image_url') } }
|
|
23
|
+
|
|
24
|
+
field :credits_balance, Crystalline::Nilable.new(Models::Components::CommerceMoneyResponse), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('credits_balance') } }
|
|
23
25
|
# Unix timestamp (in milliseconds) when the payer was created.
|
|
24
26
|
field :created_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('created_at') } }
|
|
25
27
|
# Unix timestamp (in milliseconds) when the payer was last updated.
|
|
@@ -38,11 +40,12 @@ module Clerk
|
|
|
38
40
|
field :organization_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('organization_name') } }
|
|
39
41
|
|
|
40
42
|
|
|
41
|
-
def initialize(object:, id:, instance_id:, image_url: nil, created_at: nil, updated_at: nil, user_id: nil, first_name: nil, last_name: nil, email: nil, organization_id: nil, organization_name: nil)
|
|
43
|
+
def initialize(object:, id:, instance_id:, image_url: nil, credits_balance: nil, created_at: nil, updated_at: nil, user_id: nil, first_name: nil, last_name: nil, email: nil, organization_id: nil, organization_name: nil)
|
|
42
44
|
@object = object
|
|
43
45
|
@id = id
|
|
44
46
|
@instance_id = instance_id
|
|
45
47
|
@image_url = image_url
|
|
48
|
+
@credits_balance = credits_balance
|
|
46
49
|
@created_at = created_at
|
|
47
50
|
@updated_at = updated_at
|
|
48
51
|
@user_id = user_id
|
|
@@ -60,6 +63,7 @@ module Clerk
|
|
|
60
63
|
return false unless @id == other.id
|
|
61
64
|
return false unless @instance_id == other.instance_id
|
|
62
65
|
return false unless @image_url == other.image_url
|
|
66
|
+
return false unless @credits_balance == other.credits_balance
|
|
63
67
|
return false unless @created_at == other.created_at
|
|
64
68
|
return false unless @updated_at == other.updated_at
|
|
65
69
|
return false unless @user_id == other.user_id
|
|
@@ -16,6 +16,8 @@ class Clerk::Models::Components::CommercePayerResponse
|
|
|
16
16
|
def instance_id=(str_); end
|
|
17
17
|
def image_url(); end
|
|
18
18
|
def image_url=(str_); end
|
|
19
|
+
def credits_balance(); end
|
|
20
|
+
def credits_balance=(str_); end
|
|
19
21
|
def created_at(); end
|
|
20
22
|
def created_at=(str_); end
|
|
21
23
|
def updated_at(); end
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommercePayerResponseObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class CommercePayerResponseObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_PAYER = new('commerce_payer')
|
|
18
15
|
end
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommercePaymentMethodResponseObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class CommercePaymentMethodResponseObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_PAYMENT_METHOD = new('commerce_payment_method')
|
|
18
15
|
end
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommercePaymentMethodResponseStatus - Status of the payment method.
|
|
11
11
|
class CommercePaymentMethodResponseStatus
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
ACTIVE = new('active')
|
|
18
15
|
DISCONNECTED = new('disconnected')
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommercePlanObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class CommercePlanObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_PLAN = new('commerce_plan')
|
|
18
15
|
end
|
|
@@ -15,7 +15,7 @@ module Clerk
|
|
|
15
15
|
|
|
16
16
|
field :previous_plan, Models::Components::SchemasCommercePlan, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('previous_plan'), required: true } }
|
|
17
17
|
|
|
18
|
-
field :previous_price, Models::Components::
|
|
18
|
+
field :previous_price, Models::Components::BillingPriceResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('previous_price'), required: true } }
|
|
19
19
|
# Unix timestamp (milliseconds) when the new price takes effect.
|
|
20
20
|
field :effective_at, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('effective_at'), required: true } }
|
|
21
21
|
# When the new price takes effect.
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommercePriceTransitionResponseObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class CommercePriceTransitionResponseObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_PRICE_TRANSITION = new('commerce_price_transition')
|
|
18
15
|
end
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommerceSubscriptionObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class CommerceSubscriptionObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_SUBSCRIPTION = new('commerce_subscription')
|
|
18
15
|
end
|
|
@@ -9,10 +9,7 @@ module Clerk
|
|
|
9
9
|
module Components
|
|
10
10
|
# CommerceSubscriptionItemObject - String representing the object's type. Objects of the same type share the same value.
|
|
11
11
|
class CommerceSubscriptionItemObject
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
include ::Crystalline::Enum
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
COMMERCE_SUBSCRIPTION_ITEM = new('commerce_subscription_item')
|
|
18
15
|
end
|