clerk-sdk-ruby 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/lib/clerk/actortokens.rb +1 -1
  3. data/lib/clerk/allowlistidentifiers.rb +1 -1
  4. data/lib/clerk/api_keys.rb +4 -4
  5. data/lib/clerk/betafeatures.rb +6 -6
  6. data/lib/clerk/billing.rb +3 -3
  7. data/lib/clerk/blocklistidentifiers.rb +1 -1
  8. data/lib/clerk/clients.rb +3 -3
  9. data/lib/clerk/domains.rb +2 -2
  10. data/lib/clerk/emailaddresses.rb +2 -2
  11. data/lib/clerk/emailandsmstemplates.rb +3 -3
  12. data/lib/clerk/emailsmstemplates.rb +9 -9
  13. data/lib/clerk/instancesettings.rb +7 -7
  14. data/lib/clerk/invitations.rb +3 -3
  15. data/lib/clerk/jwttemplates.rb +2 -2
  16. data/lib/clerk/m2m.rb +9 -9
  17. data/lib/clerk/machines.rb +4 -4
  18. data/lib/clerk/models/components/actortoken.rb +4 -4
  19. data/lib/clerk/models/components/allowlistidentifier.rb +6 -6
  20. data/lib/clerk/models/components/allowlistidentifier_object.rb +1 -1
  21. data/lib/clerk/models/components/billingpaymentattempt.rb +2 -2
  22. data/lib/clerk/models/components/billingpriceresponse.rb +1 -1
  23. data/lib/clerk/models/components/billingstatement.rb +2 -2
  24. data/lib/clerk/models/components/blocklistidentifier.rb +6 -6
  25. data/lib/clerk/models/components/blocklistidentifier_object.rb +1 -1
  26. data/lib/clerk/models/components/blocklistidentifiers.rb +1 -1
  27. data/lib/clerk/models/components/client.rb +7 -7
  28. data/lib/clerk/models/components/client_object.rb +1 -1
  29. data/lib/clerk/models/components/cnametarget.rb +1 -1
  30. data/lib/clerk/models/components/commercepayerresponse.rb +1 -1
  31. data/lib/clerk/models/components/commercepaymentmethodresponse.rb +3 -3
  32. data/lib/clerk/models/components/commerceplan.rb +3 -3
  33. data/lib/clerk/models/components/commercepricetransitiondetails.rb +2 -2
  34. data/lib/clerk/models/components/commercepricetransitionresponse.rb +1 -1
  35. data/lib/clerk/models/components/commercesubscription.rb +2 -2
  36. data/lib/clerk/models/components/commercesubscriptionitem.rb +4 -4
  37. data/lib/clerk/models/components/commercesubscriptionitem_plan.rb +3 -3
  38. data/lib/clerk/models/components/cookies.rb +1 -1
  39. data/lib/clerk/models/components/creator_role.rb +1 -1
  40. data/lib/clerk/models/components/default_role.rb +1 -1
  41. data/lib/clerk/models/components/domain.rb +2 -2
  42. data/lib/clerk/models/components/domains.rb +1 -1
  43. data/lib/clerk/models/components/emailaddress.rb +5 -5
  44. data/lib/clerk/models/components/emailaddress_admin.rb +3 -3
  45. data/lib/clerk/models/components/emailaddress_object.rb +1 -1
  46. data/lib/clerk/models/components/emailaddress_otp.rb +3 -3
  47. data/lib/clerk/models/components/emailaddress_saml.rb +3 -3
  48. data/lib/clerk/models/components/emailaddress_ticket.rb +3 -3
  49. data/lib/clerk/models/components/emaillink.rb +3 -3
  50. data/lib/clerk/models/components/enterpriseaccount.rb +5 -5
  51. data/lib/clerk/models/components/enterpriseaccount_oauth.rb +2 -2
  52. data/lib/clerk/models/components/enterpriseaccount_object.rb +1 -1
  53. data/lib/clerk/models/components/enterpriseaccount_saml.rb +3 -3
  54. data/lib/clerk/models/components/enterpriseaccount_ticket.rb +3 -3
  55. data/lib/clerk/models/components/enterpriseconnection_1.rb +3 -3
  56. data/lib/clerk/models/components/enterpriseconnection_2.rb +3 -3
  57. data/lib/clerk/models/components/extendfreetrialrequest.rb +1 -1
  58. data/lib/clerk/models/components/externalaccountwithverification.rb +7 -7
  59. data/lib/clerk/models/components/externalaccountwithverification_oauth.rb +2 -2
  60. data/lib/clerk/models/components/featureresponse.rb +1 -1
  61. data/lib/clerk/models/components/fromoauth.rb +2 -2
  62. data/lib/clerk/models/components/googleonetap.rb +3 -3
  63. data/lib/clerk/models/components/group.rb +1 -1
  64. data/lib/clerk/models/components/instance.rb +1 -1
  65. data/lib/clerk/models/components/instanceprotect.rb +1 -1
  66. data/lib/clerk/models/components/instancerestrictions.rb +1 -1
  67. data/lib/clerk/models/components/instancesettings.rb +1 -1
  68. data/lib/clerk/models/components/invitation.rb +5 -5
  69. data/lib/clerk/models/components/invitation_revoked.rb +5 -5
  70. data/lib/clerk/models/components/jwttemplate.rb +3 -3
  71. data/lib/clerk/models/components/machine.rb +1 -1
  72. data/lib/clerk/models/components/machine_created.rb +1 -1
  73. data/lib/clerk/models/components/machine_deleted.rb +1 -1
  74. data/lib/clerk/models/components/machine_secretkey.rb +1 -1
  75. data/lib/clerk/models/components/machinescope.rb +1 -1
  76. data/lib/clerk/models/components/machinescope_deleted.rb +1 -1
  77. data/lib/clerk/models/components/machinewithoutscopedmachines.rb +1 -1
  78. data/lib/clerk/models/components/oauthaccesstoken.rb +1 -1
  79. data/lib/clerk/models/components/oauthapplication.rb +6 -6
  80. data/lib/clerk/models/components/oauthapplications.rb +1 -1
  81. data/lib/clerk/models/components/oauthapplicationwithsecret.rb +7 -7
  82. data/lib/clerk/models/components/organization.rb +5 -5
  83. data/lib/clerk/models/components/organizationdomain.rb +3 -3
  84. data/lib/clerk/models/components/organizationdomain_object.rb +1 -1
  85. data/lib/clerk/models/components/organizationdomain_verification.rb +1 -1
  86. data/lib/clerk/models/components/organizationdomains.rb +1 -1
  87. data/lib/clerk/models/components/organizationinvitation.rb +2 -2
  88. data/lib/clerk/models/components/organizationinvitation_object.rb +1 -1
  89. data/lib/clerk/models/components/organizationinvitations.rb +1 -1
  90. data/lib/clerk/models/components/organizationinvitationswithpublicorganizationdata.rb +1 -1
  91. data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata.rb +2 -2
  92. data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata_object.rb +1 -1
  93. data/lib/clerk/models/components/organizationmembership.rb +2 -2
  94. data/lib/clerk/models/components/organizationmembership_object.rb +1 -1
  95. data/lib/clerk/models/components/organizationmembership_organization.rb +5 -5
  96. data/lib/clerk/models/components/organizationmembershippublicuserdata.rb +1 -1
  97. data/lib/clerk/models/components/organizationmemberships.rb +1 -1
  98. data/lib/clerk/models/components/organizations.rb +1 -1
  99. data/lib/clerk/models/components/organizationsettings.rb +3 -3
  100. data/lib/clerk/models/components/organizationwithlogo.rb +6 -6
  101. data/lib/clerk/models/components/passkey.rb +3 -3
  102. data/lib/clerk/models/components/passkey_object.rb +1 -1
  103. data/lib/clerk/models/components/payer.rb +1 -1
  104. data/lib/clerk/models/components/payment_source.rb +3 -3
  105. data/lib/clerk/models/components/permission.rb +3 -3
  106. data/lib/clerk/models/components/permissions.rb +1 -1
  107. data/lib/clerk/models/components/phonenumber.rb +4 -4
  108. data/lib/clerk/models/components/phonenumber_admin.rb +3 -3
  109. data/lib/clerk/models/components/phonenumber_object.rb +1 -1
  110. data/lib/clerk/models/components/phonenumber_otp.rb +3 -3
  111. data/lib/clerk/models/components/protocol.rb +1 -1
  112. data/lib/clerk/models/components/proxycheck.rb +4 -4
  113. data/lib/clerk/models/components/redirecturl.rb +3 -3
  114. data/lib/clerk/models/components/role.rb +3 -3
  115. data/lib/clerk/models/components/role_set_migration.rb +1 -1
  116. data/lib/clerk/models/components/roles.rb +1 -1
  117. data/lib/clerk/models/components/roleset.rb +2 -2
  118. data/lib/clerk/models/components/rolesetitem.rb +1 -1
  119. data/lib/clerk/models/components/samlaccount.rb +3 -3
  120. data/lib/clerk/models/components/samlaccount_object.rb +1 -1
  121. data/lib/clerk/models/components/samlaccount_saml.rb +3 -3
  122. data/lib/clerk/models/components/samlaccount_ticket.rb +3 -3
  123. data/lib/clerk/models/components/samlconnection_1.rb +3 -3
  124. data/lib/clerk/models/components/samlconnection_2.rb +3 -3
  125. data/lib/clerk/models/components/samlconnections.rb +1 -1
  126. data/lib/clerk/models/components/schemas_commerceplan.rb +1 -1
  127. data/lib/clerk/models/components/schemas_commercesubscriptionitem.rb +3 -3
  128. data/lib/clerk/models/components/schemas_commercesubscriptionitem_plan.rb +1 -1
  129. data/lib/clerk/models/components/schemas_featureresponse.rb +1 -1
  130. data/lib/clerk/models/components/schemas_samlconnection_samlconnection_1.rb +4 -4
  131. data/lib/clerk/models/components/schemas_samlconnection_samlconnection_2.rb +4 -4
  132. data/lib/clerk/models/components/session.rb +7 -7
  133. data/lib/clerk/models/components/session_object.rb +1 -1
  134. data/lib/clerk/models/components/signintoken.rb +4 -4
  135. data/lib/clerk/models/components/signup.rb +5 -5
  136. data/lib/clerk/models/components/signup_external_account.rb +1 -1
  137. data/lib/clerk/models/components/signupverification.rb +2 -2
  138. data/lib/clerk/models/components/template.rb +4 -4
  139. data/lib/clerk/models/components/template_object.rb +1 -1
  140. data/lib/clerk/models/components/testingtoken.rb +2 -2
  141. data/lib/clerk/models/components/token.rb +3 -3
  142. data/lib/clerk/models/components/token_object.rb +1 -1
  143. data/lib/clerk/models/components/totalcount.rb +2 -2
  144. data/lib/clerk/models/components/totalcount_object.rb +1 -1
  145. data/lib/clerk/models/components/user.rb +18 -18
  146. data/lib/clerk/models/components/user_object.rb +1 -1
  147. data/lib/clerk/models/components/verification_passkey_passkey.rb +4 -4
  148. data/lib/clerk/models/components/waitlistentry.rb +5 -5
  149. data/lib/clerk/models/components/waitlistentry_invitation.rb +5 -5
  150. data/lib/clerk/models/components/web3signature.rb +3 -3
  151. data/lib/clerk/models/components/web3wallet.rb +4 -4
  152. data/lib/clerk/models/components/web3wallet_admin.rb +3 -3
  153. data/lib/clerk/models/components/web3wallet_object.rb +1 -1
  154. data/lib/clerk/models/operations/actor.rb +1 -1
  155. data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rb +1 -1
  156. data/lib/clerk/models/operations/createapikey_responsebody.rb +1 -1
  157. data/lib/clerk/models/operations/createbulkinvitations_requestbody.rb +1 -1
  158. data/lib/clerk/models/operations/createinvitation_request.rb +1 -1
  159. data/lib/clerk/models/operations/createm2mtoken_responsebody.rb +1 -1
  160. data/lib/clerk/models/operations/createoauthapplication_request.rb +2 -2
  161. data/lib/clerk/models/operations/createroleset_request.rb +1 -1
  162. data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rb +3 -3
  163. data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rb +3 -3
  164. data/lib/clerk/models/operations/createsessiontoken_responsebody.rb +1 -1
  165. data/lib/clerk/models/operations/createsessiontokenfromtemplate_responsebody.rb +1 -1
  166. data/lib/clerk/models/operations/createuser_request.rb +5 -5
  167. data/lib/clerk/models/operations/data.rb +1 -1
  168. data/lib/clerk/models/operations/deleteapikey_responsebody.rb +1 -1
  169. data/lib/clerk/models/operations/getapikey_responsebody.rb +1 -1
  170. data/lib/clerk/models/operations/getpublicinterstitial_request.rb +2 -2
  171. data/lib/clerk/models/operations/getuserlist_request.rb +2 -2
  172. data/lib/clerk/models/operations/getuserscount_request.rb +2 -2
  173. data/lib/clerk/models/operations/listallorganizationdomains_request.rb +3 -3
  174. data/lib/clerk/models/operations/listwaitlistentries_request.rb +1 -1
  175. data/lib/clerk/models/operations/m2m_token.rb +1 -1
  176. data/lib/clerk/models/operations/refreshsession_requestbody.rb +1 -1
  177. data/lib/clerk/models/operations/revokeapikey_responsebody.rb +1 -1
  178. data/lib/clerk/models/operations/revokem2mtoken_responsebody.rb +1 -1
  179. data/lib/clerk/models/operations/updateapikey_responsebody.rb +1 -1
  180. data/lib/clerk/models/operations/updateinstance_request.rb +2 -2
  181. data/lib/clerk/models/operations/updateoauthapplication_requestbody.rb +2 -2
  182. data/lib/clerk/models/operations/updateroleset_requestbody.rb +1 -1
  183. data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +2 -2
  184. data/lib/clerk/models/operations/updateuser_requestbody.rb +2 -2
  185. data/lib/clerk/models/operations/updateusermetadata_requestbody.rb +1 -1
  186. data/lib/clerk/models/operations/verifyapikey_responsebody.rb +1 -1
  187. data/lib/clerk/models/operations/verifym2mtoken_responsebody.rb +1 -1
  188. data/lib/clerk/models/operations/verifyoauthaccesstoken_request.rb +2 -2
  189. data/lib/clerk/models/operations/verifytotp_responsebody.rb +1 -1
  190. data/lib/clerk/oauthaccesstokens.rb +1 -1
  191. data/lib/clerk/oauthapplications.rb +2 -2
  192. data/lib/clerk/organizationdomains.rb +4 -4
  193. data/lib/clerk/organizationinvitations.rb +11 -11
  194. data/lib/clerk/organizationmemberships.rb +4 -4
  195. data/lib/clerk/organizationpermissions.rb +2 -2
  196. data/lib/clerk/organizationroles.rb +2 -2
  197. data/lib/clerk/organizations.rb +5 -5
  198. data/lib/clerk/phonenumbers.rb +2 -2
  199. data/lib/clerk/proxy.rb +1 -1
  200. data/lib/clerk/proxychecks.rb +3 -3
  201. data/lib/clerk/redirecturls.rb +1 -1
  202. data/lib/clerk/rolesets.rb +5 -5
  203. data/lib/clerk/samlconnections.rb +2 -2
  204. data/lib/clerk/sdkconfiguration.rb +3 -3
  205. data/lib/clerk/sessions.rb +5 -5
  206. data/lib/clerk/signintokens.rb +1 -1
  207. data/lib/clerk/signups.rb +1 -1
  208. data/lib/clerk/templates.rb +3 -3
  209. data/lib/clerk/users.rb +17 -17
  210. data/lib/clerk/utils/request_bodies.rb +8 -3
  211. data/lib/clerk/utils/security.rb +10 -0
  212. data/lib/clerk/utils/url.rb +11 -5
  213. data/lib/clerk/utils/utils.rb +33 -3
  214. data/lib/clerk/waitlistentries.rb +5 -5
  215. data/lib/crystalline/metadata_fields.rb +66 -9
  216. data/lib/crystalline/module.rb +3 -3
  217. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee67774c9db43df4a94e37e6c5ad2035345cf4a61e5d1379ba9618563f61b12f
