clerk-sdk-ruby 5.1.1 → 5.1.3
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/actortokens.rb +12 -4
- data/lib/clerk/agenttasks.rb +335 -0
- data/lib/clerk/allowlistidentifiers.rb +16 -5
- data/lib/clerk/api_keys.rb +39 -13
- data/lib/clerk/betafeatures.rb +17 -9
- data/lib/clerk/billing.rb +46 -14
- data/lib/clerk/blocklistidentifiers.rb +16 -5
- data/lib/clerk/clients.rb +18 -7
- data/lib/clerk/domains.rb +21 -7
- data/lib/clerk/emailaddresses.rb +23 -9
- data/lib/clerk/emailandsmstemplates.rb +10 -5
- data/lib/clerk/emailsmstemplates.rb +28 -14
- data/lib/clerk/instancesettings.rb +306 -15
- data/lib/clerk/invitations.rb +22 -8
- data/lib/clerk/jwks.rb +7 -2
- data/lib/clerk/jwttemplates.rb +25 -8
- data/lib/clerk/m2m.rb +32 -14
- data/lib/clerk/machines.rb +43 -14
- data/lib/clerk/miscellaneous.rb +7 -2
- data/lib/clerk/models/components/action.rb +20 -0
- data/lib/clerk/models/components/action.rbi +11 -0
- data/lib/clerk/models/components/actortoken.rb +4 -4
- data/lib/clerk/models/components/adjustcreditbalancerequest.rb +48 -0
- data/lib/clerk/models/components/adjustcreditbalancerequest.rbi +21 -0
- data/lib/clerk/models/components/agenttask.rb +47 -0
- data/lib/clerk/models/components/agenttask.rbi +19 -0
- data/lib/clerk/models/components/agenttask_object.rb +19 -0
- data/lib/clerk/models/components/agenttask_object.rbi +11 -0
- data/lib/clerk/models/components/allowlistidentifier.rb +6 -6
- data/lib/clerk/models/components/allowlistidentifier_object.rb +1 -1
- data/lib/clerk/models/components/balance.rb +44 -0
- data/lib/clerk/models/components/balance.rbi +19 -0
- data/lib/clerk/models/components/billingpaymentattempt.rb +7 -3
- data/lib/clerk/models/components/billingpaymentattempt.rbi +2 -0
- data/lib/clerk/models/components/billingpaymentattempt_credits.rb +40 -0
- data/lib/clerk/models/components/billingpaymentattempt_credits.rbi +17 -0
- data/lib/clerk/models/components/billingpaymentattempt_payer.rb +36 -0
- data/lib/clerk/models/components/billingpaymentattempt_payer.rbi +15 -0
- data/lib/clerk/models/components/billingpaymentattempt_proration.rb +44 -0
- data/lib/clerk/models/components/billingpaymentattempt_proration.rbi +19 -0
- data/lib/clerk/models/components/billingpaymentattempt_totals.rb +52 -0
- data/lib/clerk/models/components/billingpaymentattempt_totals.rbi +23 -0
- data/lib/clerk/models/components/billingpriceresponse.rb +6 -2
- data/lib/clerk/models/components/billingpriceresponse.rbi +2 -0
- data/lib/clerk/models/components/billingstatement.rb +3 -3
- data/lib/clerk/models/components/{totals.rb → billingstatement_totals.rb} +6 -2
- data/lib/clerk/models/components/{totals.rbi → billingstatement_totals.rbi} +4 -2
- data/lib/clerk/models/components/blocklistidentifier.rb +6 -6
- data/lib/clerk/models/components/blocklistidentifier_object.rb +1 -1
- data/lib/clerk/models/components/blocklistidentifiers.rb +1 -1
- data/lib/clerk/models/components/client.rb +7 -7
- data/lib/clerk/models/components/client_object.rb +1 -1
- data/lib/clerk/models/components/cnametarget.rb +1 -1
- data/lib/clerk/models/components/commercecreditbalanceresponse.rb +36 -0
- data/lib/clerk/models/components/commercecreditbalanceresponse.rbi +15 -0
- data/lib/clerk/models/components/commercecreditledgerresponse.rb +64 -0
- data/lib/clerk/models/components/commercecreditledgerresponse.rbi +29 -0
- data/lib/clerk/models/components/commercepayerresponse.rb +1 -1
- data/lib/clerk/models/components/commercepaymentmethodresponse.rb +3 -3
- data/lib/clerk/models/components/commerceperunittotal.rb +40 -0
- data/lib/clerk/models/components/commerceperunittotal.rbi +17 -0
- data/lib/clerk/models/components/commerceperunittotaltier.rb +40 -0
- data/lib/clerk/models/components/commerceperunittotaltier.rbi +17 -0
- data/lib/clerk/models/components/commerceplan.rb +8 -4
- data/lib/clerk/models/components/commerceplan.rbi +2 -0
- data/lib/clerk/models/components/commerceplanunitprice.rb +40 -0
- data/lib/clerk/models/components/commerceplanunitprice.rbi +17 -0
- data/lib/clerk/models/components/commerceplanunitpricetier.rb +40 -0
- data/lib/clerk/models/components/commerceplanunitpricetier.rbi +17 -0
- data/lib/clerk/models/components/commercepricetransitiondetails.rb +2 -2
- data/lib/clerk/models/components/commercepricetransitionresponse.rb +1 -1
- data/lib/clerk/models/components/commercesubscription.rb +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem.rb +17 -5
- data/lib/clerk/models/components/commercesubscriptionitem.rbi +6 -0
- data/lib/clerk/models/components/commercesubscriptionitem_credits.rb +40 -0
- data/lib/clerk/models/components/commercesubscriptionitem_credits.rbi +17 -0
- data/lib/clerk/models/components/commercesubscriptionitem_payer.rb +36 -0
- data/lib/clerk/models/components/commercesubscriptionitem_payer.rbi +15 -0
- data/lib/clerk/models/components/commercesubscriptionitem_plan.rb +8 -4
- data/lib/clerk/models/components/commercesubscriptionitem_plan.rbi +2 -0
- data/lib/clerk/models/components/commercesubscriptionitem_proration.rb +44 -0
- data/lib/clerk/models/components/commercesubscriptionitem_proration.rbi +19 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals.rb +52 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals.rbi +23 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_credits.rb +40 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_credits.rbi +17 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_payer.rb +36 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_payer.rbi +15 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_proration.rb +44 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals_proration.rbi +19 -0
- data/lib/clerk/models/components/cookies.rb +1 -1
- data/lib/clerk/models/components/creator_role.rb +1 -1
- data/lib/clerk/models/components/default_role.rb +1 -1
- data/lib/clerk/models/components/domain.rb +2 -2
- data/lib/clerk/models/components/domains.rb +1 -1
- data/lib/clerk/models/components/emailaddress.rb +5 -5
- data/lib/clerk/models/components/emailaddress_admin.rb +3 -3
- data/lib/clerk/models/components/emailaddress_object.rb +1 -1
- data/lib/clerk/models/components/emailaddress_otp.rb +3 -3
- data/lib/clerk/models/components/emailaddress_saml.rb +3 -3
- data/lib/clerk/models/components/emailaddress_ticket.rb +3 -3
- data/lib/clerk/models/components/emaillink.rb +3 -3
- data/lib/clerk/models/components/enterpriseaccount.rb +5 -5
- data/lib/clerk/models/components/enterpriseaccount_oauth.rb +2 -2
- data/lib/clerk/models/components/enterpriseaccount_object.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount_saml.rb +3 -3
- data/lib/clerk/models/components/enterpriseaccount_ticket.rb +3 -3
- data/lib/clerk/models/components/enterpriseconnection_1.rb +3 -3
- data/lib/clerk/models/components/enterpriseconnection_2.rb +3 -3
- data/lib/clerk/models/components/extendfreetrialrequest.rb +1 -1
- data/lib/clerk/models/components/externalaccountwithverification.rb +7 -7
- data/lib/clerk/models/components/externalaccountwithverification_oauth.rb +2 -2
- data/lib/clerk/models/components/featureresponse.rb +1 -1
- data/lib/clerk/models/components/fromoauth.rb +2 -2
- data/lib/clerk/models/components/googleonetap.rb +3 -3
- data/lib/clerk/models/components/group.rb +1 -1
- data/lib/clerk/models/components/instance.rb +1 -1
- data/lib/clerk/models/components/instanceprotect.rb +1 -1
- data/lib/clerk/models/components/instancerestrictions.rb +1 -1
- data/lib/clerk/models/components/instancesettings.rb +1 -1
- data/lib/clerk/models/components/invitation.rb +5 -5
- data/lib/clerk/models/components/invitation_revoked.rb +5 -5
- data/lib/clerk/models/components/jwttemplate.rb +3 -3
- data/lib/clerk/models/components/machine.rb +1 -1
- data/lib/clerk/models/components/machine_created.rb +1 -1
- data/lib/clerk/models/components/machine_deleted.rb +1 -1
- data/lib/clerk/models/components/machine_secretkey.rb +1 -1
- data/lib/clerk/models/components/machinescope.rb +1 -1
- data/lib/clerk/models/components/machinescope_deleted.rb +1 -1
- data/lib/clerk/models/components/machinewithoutscopedmachines.rb +1 -1
- data/lib/clerk/models/components/oauthaccesstoken.rb +1 -1
- data/lib/clerk/models/components/oauthapplication.rb +6 -6
- data/lib/clerk/models/components/oauthapplications.rb +1 -1
- data/lib/clerk/models/components/oauthapplicationsettings.rb +40 -0
- data/lib/clerk/models/components/oauthapplicationsettings.rbi +17 -0
- data/lib/clerk/models/components/oauthapplicationsettings_object.rb +19 -0
- data/lib/clerk/models/components/oauthapplicationsettings_object.rbi +11 -0
- data/lib/clerk/models/components/oauthapplicationwithsecret.rb +7 -7
- data/lib/clerk/models/components/organization.rb +5 -5
- data/lib/clerk/models/components/organizationdomain.rb +3 -3
- data/lib/clerk/models/components/organizationdomain_object.rb +1 -1
- data/lib/clerk/models/components/organizationdomain_verification.rb +1 -1
- data/lib/clerk/models/components/organizationdomains.rb +1 -1
- data/lib/clerk/models/components/organizationinvitation.rb +2 -2
- data/lib/clerk/models/components/organizationinvitation_object.rb +1 -1
- data/lib/clerk/models/components/organizationinvitations.rb +1 -1
- data/lib/clerk/models/components/organizationinvitationswithpublicorganizationdata.rb +1 -1
- data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata.rb +2 -2
- data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata_object.rb +1 -1
- data/lib/clerk/models/components/organizationmembership.rb +2 -2
- data/lib/clerk/models/components/organizationmembership_object.rb +1 -1
- data/lib/clerk/models/components/organizationmembership_organization.rb +5 -5
- data/lib/clerk/models/components/organizationmembershippublicuserdata.rb +1 -1
- data/lib/clerk/models/components/organizationmemberships.rb +1 -1
- data/lib/clerk/models/components/organizations.rb +1 -1
- data/lib/clerk/models/components/organizationsettings.rb +3 -3
- data/lib/clerk/models/components/organizationwithlogo.rb +6 -6
- data/lib/clerk/models/components/passkey.rb +3 -3
- data/lib/clerk/models/components/passkey_object.rb +1 -1
- data/lib/clerk/models/components/payment_source.rb +3 -3
- data/lib/clerk/models/components/permission.rb +3 -3
- data/lib/clerk/models/components/permissions.rb +1 -1
- data/lib/clerk/models/components/phonenumber.rb +4 -4
- data/lib/clerk/models/components/phonenumber_admin.rb +3 -3
- data/lib/clerk/models/components/phonenumber_object.rb +1 -1
- data/lib/clerk/models/components/phonenumber_otp.rb +3 -3
- data/lib/clerk/models/components/protocol.rb +1 -1
- data/lib/clerk/models/components/proxycheck.rb +4 -4
- data/lib/clerk/models/components/redirecturl.rb +3 -3
- data/lib/clerk/models/components/role.rb +3 -3
- data/lib/clerk/models/components/role_set_migration.rb +1 -1
- data/lib/clerk/models/components/roles.rb +1 -1
- data/lib/clerk/models/components/roleset.rb +2 -2
- data/lib/clerk/models/components/rolesetitem.rb +1 -1
- data/lib/clerk/models/components/samlaccount.rb +3 -3
- data/lib/clerk/models/components/samlaccount_object.rb +1 -1
- data/lib/clerk/models/components/samlaccount_saml.rb +3 -3
- data/lib/clerk/models/components/samlaccount_ticket.rb +3 -3
- data/lib/clerk/models/components/samlconnection_1.rb +3 -3
- data/lib/clerk/models/components/samlconnection_2.rb +3 -3
- data/lib/clerk/models/components/samlconnections.rb +1 -1
- data/lib/clerk/models/components/schemas_commerceplan.rb +1 -1
- data/lib/clerk/models/components/schemas_commercesubscriptionitem.rb +4 -4
- data/lib/clerk/models/components/{payer.rb → schemas_commercesubscriptionitem_payer.rb} +2 -2
- data/lib/clerk/models/components/{payer.rbi → schemas_commercesubscriptionitem_payer.rbi} +2 -2
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_plan.rb +1 -1
- data/lib/clerk/models/components/schemas_featureresponse.rb +1 -1
- data/lib/clerk/models/components/schemas_samlconnection_samlconnection_1.rb +4 -4
- data/lib/clerk/models/components/schemas_samlconnection_samlconnection_2.rb +4 -4
- data/lib/clerk/models/components/seats.rb +32 -0
- data/lib/clerk/models/components/seats.rbi +13 -0
- data/lib/clerk/models/components/session.rb +7 -7
- data/lib/clerk/models/components/session_object.rb +1 -1
- data/lib/clerk/models/components/signintoken.rb +4 -4
- data/lib/clerk/models/components/signup.rb +5 -5
- data/lib/clerk/models/components/signup_external_account.rb +1 -1
- data/lib/clerk/models/components/signupverification.rb +2 -2
- data/lib/clerk/models/components/template.rb +4 -4
- data/lib/clerk/models/components/template_object.rb +1 -1
- data/lib/clerk/models/components/testingtoken.rb +2 -2
- data/lib/clerk/models/components/token.rb +3 -3
- data/lib/clerk/models/components/token_object.rb +1 -1
- data/lib/clerk/models/components/totalcount.rb +2 -2
- data/lib/clerk/models/components/totalcount_object.rb +1 -1
- data/lib/clerk/models/components/user.rb +18 -18
- data/lib/clerk/models/components/user_object.rb +1 -1
- data/lib/clerk/models/components/verification_passkey_passkey.rb +4 -4
- data/lib/clerk/models/components/waitlistentry.rb +5 -5
- data/lib/clerk/models/components/waitlistentry_invitation.rb +5 -5
- data/lib/clerk/models/components/web3signature.rb +3 -3
- data/lib/clerk/models/components/web3wallet.rb +4 -4
- data/lib/clerk/models/components/web3wallet_admin.rb +3 -3
- data/lib/clerk/models/components/web3wallet_object.rb +1 -1
- data/lib/clerk/models/components.rb +27 -2
- data/lib/clerk/models/operations/actor.rb +1 -1
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_request.rb +36 -0
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_request.rbi +15 -0
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/adjustorganizationbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_request.rb +36 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_request.rbi +15 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/adjustuserbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rb +1 -1
- data/lib/clerk/models/operations/createagenttask_request.rb +60 -0
- data/lib/clerk/models/operations/createagenttask_request.rbi +23 -0
- data/lib/clerk/models/operations/createagenttask_response.rb +44 -0
- data/lib/clerk/models/operations/createagenttask_response.rbi +19 -0
- data/lib/clerk/models/operations/createapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createbulkinvitations_requestbody.rb +1 -1
- data/lib/clerk/models/operations/createinvitation_request.rb +1 -1
- data/lib/clerk/models/operations/createm2mtoken_request.rb +5 -1
- data/lib/clerk/models/operations/createm2mtoken_request.rbi +2 -0
- data/lib/clerk/models/operations/createm2mtoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createoauthapplication_request.rb +2 -2
- data/lib/clerk/models/operations/createroleset_request.rb +1 -1
- data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rb +3 -3
- data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rb +3 -3
- data/lib/clerk/models/operations/createsessiontoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createsessiontokenfromtemplate_responsebody.rb +1 -1
- data/lib/clerk/models/operations/createuser_request.rb +5 -5
- data/lib/clerk/models/operations/data.rb +1 -1
- data/lib/clerk/models/operations/deleteapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/getapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/getinstanceoauthapplicationsettings_response.rb +44 -0
- data/lib/clerk/models/operations/getinstanceoauthapplicationsettings_response.rbi +19 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_request.rb +32 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_request.rbi +13 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/getorganizationbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/getpublicinterstitial_request.rb +2 -2
- data/lib/clerk/models/operations/getuserbillingcreditbalance_request.rb +32 -0
- data/lib/clerk/models/operations/getuserbillingcreditbalance_request.rbi +13 -0
- data/lib/clerk/models/operations/getuserbillingcreditbalance_response.rb +44 -0
- data/lib/clerk/models/operations/getuserbillingcreditbalance_response.rbi +19 -0
- data/lib/clerk/models/operations/getuserlist_request.rb +2 -2
- data/lib/clerk/models/operations/getuserscount_request.rb +2 -2
- data/lib/clerk/models/operations/listallorganizationdomains_request.rb +3 -3
- data/lib/clerk/models/operations/listinstanceorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/listorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/listwaitlistentries_request.rb +1 -1
- data/lib/clerk/models/operations/m2m_token.rb +1 -1
- data/lib/clerk/models/operations/on_behalf_of.rb +37 -0
- data/lib/clerk/models/operations/on_behalf_of.rbi +15 -0
- data/lib/clerk/models/operations/permissions.rb +19 -0
- data/lib/clerk/models/operations/permissions.rbi +11 -0
- data/lib/clerk/models/operations/refreshsession_requestbody.rb +1 -1
- data/lib/clerk/models/operations/revokeagenttask_request.rb +32 -0
- data/lib/clerk/models/operations/revokeagenttask_request.rbi +13 -0
- data/lib/clerk/models/operations/revokeagenttask_response.rb +44 -0
- data/lib/clerk/models/operations/revokeagenttask_response.rbi +19 -0
- data/lib/clerk/models/operations/revokeapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/revokem2mtoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/token_format.rb +20 -0
- data/lib/clerk/models/operations/token_format.rbi +11 -0
- data/lib/clerk/models/operations/updateapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/updateinstance_request.rb +2 -2
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rb +36 -0
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rbi +15 -0
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_response.rb +44 -0
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_response.rbi +19 -0
- data/lib/clerk/models/operations/updateoauthapplication_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updateroleset_requestbody.rb +1 -1
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updateuser_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updateusermetadata_requestbody.rb +1 -1
- data/lib/clerk/models/operations/usersgetorganizationinvitations_status.rb +1 -0
- data/lib/clerk/models/operations/verifyapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/verifym2mtoken_responsebody.rb +1 -1
- data/lib/clerk/models/operations/verifyoauthaccesstoken_request.rb +2 -2
- data/lib/clerk/models/operations/verifytotp_responsebody.rb +1 -1
- data/lib/clerk/models/operations.rb +18 -0
- data/lib/clerk/oauthaccesstokens.rb +8 -3
- data/lib/clerk/oauthapplications.rb +29 -9
- data/lib/clerk/openapiclient.rb +4 -2
- data/lib/clerk/organizationdomains.rb +27 -10
- data/lib/clerk/organizationinvitations.rb +43 -20
- data/lib/clerk/organizationmemberships.rb +27 -10
- data/lib/clerk/organizationpermissions.rb +25 -8
- data/lib/clerk/organizationroles.rb +33 -10
- data/lib/clerk/organizations.rb +379 -16
- data/lib/clerk/phonenumbers.rb +21 -7
- data/lib/clerk/proxy.rb +1 -1
- data/lib/clerk/proxychecks.rb +10 -5
- data/lib/clerk/redirecturls.rb +20 -6
- data/lib/clerk/rolesets.rb +36 -13
- data/lib/clerk/samlconnections.rb +25 -8
- data/lib/clerk/sdkconfiguration.rb +3 -3
- data/lib/clerk/sessions.rb +40 -14
- data/lib/clerk/signintokens.rb +12 -4
- data/lib/clerk/signups.rb +12 -4
- data/lib/clerk/templates.rb +10 -5
- data/lib/clerk/testingtokens.rb +7 -2
- data/lib/clerk/users.rb +475 -49
- data/lib/clerk/utils/request_bodies.rb +8 -3
- data/lib/clerk/utils/security.rb +10 -0
- data/lib/clerk/utils/url.rb +11 -5
- data/lib/clerk/utils/utils.rb +33 -3
- data/lib/clerk/waitlistentries.rb +32 -12
- data/lib/clerk/webhooks.rb +15 -4
- data/lib/clerk_sdk_ruby.rb +1 -0
- data/lib/crystalline/metadata_fields.rb +66 -9
- data/lib/crystalline/module.rb +3 -3
- data/lib/crystalline/types.rb +11 -3
- metadata +107 -6
|
@@ -13,20 +13,20 @@ module Clerk
|
|
|
13
13
|
include Crystalline::MetadataFields
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
field :object, Models::Components::ActorTokenObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': Utils.enum_from_string(Models::Components::ActorTokenObject, false) } }
|
|
16
|
+
field :object, Models::Components::ActorTokenObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::ActorTokenObject, false) } }
|
|
17
17
|
|
|
18
18
|
field :id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('id'), required: true } }
|
|
19
19
|
|
|
20
|
-
field :status, Models::Components::ActorTokenStatus, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('status'), required: true, 'decoder': Utils.enum_from_string(Models::Components::ActorTokenStatus, false) } }
|
|
20
|
+
field :status, Models::Components::ActorTokenStatus, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('status'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::ActorTokenStatus, false) } }
|
|
21
21
|
|
|
22
22
|
field :user_id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('user_id'), required: true } }
|
|
23
23
|
|
|
24
24
|
field :actor, Models::Components::ActorTokenActor, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('actor'), required: true } }
|
|
25
25
|
# Unix timestamp of creation.
|
|
26
|
-
#
|
|
26
|
+
#
|
|
27
27
|
field :created_at, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('created_at'), required: true } }
|
|
28
28
|
# Unix timestamp of last update.
|
|
29
|
-
#
|
|
29
|
+
#
|
|
30
30
|
field :updated_at, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('updated_at'), required: true } }
|
|
31
31
|
|
|
32
32
|
field :token, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('token') } }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class AdjustCreditBalanceRequest
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# The credit amount in cents. Must be greater than zero.
|
|
16
|
+
field :amount, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('amount'), required: true } }
|
|
17
|
+
# Whether to increase or decrease the credit balance.
|
|
18
|
+
field :action, Models::Components::Action, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('action'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::Action, false) } }
|
|
19
|
+
# A unique key to ensure the adjustment is applied only once. Repeated requests with the same key return the original ledger entry.
|
|
20
|
+
field :idempotency_key, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('idempotency_key'), required: true } }
|
|
21
|
+
# The currency code (e.g. "USD"). Defaults to USD if not provided.
|
|
22
|
+
field :currency, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('currency') } }
|
|
23
|
+
# An optional note to attach to the ledger entry.
|
|
24
|
+
field :note, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('note') } }
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def initialize(amount:, action:, idempotency_key:, currency: nil, note: nil)
|
|
28
|
+
@amount = amount
|
|
29
|
+
@action = action
|
|
30
|
+
@idempotency_key = idempotency_key
|
|
31
|
+
@currency = currency
|
|
32
|
+
@note = note
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def ==(other)
|
|
37
|
+
return false unless other.is_a? self.class
|
|
38
|
+
return false unless @amount == other.amount
|
|
39
|
+
return false unless @action == other.action
|
|
40
|
+
return false unless @idempotency_key == other.idempotency_key
|
|
41
|
+
return false unless @currency == other.currency
|
|
42
|
+
return false unless @note == other.note
|
|
43
|
+
true
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::AdjustCreditBalanceRequest
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::AdjustCreditBalanceRequest
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
def action(); end
|
|
14
|
+
def action=(str_); end
|
|
15
|
+
def idempotency_key(); end
|
|
16
|
+
def idempotency_key=(str_); end
|
|
17
|
+
def currency(); end
|
|
18
|
+
def currency=(str_); end
|
|
19
|
+
def note(); end
|
|
20
|
+
def note=(str_); end
|
|
21
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
# Success
|
|
11
|
+
class AgentTask
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :object, Models::Components::AgentTaskObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::AgentTaskObject, false) } }
|
|
17
|
+
# A stable identifier for the agent, unique per agent_name within an instance.
|
|
18
|
+
#
|
|
19
|
+
field :agent_id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('agent_id'), required: true } }
|
|
20
|
+
# A unique identifier for this agent task.
|
|
21
|
+
#
|
|
22
|
+
field :task_id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('task_id'), required: true } }
|
|
23
|
+
# The URL that, when visited, creates a session for the user. Only present in the response to a create request.
|
|
24
|
+
#
|
|
25
|
+
field :url, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('url') } }
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def initialize(object:, agent_id:, task_id:, url: nil)
|
|
29
|
+
@object = object
|
|
30
|
+
@agent_id = agent_id
|
|
31
|
+
@task_id = task_id
|
|
32
|
+
@url = url
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def ==(other)
|
|
37
|
+
return false unless other.is_a? self.class
|
|
38
|
+
return false unless @object == other.object
|
|
39
|
+
return false unless @agent_id == other.agent_id
|
|
40
|
+
return false unless @task_id == other.task_id
|
|
41
|
+
return false unless @url == other.url
|
|
42
|
+
true
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::AgentTask
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::AgentTask
|
|
11
|
+
def object(); end
|
|
12
|
+
def object=(str_); end
|
|
13
|
+
def agent_id(); end
|
|
14
|
+
def agent_id=(str_); end
|
|
15
|
+
def task_id(); end
|
|
16
|
+
def task_id=(str_); end
|
|
17
|
+
def url(); end
|
|
18
|
+
def url=(str_); end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class AgentTaskObject
|
|
12
|
+
include ::Crystalline::Enum
|
|
13
|
+
enums do
|
|
14
|
+
AGENT_TASK = new('agent_task')
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -13,24 +13,24 @@ module Clerk
|
|
|
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
|
-
#
|
|
17
|
-
field :object, Crystalline::Nilable.new(Models::Components::AllowlistIdentifierObject), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), 'decoder': Utils.enum_from_string(Models::Components::AllowlistIdentifierObject, true) } }
|
|
16
|
+
#
|
|
17
|
+
field :object, Crystalline::Nilable.new(Models::Components::AllowlistIdentifierObject), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::AllowlistIdentifierObject, true) } }
|
|
18
18
|
|
|
19
19
|
field :id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('id') } }
|
|
20
20
|
|
|
21
21
|
field :invitation_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('invitation_id') } }
|
|
22
22
|
# An email address or a phone number.
|
|
23
|
-
#
|
|
23
|
+
#
|
|
24
24
|
field :identifier, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('identifier') } }
|
|
25
25
|
|
|
26
|
-
field :identifier_type, Crystalline::Nilable.new(Models::Components::AllowlistIdentifierIdentifierType), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('identifier_type'), 'decoder': Utils.enum_from_string(Models::Components::AllowlistIdentifierIdentifierType, true) } }
|
|
26
|
+
field :identifier_type, Crystalline::Nilable.new(Models::Components::AllowlistIdentifierIdentifierType), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('identifier_type'), 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::AllowlistIdentifierIdentifierType, true) } }
|
|
27
27
|
|
|
28
28
|
field :instance_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('instance_id') } }
|
|
29
29
|
# Unix timestamp of creation
|
|
30
|
-
#
|
|
30
|
+
#
|
|
31
31
|
field :created_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('created_at') } }
|
|
32
32
|
# Unix timestamp of last update.
|
|
33
|
-
#
|
|
33
|
+
#
|
|
34
34
|
field :updated_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('updated_at') } }
|
|
35
35
|
|
|
36
36
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
# The current credit balance. Null when the payer has never had credits.
|
|
11
|
+
class Balance
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# The amount in cents.
|
|
16
|
+
field :amount, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('amount'), required: true } }
|
|
17
|
+
# The formatted amount as a string (e.g., "$49.99").
|
|
18
|
+
field :amount_formatted, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('amount_formatted'), required: true } }
|
|
19
|
+
# The currency code (e.g., "USD").
|
|
20
|
+
field :currency, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('currency'), required: true } }
|
|
21
|
+
# The currency symbol (e.g., "$").
|
|
22
|
+
field :currency_symbol, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('currency_symbol'), required: true } }
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def initialize(amount:, amount_formatted:, currency:, currency_symbol:)
|
|
26
|
+
@amount = amount
|
|
27
|
+
@amount_formatted = amount_formatted
|
|
28
|
+
@currency = currency
|
|
29
|
+
@currency_symbol = currency_symbol
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def ==(other)
|
|
34
|
+
return false unless other.is_a? self.class
|
|
35
|
+
return false unless @amount == other.amount
|
|
36
|
+
return false unless @amount_formatted == other.amount_formatted
|
|
37
|
+
return false unless @currency == other.currency
|
|
38
|
+
return false unless @currency_symbol == other.currency_symbol
|
|
39
|
+
true
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::Balance
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::Balance
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
def amount_formatted(); end
|
|
14
|
+
def amount_formatted=(str_); end
|
|
15
|
+
def currency(); end
|
|
16
|
+
def currency=(str_); end
|
|
17
|
+
def currency_symbol(); end
|
|
18
|
+
def currency_symbol=(str_); end
|
|
19
|
+
end
|
|
@@ -13,7 +13,7 @@ module Clerk
|
|
|
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::BillingPaymentAttemptObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': Utils.enum_from_string(Models::Components::BillingPaymentAttemptObject, false) } }
|
|
16
|
+
field :object, Models::Components::BillingPaymentAttemptObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::BillingPaymentAttemptObject, false) } }
|
|
17
17
|
# Unique identifier for the payment attempt.
|
|
18
18
|
field :id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('id'), required: true } }
|
|
19
19
|
# Unique identifier for the associated payment.
|
|
@@ -39,7 +39,7 @@ module Clerk
|
|
|
39
39
|
# Unique identifier for the associated statement.
|
|
40
40
|
field :statement_id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('statement_id'), required: true } }
|
|
41
41
|
# The current status of the payment attempt.
|
|
42
|
-
field :status, Models::Components::BillingPaymentAttemptStatus, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('status'), required: true, 'decoder': Utils.enum_from_string(Models::Components::BillingPaymentAttemptStatus, false) } }
|
|
42
|
+
field :status, Models::Components::BillingPaymentAttemptStatus, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('status'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::BillingPaymentAttemptStatus, false) } }
|
|
43
43
|
# Unix timestamp (in milliseconds) when the payment attempt was created.
|
|
44
44
|
field :created_at, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('created_at'), required: true } }
|
|
45
45
|
# Unix timestamp (in milliseconds) when the payment attempt was last updated.
|
|
@@ -56,9 +56,11 @@ module Clerk
|
|
|
56
56
|
field :paid_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('paid_at'), required: true } }
|
|
57
57
|
# Unix timestamp (in milliseconds) when the payment failed to be processed.
|
|
58
58
|
field :failed_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('failed_at'), required: true } }
|
|
59
|
+
# Totals breakdown for this payment attempt.
|
|
60
|
+
field :totals, Crystalline::Nilable.new(Models::Components::BillingPaymentAttemptTotals), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('totals') } }
|
|
59
61
|
|
|
60
62
|
|
|
61
|
-
def initialize(object:, id:, payment_id:, instance_id:, charge_type:, payee_id:, payee:, payer_id:, payer:, amount:, payment_method_id:, payment_method:, statement_id:, status:, created_at:, updated_at:, subscription_item_id: nil, subscription_item: nil, gateway_external_id: nil, gateway_external_url: nil, paid_at: nil, failed_at: nil)
|
|
63
|
+
def initialize(object:, id:, payment_id:, instance_id:, charge_type:, payee_id:, payee:, payer_id:, payer:, amount:, payment_method_id:, payment_method:, statement_id:, status:, created_at:, updated_at:, subscription_item_id: nil, subscription_item: nil, gateway_external_id: nil, gateway_external_url: nil, paid_at: nil, failed_at: nil, totals: nil)
|
|
62
64
|
@object = object
|
|
63
65
|
@id = id
|
|
64
66
|
@payment_id = payment_id
|
|
@@ -81,6 +83,7 @@ module Clerk
|
|
|
81
83
|
@gateway_external_url = gateway_external_url
|
|
82
84
|
@paid_at = paid_at
|
|
83
85
|
@failed_at = failed_at
|
|
86
|
+
@totals = totals
|
|
84
87
|
end
|
|
85
88
|
|
|
86
89
|
|
|
@@ -108,6 +111,7 @@ module Clerk
|
|
|
108
111
|
return false unless @gateway_external_url == other.gateway_external_url
|
|
109
112
|
return false unless @paid_at == other.paid_at
|
|
110
113
|
return false unless @failed_at == other.failed_at
|
|
114
|
+
return false unless @totals == other.totals
|
|
111
115
|
true
|
|
112
116
|
end
|
|
113
117
|
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class BillingPaymentAttemptCredits
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :total, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('total'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :proration, Crystalline::Nilable.new(Models::Components::BillingPaymentAttemptProration), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('proration'), required: true } }
|
|
19
|
+
|
|
20
|
+
field :payer, Crystalline::Nilable.new(Models::Components::BillingPaymentAttemptPayer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('payer'), required: true } }
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def initialize(total:, proration: nil, payer: nil)
|
|
24
|
+
@total = total
|
|
25
|
+
@proration = proration
|
|
26
|
+
@payer = payer
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def ==(other)
|
|
31
|
+
return false unless other.is_a? self.class
|
|
32
|
+
return false unless @total == other.total
|
|
33
|
+
return false unless @proration == other.proration
|
|
34
|
+
return false unless @payer == other.payer
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::BillingPaymentAttemptCredits
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::BillingPaymentAttemptCredits
|
|
11
|
+
def total(); end
|
|
12
|
+
def total=(str_); end
|
|
13
|
+
def proration(); end
|
|
14
|
+
def proration=(str_); end
|
|
15
|
+
def payer(); end
|
|
16
|
+
def payer=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class BillingPaymentAttemptPayer
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :remaining_balance, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('remaining_balance'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :applied_amount, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('applied_amount'), required: true } }
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def initialize(remaining_balance:, applied_amount:)
|
|
22
|
+
@remaining_balance = remaining_balance
|
|
23
|
+
@applied_amount = applied_amount
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def ==(other)
|
|
28
|
+
return false unless other.is_a? self.class
|
|
29
|
+
return false unless @remaining_balance == other.remaining_balance
|
|
30
|
+
return false unless @applied_amount == other.applied_amount
|
|
31
|
+
true
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::BillingPaymentAttemptPayer
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::BillingPaymentAttemptPayer
|
|
11
|
+
def remaining_balance(); end
|
|
12
|
+
def remaining_balance=(str_); end
|
|
13
|
+
def applied_amount(); end
|
|
14
|
+
def applied_amount=(str_); end
|
|
15
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
|
|
11
|
+
class BillingPaymentAttemptProration
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :amount, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('amount'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :cycle_days_remaining, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('cycle_days_remaining'), required: true } }
|
|
19
|
+
|
|
20
|
+
field :cycle_days_total, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('cycle_days_total'), required: true } }
|
|
21
|
+
|
|
22
|
+
field :cycle_remaining_percent, ::Float, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('cycle_remaining_percent'), required: true } }
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def initialize(amount:, cycle_days_remaining:, cycle_days_total:, cycle_remaining_percent:)
|
|
26
|
+
@amount = amount
|
|
27
|
+
@cycle_days_remaining = cycle_days_remaining
|
|
28
|
+
@cycle_days_total = cycle_days_total
|
|
29
|
+
@cycle_remaining_percent = cycle_remaining_percent
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def ==(other)
|
|
34
|
+
return false unless other.is_a? self.class
|
|
35
|
+
return false unless @amount == other.amount
|
|
36
|
+
return false unless @cycle_days_remaining == other.cycle_days_remaining
|
|
37
|
+
return false unless @cycle_days_total == other.cycle_days_total
|
|
38
|
+
return false unless @cycle_remaining_percent == other.cycle_remaining_percent
|
|
39
|
+
true
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::BillingPaymentAttemptProration
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::BillingPaymentAttemptProration
|
|
11
|
+
def amount(); end
|
|
12
|
+
def amount=(str_); end
|
|
13
|
+
def cycle_days_remaining(); end
|
|
14
|
+
def cycle_days_remaining=(str_); end
|
|
15
|
+
def cycle_days_total(); end
|
|
16
|
+
def cycle_days_total=(str_); end
|
|
17
|
+
def cycle_remaining_percent(); end
|
|
18
|
+
def cycle_remaining_percent=(str_); end
|
|
19
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: false
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module Clerk
|
|
8
|
+
module Models
|
|
9
|
+
module Components
|
|
10
|
+
# Totals breakdown for this payment attempt.
|
|
11
|
+
class BillingPaymentAttemptTotals
|
|
12
|
+
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
field :subtotal, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('subtotal'), required: true } }
|
|
17
|
+
|
|
18
|
+
field :base_fee, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('base_fee'), required: true } }
|
|
19
|
+
|
|
20
|
+
field :tax_total, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('tax_total'), required: true } }
|
|
21
|
+
|
|
22
|
+
field :grand_total, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('grand_total'), required: true } }
|
|
23
|
+
|
|
24
|
+
field :per_unit_totals, Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::CommercePerUnitTotal)), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('per_unit_totals') } }
|
|
25
|
+
|
|
26
|
+
field :credits, Crystalline::Nilable.new(Models::Components::BillingPaymentAttemptCredits), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('credits') } }
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def initialize(subtotal:, base_fee:, tax_total:, grand_total:, per_unit_totals: nil, credits: nil)
|
|
30
|
+
@subtotal = subtotal
|
|
31
|
+
@base_fee = base_fee
|
|
32
|
+
@tax_total = tax_total
|
|
33
|
+
@grand_total = grand_total
|
|
34
|
+
@per_unit_totals = per_unit_totals
|
|
35
|
+
@credits = credits
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def ==(other)
|
|
40
|
+
return false unless other.is_a? self.class
|
|
41
|
+
return false unless @subtotal == other.subtotal
|
|
42
|
+
return false unless @base_fee == other.base_fee
|
|
43
|
+
return false unless @tax_total == other.tax_total
|
|
44
|
+
return false unless @grand_total == other.grand_total
|
|
45
|
+
return false unless @per_unit_totals == other.per_unit_totals
|
|
46
|
+
return false unless @credits == other.credits
|
|
47
|
+
true
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Clerk::Models::Components::BillingPaymentAttemptTotals
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Clerk::Models::Components::BillingPaymentAttemptTotals
|
|
11
|
+
def subtotal(); end
|
|
12
|
+
def subtotal=(str_); end
|
|
13
|
+
def base_fee(); end
|
|
14
|
+
def base_fee=(str_); end
|
|
15
|
+
def tax_total(); end
|
|
16
|
+
def tax_total=(str_); end
|
|
17
|
+
def grand_total(); end
|
|
18
|
+
def grand_total=(str_); end
|
|
19
|
+
def per_unit_totals(); end
|
|
20
|
+
def per_unit_totals=(str_); end
|
|
21
|
+
def credits(); end
|
|
22
|
+
def credits=(str_); end
|
|
23
|
+
end
|
|
@@ -13,7 +13,7 @@ module Clerk
|
|
|
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::BillingPriceResponseObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': Utils.enum_from_string(Models::Components::BillingPriceResponseObject, false) } }
|
|
16
|
+
field :object, Models::Components::BillingPriceResponseObject, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': ::Clerk::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.
|
|
@@ -32,13 +32,15 @@ module Clerk
|
|
|
32
32
|
field :fee, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('fee'), required: true } }
|
|
33
33
|
|
|
34
34
|
field :annual_monthly_fee, Models::Components::CommerceMoneyResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('annual_monthly_fee'), required: true } }
|
|
35
|
+
# Whether this price is the default price for its plan.
|
|
36
|
+
field :is_default, Crystalline::Boolean.new, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('is_default'), required: true } }
|
|
35
37
|
# Unix timestamp (milliseconds) of creation.
|
|
36
38
|
field :created_at, ::Integer, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('created_at'), required: true } }
|
|
37
39
|
# The description of the price.
|
|
38
40
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('description') } }
|
|
39
41
|
|
|
40
42
|
|
|
41
|
-
def initialize(object:, id:, plan_id:, instance_id:, currency:, currency_symbol:, amount:, annual_monthly_amount:, fee:, annual_monthly_fee:, created_at:, description: nil)
|
|
43
|
+
def initialize(object:, id:, plan_id:, instance_id:, currency:, currency_symbol:, amount:, annual_monthly_amount:, fee:, annual_monthly_fee:, is_default:, created_at:, description: nil)
|
|
42
44
|
@object = object
|
|
43
45
|
@id = id
|
|
44
46
|
@plan_id = plan_id
|
|
@@ -49,6 +51,7 @@ module Clerk
|
|
|
49
51
|
@annual_monthly_amount = annual_monthly_amount
|
|
50
52
|
@fee = fee
|
|
51
53
|
@annual_monthly_fee = annual_monthly_fee
|
|
54
|
+
@is_default = is_default
|
|
52
55
|
@created_at = created_at
|
|
53
56
|
@description = description
|
|
54
57
|
end
|
|
@@ -66,6 +69,7 @@ module Clerk
|
|
|
66
69
|
return false unless @annual_monthly_amount == other.annual_monthly_amount
|
|
67
70
|
return false unless @fee == other.fee
|
|
68
71
|
return false unless @annual_monthly_fee == other.annual_monthly_fee
|
|
72
|
+
return false unless @is_default == other.is_default
|
|
69
73
|
return false unless @created_at == other.created_at
|
|
70
74
|
return false unless @description == other.description
|
|
71
75
|
true
|