4
- data.tar.gz: d5a75a7892be366497d20c55bb987b91ccf042e127b7f6a47f8693b416f8c99d
3
+ metadata.gz: dbaf9668d7747b1102f9f3bc373c534f95893bca0b92bfa1701230827dcbf87b
4
+ data.tar.gz: 7b0c9607f3da4312f023e878fbe7621f1391859777741eb9e63bde3c7426e63f
5
5
  SHA512:
6
- metadata.gz: 820b1bf7477c195f434e9fd6df2194da275ec2a9c473a8fbd3975cc9d9724801066074c65003a0deb01bd9d721bbfc230242643824b5702b48ee3667f1649991
7
- data.tar.gz: 528110307386b15cb9a39aa196f201ff762a29daac9a6285cec61a250d9685bc2ae3a65f55db97ea23b260dfe89126e300ea34f459975c30aae8188142897cd9
6
+ metadata.gz: 555966028df1b229ef2a277c13bfd351a845d26dfe408717fad4e3dc4752b812f666a3ff0fbf8073dba09a79f18163e6019f2c992c7864fdec3489a1314e5ffd
7
+ data.tar.gz: 27f43a3bff65d884dc2dc3c8774ae187a27d10720dd006e6f7b7069f2d9f5449ad94dd7676c900d0c7c68768080e9db779a8343ef8f0bc574ddbb09f6222da07
@@ -51,7 +51,7 @@ module Clerk
51
51
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
52
52
  headers['content-type'] = req_content_type
53
53
 
54
- if form
54
+ if form && !form.empty?
55
55
  body = Utils.encode_form(form)
56
56
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
57
57
  body = URI.encode_www_form(data)
@@ -190,7 +190,7 @@ module Clerk
190
190
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
191
191
  headers['content-type'] = req_content_type
192
192
 
193
- if form
193
+ if form && !form.empty?
194
194
  body = Utils.encode_form(form)
195
195
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
196
196
  body = URI.encode_www_form(data)
@@ -50,7 +50,7 @@ module Clerk
50
50
  headers['content-type'] = req_content_type
51
51
  raise StandardError, 'request body is required' if data.nil? && form.nil?
52
52
 
53
- if form
53
+ if form && !form.empty?
54
54
  body = Utils.encode_form(form)
55
55
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
56
56
  body = URI.encode_www_form(data)
@@ -522,7 +522,7 @@ module Clerk
522
522
  headers['content-type'] = req_content_type
523
523
  raise StandardError, 'request body is required' if data.nil? && form.nil?
524
524
 
525
- if form
525
+ if form && !form.empty?
526
526
  body = Utils.encode_form(form)
527
527
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
528
528
  body = URI.encode_www_form(data)
@@ -1000,7 +1000,7 @@ module Clerk
1000
1000
  headers['content-type'] = req_content_type
1001
1001
  raise StandardError, 'request body is required' if data.nil? && form.nil?
1002
1002
 
1003
- if form
1003
+ if form && !form.empty?
1004
1004
  body = Utils.encode_form(form)
1005
1005
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1006
1006
  body = URI.encode_www_form(data)
@@ -1159,7 +1159,7 @@ module Clerk
1159
1159
  headers['content-type'] = req_content_type
1160
1160
  raise StandardError, 'request body is required' if data.nil? && form.nil?
1161
1161
 
1162
- if form
1162
+ if form && !form.empty?
1163
1163
  body = Utils.encode_form(form)
1164
1164
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1165
1165
  body = URI.encode_www_form(data)
@@ -50,7 +50,7 @@ module Clerk
50
50
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
51
51
  headers['content-type'] = req_content_type
52
52
 
53
- if form
53
+ if form && !form.empty?
54
54
  body = Utils.encode_form(form)
55
55
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
56
56
  body = URI.encode_www_form(data)
@@ -186,12 +186,12 @@ module Clerk
186
186
  def update_production_instance_domain(request: nil, retries: nil, timeout_ms: nil)
187
187
  # update_production_instance_domain - Update production instance domain
188
188
  # Change the domain of a production instance.
189
- #
189
+ #
190
190
  # Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code.
191
- #
191
+ #
192
192
  # WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.
193
- #
194
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
193
+ #
194
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
195
195
  url, params = @sdk_configuration.get_server_details
196
196
  base_url = Utils.template_url(url, params)
197
197
  url = "#{base_url}/beta_features/domain"
@@ -200,7 +200,7 @@ module Clerk
200
200
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
201
201
  headers['content-type'] = req_content_type
202
202
 
203
- if form
203
+ if form && !form.empty?
204
204
  body = Utils.encode_form(form)
205
205
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
206
206
  body = URI.encode_www_form(data)
data/lib/clerk/billing.rb CHANGED
@@ -366,7 +366,7 @@ module Clerk
366
366
  headers['content-type'] = req_content_type
367
367
  raise StandardError, 'request body is required' if data.nil? && form.nil?
368
368
 
369
- if form
369
+ if form && !form.empty?
370
370
  body = Utils.encode_form(form)
371
371
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
372
372
  body = URI.encode_www_form(data)
@@ -848,7 +848,7 @@ module Clerk
848
848
  headers['content-type'] = req_content_type
849
849
  raise StandardError, 'request body is required' if data.nil? && form.nil?
850
850
 
851
- if form
851
+ if form && !form.empty?
852
852
  body = Utils.encode_form(form)
853
853
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
854
854
  body = URI.encode_www_form(data)
@@ -1018,7 +1018,7 @@ module Clerk
1018
1018
  headers['content-type'] = req_content_type
1019
1019
  raise StandardError, 'request body is required' if data.nil? && form.nil?
1020
1020
 
1021
- if form
1021
+ if form && !form.empty?
1022
1022
  body = Utils.encode_form(form)
1023
1023
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1024
1024
  body = URI.encode_www_form(data)
@@ -183,7 +183,7 @@ module Clerk
183
183
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
184
184
  headers['content-type'] = req_content_type
185
185
 
186
- if form
186
+ if form && !form.empty?
187
187
  body = Utils.encode_form(form)
188
188
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
189
189
  body = URI.encode_www_form(data)
data/lib/clerk/clients.rb CHANGED
@@ -44,8 +44,8 @@ module Clerk
44
44
  # Returns a list of all clients. The clients are returned sorted by creation date,
45
45
  # with the newest clients appearing first.
46
46
  # Warning: the endpoint is being deprecated and will be removed in future versions.
47
- #
48
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
47
+ #
48
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
49
49
  request = Models::Operations::GetClientListRequest.new(
50
50
  paginated: paginated,
51
51
  limit: limit,
@@ -194,7 +194,7 @@ module Clerk
194
194
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
195
195
  headers['content-type'] = req_content_type
196
196
 
197
- if form
197
+ if form && !form.empty?
198
198
  body = Utils.encode_form(form)
199
199
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
200
200
  body = URI.encode_www_form(data)
data/lib/clerk/domains.rb CHANGED
@@ -173,7 +173,7 @@ module Clerk
173
173
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
174
174
  headers['content-type'] = req_content_type
175
175
 
176
- if form
176
+ if form && !form.empty?
177
177
  body = Utils.encode_form(form)
178
178
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
179
179
  body = URI.encode_www_form(data)
@@ -476,7 +476,7 @@ module Clerk
476
476
  headers['content-type'] = req_content_type
477
477
  raise StandardError, 'request body is required' if data.nil? && form.nil?
478
478
 
479
- if form
479
+ if form && !form.empty?
480
480
  body = Utils.encode_form(form)
481
481
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
482
482
  body = URI.encode_www_form(data)
@@ -50,7 +50,7 @@ module Clerk
50
50
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
51
51
  headers['content-type'] = req_content_type
52
52
 
53
- if form
53
+ if form && !form.empty?
54
54
  body = Utils.encode_form(form)
55
55
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
56
56
  body = URI.encode_www_form(data)
@@ -485,7 +485,7 @@ module Clerk
485
485
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
486
486
  headers['content-type'] = req_content_type
487
487
 
488
- if form
488
+ if form && !form.empty?
489
489
  body = Utils.encode_form(form)
490
490
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
491
491
  body = URI.encode_www_form(data)
@@ -42,8 +42,8 @@ module Clerk
42
42
  def upsert(template_type:, slug:, body: nil, retries: nil, timeout_ms: nil)
43
43
  # upsert - Update a template for a given type and slug
44
44
  # Updates the existing template of the given type and slug
45
- #
46
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
45
+ #
46
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
47
47
  request = Models::Operations::UpsertTemplateRequest.new(
48
48
  template_type: template_type,
49
49
  slug: slug,
@@ -62,7 +62,7 @@ module Clerk
62
62
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
63
63
  headers['content-type'] = req_content_type
64
64
 
65
- if form
65
+ if form && !form.empty?
66
66
  body = Utils.encode_form(form)
67
67
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
68
68
  body = URI.encode_www_form(data)
@@ -43,8 +43,8 @@ module Clerk
43
43
  # list - List all templates
44
44
  # Returns a list of all templates.
45
45
  # The templates are returned sorted by position.
46
- #
47
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
46
+ #
47
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
48
48
  request = Models::Operations::GetTemplateListRequest.new(
49
49
  template_type: template_type,
50
50
  paginated: paginated,
@@ -191,8 +191,8 @@ module Clerk
191
191
  def get(template_type:, slug:, retries: nil, timeout_ms: nil)
192
192
  # get - Retrieve a template
193
193
  # Returns the details of a template
194
- #
195
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
194
+ #
195
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
196
196
  request = Models::Operations::GetTemplateRequest.new(
197
197
  template_type: template_type,
198
198
  slug: slug
@@ -335,8 +335,8 @@ module Clerk
335
335
  def revert(template_type:, slug:, retries: nil, timeout_ms: nil)
336
336
  # revert - Revert a template
337
337
  # Reverts an updated template to its default state
338
- #
339
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
338
+ #
339
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
340
340
  request = Models::Operations::RevertTemplateRequest.new(
341
341
  template_type: template_type,
342
342
  slug: slug
@@ -481,8 +481,8 @@ module Clerk
481
481
  # Toggles the delivery by Clerk for a template of a given type and slug.
482
482
  # If disabled, Clerk will not deliver the resulting email or SMS.
483
483
  # The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves.
484
- #
485
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
484
+ #
485
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
486
486
  request = Models::Operations::ToggleTemplateDeliveryRequest.new(
487
487
  template_type: template_type,
488
488
  slug: slug,
@@ -501,7 +501,7 @@ module Clerk
501
501
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
502
502
  headers['content-type'] = req_content_type
503
503
 
504
- if form
504
+ if form && !form.empty?
505
505
  body = Utils.encode_form(form)
506
506
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
507
507
  body = URI.encode_www_form(data)
@@ -168,7 +168,7 @@ module Clerk
168
168
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
169
169
  headers['content-type'] = req_content_type
170
170
 
171
- if form
171
+ if form && !form.empty?
172
172
  body = Utils.encode_form(form)
173
173
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
174
174
  body = URI.encode_www_form(data)
@@ -303,7 +303,7 @@ module Clerk
303
303
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
304
304
  headers['content-type'] = req_content_type
305
305
 
306
- if form
306
+ if form && !form.empty?
307
307
  body = Utils.encode_form(form)
308
308
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
309
309
  body = URI.encode_www_form(data)
@@ -439,9 +439,9 @@ module Clerk
439
439
  def change_domain(request: nil, retries: nil, timeout_ms: nil)
440
440
  # change_domain - Update production instance domain
441
441
  # Change the domain of a production instance.
442
- #
442
+ #
443
443
  # Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code.
444
- #
444
+ #
445
445
  # WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.
446
446
  url, params = @sdk_configuration.get_server_details
447
447
  base_url = Utils.template_url(url, params)
@@ -451,7 +451,7 @@ module Clerk
451
451
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
452
452
  headers['content-type'] = req_content_type
453
453
 
454
- if form
454
+ if form && !form.empty?
455
455
  body = Utils.encode_form(form)
456
456
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
457
457
  body = URI.encode_www_form(data)
@@ -586,7 +586,7 @@ module Clerk
586
586
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
587
587
  headers['content-type'] = req_content_type
588
588
 
589
- if form
589
+ if form && !form.empty?
590
590
  body = Utils.encode_form(form)
591
591
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
592
592
  body = URI.encode_www_form(data)
@@ -846,7 +846,7 @@ module Clerk
846
846
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
847
847
  headers['content-type'] = req_content_type
848
848
 
849
- if form
849
+ if form && !form.empty?
850
850
  body = Utils.encode_form(form)
851
851
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
852
852
  body = URI.encode_www_form(data)
@@ -52,7 +52,7 @@ module Clerk
52
52
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
53
53
  headers['content-type'] = req_content_type
54
54
 
55
- if form
55
+ if form && !form.empty?
56
56
  body = Utils.encode_form(form)
57
57
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
58
58
  body = URI.encode_www_form(data)
@@ -311,7 +311,7 @@ module Clerk
311
311
  # invitations as emails by setting the `notify` parameter to `true`. There cannot be an existing invitation for any
312
312
  # of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please
313
313
  # note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed.
314
- #
314
+ #
315
315
  # This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests.
316
316
  url, params = @sdk_configuration.get_server_details
317
317
  base_url = Utils.template_url(url, params)
@@ -321,7 +321,7 @@ module Clerk
321
321
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
322
322
  headers['content-type'] = req_content_type
323
323
 
324
- if form
324
+ if form && !form.empty?
325
325
  body = Utils.encode_form(form)
326
326
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
327
327
  body = URI.encode_www_form(data)
@@ -174,7 +174,7 @@ module Clerk
174
174
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
175
175
  headers['content-type'] = req_content_type
176
176
 
177
- if form
177
+ if form && !form.empty?
178
178
  body = Utils.encode_form(form)
179
179
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
180
180
  body = URI.encode_www_form(data)
@@ -468,7 +468,7 @@ module Clerk
468
468
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
469
469
  headers['content-type'] = req_content_type
470
470
 
471
- if form
471
+ if form && !form.empty?
472
472
  body = Utils.encode_form(form)
473
473
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
474
474
  body = URI.encode_www_form(data)
data/lib/clerk/m2m.rb CHANGED
@@ -51,7 +51,7 @@ module Clerk
51
51
  headers['content-type'] = req_content_type
52
52
  raise StandardError, 'request body is required' if data.nil? && form.nil?
53
53
 
54
- if form
54
+ if form && !form.empty?
55
55
  body = Utils.encode_form(form)
56
56
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
57
57
  body = URI.encode_www_form(data)
@@ -202,9 +202,9 @@ module Clerk
202
202
  def list_tokens(request:, retries: nil, timeout_ms: nil)
203
203
  # list_tokens - Get M2M Tokens
204
204
  # Fetches M2M tokens for a specific machine.
205
- #
205
+ #
206
206
  # This endpoint can be authenticated by either a Machine Secret Key or by a Clerk Secret Key.
207
- #
207
+ #
208
208
  # - When fetching M2M tokens with a Machine Secret Key, only tokens associated with the authenticated machine can be retrieved.
209
209
  # - When fetching M2M tokens with a Clerk Secret Key, tokens for any machine in the instance can be retrieved.
210
210
  url, params = @sdk_configuration.get_server_details
@@ -372,9 +372,9 @@ module Clerk
372
372
  def revoke_token(body:, m2m_token_id:, retries: nil, timeout_ms: nil)
373
373
  # revoke_token - Revoke a M2M Token
374
374
  # Revokes a M2M Token.
375
- #
375
+ #
376
376
  # This endpoint can be authenticated by either a Machine Secret Key or by a Clerk Secret Key.
377
- #
377
+ #
378
378
  # - When revoking a M2M Token with a Machine Secret Key, the token must managed by the Machine associated with the Machine Secret Key.
379
379
  # - When revoking a M2M Token with a Clerk Secret Key, any token on the Instance can be revoked.
380
380
  request = Models::Operations::RevokeM2MTokenRequest.new(
@@ -395,7 +395,7 @@ module Clerk
395
395
  headers['content-type'] = req_content_type
396
396
  raise StandardError, 'request body is required' if data.nil? && form.nil?
397
397
 
398
- if form
398
+ if form && !form.empty?
399
399
  body = Utils.encode_form(form)
400
400
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
401
401
  body = URI.encode_www_form(data)
@@ -546,9 +546,9 @@ module Clerk
546
546
  def verify_token(request:, retries: nil, timeout_ms: nil)
547
547
  # verify_token - Verify a M2M Token
548
548
  # Verifies a M2M Token.
549
- #
549
+ #
550
550
  # This endpoint can be authenticated by either a Machine Secret Key or by a Clerk Secret Key.
551
- #
551
+ #
552
552
  # - When verifying a M2M Token with a Machine Secret Key, the token must be granted access to the Machine associated with the Machine Secret Key.
553
553
  # - When verifying a M2M Token with a Clerk Secret Key, any token on the Instance can be verified.
554
554
  url, params = @sdk_configuration.get_server_details
@@ -560,7 +560,7 @@ module Clerk
560
560
  headers['content-type'] = req_content_type
561
561
  raise StandardError, 'request body is required' if data.nil? && form.nil?
562
562
 
563
- if form
563
+ if form && !form.empty?
564
564
  body = Utils.encode_form(form)
565
565
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
566
566
  body = URI.encode_www_form(data)
@@ -193,7 +193,7 @@ module Clerk
193
193
  req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
194
194
  headers['content-type'] = req_content_type
195
195
 
196
- if form
196
+ if form && !form.empty?
197
197
  body = Utils.encode_form(form)
198
198
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
199
199
  body = URI.encode_www_form(data)
@@ -488,7 +488,7 @@ module Clerk
488
488
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
489
489
  headers['content-type'] = req_content_type
490
490
 
491
- if form
491
+ if form && !form.empty?
492
492
  body = Utils.encode_form(form)
493
493
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
494
494
  body = URI.encode_www_form(data)
@@ -926,7 +926,7 @@ module Clerk
926
926
  headers['content-type'] = req_content_type
927
927
  raise StandardError, 'request body is required' if data.nil? && form.nil?
928
928
 
929
- if form
929
+ if form && !form.empty?
930
930
  body = Utils.encode_form(form)
931
931
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
932
932
  body = URI.encode_www_form(data)
@@ -1080,7 +1080,7 @@ module Clerk
1080
1080
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
1081
1081
  headers['content-type'] = req_content_type
1082
1082
 
1083
- if form
1083
+ if form && !form.empty?
1084
1084
  body = Utils.encode_form(form)
1085
1085
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1086
1086
  body = URI.encode_www_form(data)
@@ -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') } }
@@ -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
 
@@ -8,7 +8,7 @@ module Clerk
8
8
  module Models
9
9
  module Components
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
13
  include ::Crystalline::Enum
14
14
  enums do
@@ -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.
@@ -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.
@@ -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::ObjectCommerceStatement, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': Utils.enum_from_string(Models::Components::ObjectCommerceStatement, false) } }
16
+ field :object, Models::Components::ObjectCommerceStatement, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::ObjectCommerceStatement, false) } }
17
17
  # Unique identifier for the billing statement.
18
18
  field :id, ::String, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('id'), required: true } }
19
19
  # The ID of the instance this statement belongs to.
@@ -23,7 +23,7 @@ module Clerk
23
23
 
24
24
  field :payer, Models::Components::CommercePayerResponse, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('payer'), required: true } }
25
25
  # The current status of the statement.
26
- field :status, Models::Components::BillingStatementStatus, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('status'), required: true, 'decoder': Utils.enum_from_string(Models::Components::BillingStatementStatus, false) } }
26
+ field :status, Models::Components::BillingStatementStatus, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('status'), required: true, 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::BillingStatementStatus, false) } }
27
27
  # Totals for the statement.
28
28
  field :totals, Models::Components::Totals, { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('totals'), required: true } }
29
29
  # Array of statement groups.
@@ -13,22 +13,22 @@ 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::BlocklistIdentifierObject), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), 'decoder': Utils.enum_from_string(Models::Components::BlocklistIdentifierObject, true) } }
16
+ #
17
+ field :object, Crystalline::Nilable.new(Models::Components::BlocklistIdentifierObject), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('object'), 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::BlocklistIdentifierObject, true) } }
18
18
 
19
19
  field :id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('id') } }
20
20
  # An email address, email domain, phone number or web3 wallet.
21
- #
21
+ #
22
22
  field :identifier, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('identifier') } }
23
23
 
24
- field :identifier_type, Crystalline::Nilable.new(Models::Components::BlocklistIdentifierIdentifierType), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('identifier_type'), 'decoder': Utils.enum_from_string(Models::Components::BlocklistIdentifierIdentifierType, true) } }
24
+ field :identifier_type, Crystalline::Nilable.new(Models::Components::BlocklistIdentifierIdentifierType), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('identifier_type'), 'decoder': ::Clerk::Utils.enum_from_string(Models::Components::BlocklistIdentifierIdentifierType, true) } }
25
25
 
26
26
  field :instance_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('instance_id') } }
27
27
  # Unix timestamp of creation
28
- #
28
+ #
29
29
  field :created_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('created_at') } }
30
30
  # Unix timestamp of last update.
31
- #
31
+ #
32
32
  field :updated_at, Crystalline::Nilable.new(::Integer), { 'format_json': { 'letter_case': ::Clerk::Utils.field_name('updated_at') } }
33
33
 
34
34
 
@@ -8,7 +8,7 @@ module Clerk
8
8
  module Models
9
9
  module Components
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
13
  include ::Crystalline::Enum
14
14
  enums do