stigg 0.1.0.pre.alpha.1

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 (230) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +45 -0
  4. data/README.md +233 -0
  5. data/SECURITY.md +23 -0
  6. data/lib/stigg/client.rb +72 -0
  7. data/lib/stigg/errors.rb +228 -0
  8. data/lib/stigg/file_part.rb +58 -0
  9. data/lib/stigg/internal/my_cursor_id_page.rb +82 -0
  10. data/lib/stigg/internal/transport/base_client.rb +570 -0
  11. data/lib/stigg/internal/transport/pooled_net_requester.rb +210 -0
  12. data/lib/stigg/internal/type/array_of.rb +168 -0
  13. data/lib/stigg/internal/type/base_model.rb +529 -0
  14. data/lib/stigg/internal/type/base_page.rb +55 -0
  15. data/lib/stigg/internal/type/boolean.rb +77 -0
  16. data/lib/stigg/internal/type/converter.rb +327 -0
  17. data/lib/stigg/internal/type/enum.rb +131 -0
  18. data/lib/stigg/internal/type/file_input.rb +110 -0
  19. data/lib/stigg/internal/type/hash_of.rb +188 -0
  20. data/lib/stigg/internal/type/request_parameters.rb +42 -0
  21. data/lib/stigg/internal/type/union.rb +237 -0
  22. data/lib/stigg/internal/type/unknown.rb +81 -0
  23. data/lib/stigg/internal/util.rb +920 -0
  24. data/lib/stigg/internal.rb +20 -0
  25. data/lib/stigg/models/v1/coupon_create_params.rb +221 -0
  26. data/lib/stigg/models/v1/coupon_create_response.rb +317 -0
  27. data/lib/stigg/models/v1/coupon_list_params.rb +40 -0
  28. data/lib/stigg/models/v1/coupon_list_response.rb +324 -0
  29. data/lib/stigg/models/v1/coupon_retrieve_params.rb +16 -0
  30. data/lib/stigg/models/v1/coupon_retrieve_response.rb +317 -0
  31. data/lib/stigg/models/v1/customer_archive_params.rb +16 -0
  32. data/lib/stigg/models/v1/customer_create_params.rb +185 -0
  33. data/lib/stigg/models/v1/customer_list_params.rb +40 -0
  34. data/lib/stigg/models/v1/customer_list_response.rb +223 -0
  35. data/lib/stigg/models/v1/customer_response.rb +216 -0
  36. data/lib/stigg/models/v1/customer_retrieve_params.rb +16 -0
  37. data/lib/stigg/models/v1/customer_unarchive_params.rb +16 -0
  38. data/lib/stigg/models/v1/customer_update_params.rb +107 -0
  39. data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +197 -0
  40. data/lib/stigg/models/v1/customers/payment_method_detach_params.rb +18 -0
  41. data/lib/stigg/models/v1/customers/promotional_create_params.rb +294 -0
  42. data/lib/stigg/models/v1/customers/promotional_create_response.rb +268 -0
  43. data/lib/stigg/models/v1/customers/promotional_revoke_params.rb +24 -0
  44. data/lib/stigg/models/v1/customers/promotional_revoke_response.rb +268 -0
  45. data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +56 -0
  46. data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +145 -0
  47. data/lib/stigg/models/v1/subscription_create_params.rb +214 -0
  48. data/lib/stigg/models/v1/subscription_create_response.rb +338 -0
  49. data/lib/stigg/models/v1/subscription_delegate_params.rb +24 -0
  50. data/lib/stigg/models/v1/subscription_delegate_response.rb +274 -0
  51. data/lib/stigg/models/v1/subscription_list_params.rb +60 -0
  52. data/lib/stigg/models/v1/subscription_list_response.rb +281 -0
  53. data/lib/stigg/models/v1/subscription_migrate_params.rb +37 -0
  54. data/lib/stigg/models/v1/subscription_migrate_response.rb +274 -0
  55. data/lib/stigg/models/v1/subscription_preview_params.rb +644 -0
  56. data/lib/stigg/models/v1/subscription_preview_response.rb +431 -0
  57. data/lib/stigg/models/v1/subscription_retrieve_params.rb +16 -0
  58. data/lib/stigg/models/v1/subscription_retrieve_response.rb +274 -0
  59. data/lib/stigg/models/v1/subscription_transfer_params.rb +28 -0
  60. data/lib/stigg/models/v1/subscription_transfer_response.rb +274 -0
  61. data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_params.rb +18 -0
  62. data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rb +32 -0
  63. data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_params.rb +18 -0
  64. data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +32 -0
  65. data/lib/stigg/models/v1_create_event_params.rb +87 -0
  66. data/lib/stigg/models/v1_create_event_response.rb +16 -0
  67. data/lib/stigg/models/v1_create_usage_params.rb +96 -0
  68. data/lib/stigg/models/v1_create_usage_response.rb +112 -0
  69. data/lib/stigg/models.rb +47 -0
  70. data/lib/stigg/request_options.rb +77 -0
  71. data/lib/stigg/resources/v1/coupons.rb +95 -0
  72. data/lib/stigg/resources/v1/customers/payment_method.rb +67 -0
  73. data/lib/stigg/resources/v1/customers/promotional.rb +69 -0
  74. data/lib/stigg/resources/v1/customers/usage.rb +59 -0
  75. data/lib/stigg/resources/v1/customers.rb +177 -0
  76. data/lib/stigg/resources/v1/subscriptions/future_update.rb +56 -0
  77. data/lib/stigg/resources/v1/subscriptions.rb +241 -0
  78. data/lib/stigg/resources/v1.rb +70 -0
  79. data/lib/stigg/version.rb +5 -0
  80. data/lib/stigg.rb +108 -0
  81. data/manifest.yaml +17 -0
  82. data/rbi/stigg/client.rbi +49 -0
  83. data/rbi/stigg/errors.rbi +205 -0
  84. data/rbi/stigg/file_part.rbi +37 -0
  85. data/rbi/stigg/internal/my_cursor_id_page.rbi +19 -0
  86. data/rbi/stigg/internal/transport/base_client.rbi +297 -0
  87. data/rbi/stigg/internal/transport/pooled_net_requester.rbi +82 -0
  88. data/rbi/stigg/internal/type/array_of.rbi +104 -0
  89. data/rbi/stigg/internal/type/base_model.rbi +299 -0
  90. data/rbi/stigg/internal/type/base_page.rbi +42 -0
  91. data/rbi/stigg/internal/type/boolean.rbi +58 -0
  92. data/rbi/stigg/internal/type/converter.rbi +204 -0
  93. data/rbi/stigg/internal/type/enum.rbi +82 -0
  94. data/rbi/stigg/internal/type/file_input.rbi +58 -0
  95. data/rbi/stigg/internal/type/hash_of.rbi +104 -0
  96. data/rbi/stigg/internal/type/request_parameters.rbi +29 -0
  97. data/rbi/stigg/internal/type/union.rbi +126 -0
  98. data/rbi/stigg/internal/type/unknown.rbi +58 -0
  99. data/rbi/stigg/internal/util.rbi +478 -0
  100. data/rbi/stigg/internal.rbi +16 -0
  101. data/rbi/stigg/models/v1/coupon_create_params.rbi +758 -0
  102. data/rbi/stigg/models/v1/coupon_create_response.rbi +986 -0
  103. data/rbi/stigg/models/v1/coupon_list_params.rbi +70 -0
  104. data/rbi/stigg/models/v1/coupon_list_response.rbi +983 -0
  105. data/rbi/stigg/models/v1/coupon_retrieve_params.rbi +29 -0
  106. data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +986 -0
  107. data/rbi/stigg/models/v1/customer_archive_params.rbi +29 -0
  108. data/rbi/stigg/models/v1/customer_create_params.rbi +376 -0
  109. data/rbi/stigg/models/v1/customer_list_params.rbi +70 -0
  110. data/rbi/stigg/models/v1/customer_list_response.rbi +447 -0
  111. data/rbi/stigg/models/v1/customer_response.rbi +423 -0
  112. data/rbi/stigg/models/v1/customer_retrieve_params.rbi +29 -0
  113. data/rbi/stigg/models/v1/customer_unarchive_params.rbi +29 -0
  114. data/rbi/stigg/models/v1/customer_update_params.rbi +226 -0
  115. data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +769 -0
  116. data/rbi/stigg/models/v1/customers/payment_method_detach_params.rbi +34 -0
  117. data/rbi/stigg/models/v1/customers/promotional_create_params.rbi +639 -0
  118. data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +495 -0
  119. data/rbi/stigg/models/v1/customers/promotional_revoke_params.rbi +42 -0
  120. data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +497 -0
  121. data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +84 -0
  122. data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +353 -0
  123. data/rbi/stigg/models/v1/subscription_create_params.rbi +394 -0
  124. data/rbi/stigg/models/v1/subscription_create_response.rbi +668 -0
  125. data/rbi/stigg/models/v1/subscription_delegate_params.rbi +48 -0
  126. data/rbi/stigg/models/v1/subscription_delegate_response.rbi +535 -0
  127. data/rbi/stigg/models/v1/subscription_list_params.rbi +94 -0
  128. data/rbi/stigg/models/v1/subscription_list_response.rbi +543 -0
  129. data/rbi/stigg/models/v1/subscription_migrate_params.rbi +99 -0
  130. data/rbi/stigg/models/v1/subscription_migrate_response.rbi +535 -0
  131. data/rbi/stigg/models/v1/subscription_preview_params.rbi +1786 -0
  132. data/rbi/stigg/models/v1/subscription_preview_response.rbi +929 -0
  133. data/rbi/stigg/models/v1/subscription_retrieve_params.rbi +32 -0
  134. data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +535 -0
  135. data/rbi/stigg/models/v1/subscription_transfer_params.rbi +50 -0
  136. data/rbi/stigg/models/v1/subscription_transfer_response.rbi +535 -0
  137. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_params.rbi +34 -0
  138. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +79 -0
  139. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_params.rbi +34 -0
  140. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbi +79 -0
  141. data/rbi/stigg/models/v1_create_event_params.rbi +160 -0
  142. data/rbi/stigg/models/v1_create_event_response.rbi +23 -0
  143. data/rbi/stigg/models/v1_create_usage_params.rbi +177 -0
  144. data/rbi/stigg/models/v1_create_usage_response.rbi +150 -0
  145. data/rbi/stigg/models.rbi +9 -0
  146. data/rbi/stigg/request_options.rbi +55 -0
  147. data/rbi/stigg/resources/v1/coupons.rbi +79 -0
  148. data/rbi/stigg/resources/v1/customers/payment_method.rbi +54 -0
  149. data/rbi/stigg/resources/v1/customers/promotional.rbi +53 -0
  150. data/rbi/stigg/resources/v1/customers/usage.rbi +45 -0
  151. data/rbi/stigg/resources/v1/customers.rbi +138 -0
  152. data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +40 -0
  153. data/rbi/stigg/resources/v1/subscriptions.rbi +199 -0
  154. data/rbi/stigg/resources/v1.rbi +49 -0
  155. data/rbi/stigg/version.rbi +5 -0
  156. data/sig/stigg/client.rbs +26 -0
  157. data/sig/stigg/errors.rbs +117 -0
  158. data/sig/stigg/file_part.rbs +21 -0
  159. data/sig/stigg/internal/my_cursor_id_page.rbs +11 -0
  160. data/sig/stigg/internal/transport/base_client.rbs +133 -0
  161. data/sig/stigg/internal/transport/pooled_net_requester.rbs +48 -0
  162. data/sig/stigg/internal/type/array_of.rbs +48 -0
  163. data/sig/stigg/internal/type/base_model.rbs +102 -0
  164. data/sig/stigg/internal/type/base_page.rbs +24 -0
  165. data/sig/stigg/internal/type/boolean.rbs +26 -0
  166. data/sig/stigg/internal/type/converter.rbs +79 -0
  167. data/sig/stigg/internal/type/enum.rbs +32 -0
  168. data/sig/stigg/internal/type/file_input.rbs +25 -0
  169. data/sig/stigg/internal/type/hash_of.rbs +48 -0
  170. data/sig/stigg/internal/type/request_parameters.rbs +17 -0
  171. data/sig/stigg/internal/type/union.rbs +52 -0
  172. data/sig/stigg/internal/type/unknown.rbs +26 -0
  173. data/sig/stigg/internal/util.rbs +185 -0
  174. data/sig/stigg/internal.rbs +9 -0
  175. data/sig/stigg/models/v1/coupon_create_params.rbs +323 -0
  176. data/sig/stigg/models/v1/coupon_create_response.rbs +392 -0
  177. data/sig/stigg/models/v1/coupon_list_params.rbs +40 -0
  178. data/sig/stigg/models/v1/coupon_list_response.rbs +399 -0
  179. data/sig/stigg/models/v1/coupon_retrieve_params.rbs +17 -0
  180. data/sig/stigg/models/v1/coupon_retrieve_response.rbs +394 -0
  181. data/sig/stigg/models/v1/customer_archive_params.rbs +17 -0
  182. data/sig/stigg/models/v1/customer_create_params.rbs +169 -0
  183. data/sig/stigg/models/v1/customer_list_params.rbs +40 -0
  184. data/sig/stigg/models/v1/customer_list_response.rbs +198 -0
  185. data/sig/stigg/models/v1/customer_response.rbs +188 -0
  186. data/sig/stigg/models/v1/customer_retrieve_params.rbs +17 -0
  187. data/sig/stigg/models/v1/customer_unarchive_params.rbs +17 -0
  188. data/sig/stigg/models/v1/customer_update_params.rbs +110 -0
  189. data/sig/stigg/models/v1/customers/payment_method_attach_params.rbs +315 -0
  190. data/sig/stigg/models/v1/customers/payment_method_detach_params.rbs +19 -0
  191. data/sig/stigg/models/v1/customers/promotional_create_params.rbs +234 -0
  192. data/sig/stigg/models/v1/customers/promotional_create_response.rbs +209 -0
  193. data/sig/stigg/models/v1/customers/promotional_revoke_params.rbs +27 -0
  194. data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +209 -0
  195. data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +54 -0
  196. data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +134 -0
  197. data/sig/stigg/models/v1/subscription_create_params.rbs +199 -0
  198. data/sig/stigg/models/v1/subscription_create_response.rbs +283 -0
  199. data/sig/stigg/models/v1/subscription_delegate_params.rbs +26 -0
  200. data/sig/stigg/models/v1/subscription_delegate_response.rbs +224 -0
  201. data/sig/stigg/models/v1/subscription_list_params.rbs +58 -0
  202. data/sig/stigg/models/v1/subscription_list_response.rbs +229 -0
  203. data/sig/stigg/models/v1/subscription_migrate_params.rbs +43 -0
  204. data/sig/stigg/models/v1/subscription_migrate_response.rbs +224 -0
  205. data/sig/stigg/models/v1/subscription_preview_params.rbs +821 -0
  206. data/sig/stigg/models/v1/subscription_preview_response.rbs +466 -0
  207. data/sig/stigg/models/v1/subscription_retrieve_params.rbs +17 -0
  208. data/sig/stigg/models/v1/subscription_retrieve_response.rbs +224 -0
  209. data/sig/stigg/models/v1/subscription_transfer_params.rbs +26 -0
  210. data/sig/stigg/models/v1/subscription_transfer_response.rbs +224 -0
  211. data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_params.rbs +19 -0
  212. data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +34 -0
  213. data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_params.rbs +19 -0
  214. data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +34 -0
  215. data/sig/stigg/models/v1_create_event_params.rbs +80 -0
  216. data/sig/stigg/models/v1_create_event_response.rbs +13 -0
  217. data/sig/stigg/models/v1_create_usage_params.rbs +90 -0
  218. data/sig/stigg/models/v1_create_usage_response.rbs +85 -0
  219. data/sig/stigg/models.rbs +7 -0
  220. data/sig/stigg/request_options.rbs +34 -0
  221. data/sig/stigg/resources/v1/coupons.rbs +32 -0
  222. data/sig/stigg/resources/v1/customers/payment_method.rbs +25 -0
  223. data/sig/stigg/resources/v1/customers/promotional.rbs +23 -0
  224. data/sig/stigg/resources/v1/customers/usage.rbs +21 -0
  225. data/sig/stigg/resources/v1/customers.rbs +58 -0
  226. data/sig/stigg/resources/v1/subscriptions/future_update.rbs +21 -0
  227. data/sig/stigg/resources/v1/subscriptions.rbs +76 -0
  228. data/sig/stigg/resources/v1.rbs +23 -0
  229. data/sig/stigg/version.rbs +3 -0
  230. metadata +301 -0
@@ -0,0 +1,185 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#create
7
+ class CustomerCreateParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ # Customer slug
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute coupon_id
18
+ # Customer level coupon
19
+ #
20
+ # @return [String, nil]
21
+ optional :coupon_id, String, api_name: :couponId, nil?: true
22
+
23
+ # @!attribute default_payment_method
24
+ # The default payment method details
25
+ #
26
+ # @return [Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod, nil]
27
+ optional :default_payment_method,
28
+ -> { Stigg::V1::CustomerCreateParams::DefaultPaymentMethod },
29
+ api_name: :defaultPaymentMethod,
30
+ nil?: true
31
+
32
+ # @!attribute email
33
+ # The email of the customer
34
+ #
35
+ # @return [String, nil]
36
+ optional :email, String, nil?: true
37
+
38
+ # @!attribute integrations
39
+ # List of integrations
40
+ #
41
+ # @return [Array<Stigg::Models::V1::CustomerCreateParams::Integration>, nil]
42
+ optional :integrations,
43
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerCreateParams::Integration] }
44
+
45
+ # @!attribute metadata
46
+ # Additional metadata
47
+ #
48
+ # @return [Hash{Symbol=>String}, nil]
49
+ optional :metadata, Stigg::Internal::Type::HashOf[String]
50
+
51
+ # @!attribute name
52
+ # The name of the customer
53
+ #
54
+ # @return [String, nil]
55
+ optional :name, String, nil?: true
56
+
57
+ # @!method initialize(id:, coupon_id: nil, default_payment_method: nil, email: nil, integrations: nil, metadata: nil, name: nil, request_options: {})
58
+ # @param id [String] Customer slug
59
+ #
60
+ # @param coupon_id [String, nil] Customer level coupon
61
+ #
62
+ # @param default_payment_method [Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod, nil] The default payment method details
63
+ #
64
+ # @param email [String, nil] The email of the customer
65
+ #
66
+ # @param integrations [Array<Stigg::Models::V1::CustomerCreateParams::Integration>] List of integrations
67
+ #
68
+ # @param metadata [Hash{Symbol=>String}] Additional metadata
69
+ #
70
+ # @param name [String, nil] The name of the customer
71
+ #
72
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
73
+
74
+ class DefaultPaymentMethod < Stigg::Internal::Type::BaseModel
75
+ # @!attribute billing_id
76
+ # The default payment method id
77
+ #
78
+ # @return [String, nil]
79
+ required :billing_id, String, api_name: :billingId, nil?: true
80
+
81
+ # @!attribute card_expiry_month
82
+ # The expiration month of the default payment method
83
+ #
84
+ # @return [Float, nil]
85
+ required :card_expiry_month, Float, api_name: :cardExpiryMonth, nil?: true
86
+
87
+ # @!attribute card_expiry_year
88
+ # The expiration year of the default payment method
89
+ #
90
+ # @return [Float, nil]
91
+ required :card_expiry_year, Float, api_name: :cardExpiryYear, nil?: true
92
+
93
+ # @!attribute card_last4_digits
94
+ # The last 4 digits of the default payment method
95
+ #
96
+ # @return [String, nil]
97
+ required :card_last4_digits, String, api_name: :cardLast4Digits, nil?: true
98
+
99
+ # @!attribute type
100
+ # The default payment method type
101
+ #
102
+ # @return [Symbol, Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod::Type]
103
+ required :type, enum: -> { Stigg::V1::CustomerCreateParams::DefaultPaymentMethod::Type }
104
+
105
+ # @!method initialize(billing_id:, card_expiry_month:, card_expiry_year:, card_last4_digits:, type:)
106
+ # The default payment method details
107
+ #
108
+ # @param billing_id [String, nil] The default payment method id
109
+ #
110
+ # @param card_expiry_month [Float, nil] The expiration month of the default payment method
111
+ #
112
+ # @param card_expiry_year [Float, nil] The expiration year of the default payment method
113
+ #
114
+ # @param card_last4_digits [String, nil] The last 4 digits of the default payment method
115
+ #
116
+ # @param type [Symbol, Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod::Type] The default payment method type
117
+
118
+ # The default payment method type
119
+ #
120
+ # @see Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod#type
121
+ module Type
122
+ extend Stigg::Internal::Type::Enum
123
+
124
+ CARD = :CARD
125
+ BANK = :BANK
126
+ CASH_APP = :CASH_APP
127
+
128
+ # @!method self.values
129
+ # @return [Array<Symbol>]
130
+ end
131
+ end
132
+
133
+ class Integration < Stigg::Internal::Type::BaseModel
134
+ # @!attribute id
135
+ # Integration details
136
+ #
137
+ # @return [String]
138
+ required :id, String
139
+
140
+ # @!attribute synced_entity_id
141
+ # Synced entity id
142
+ #
143
+ # @return [String, nil]
144
+ required :synced_entity_id, String, api_name: :syncedEntityId, nil?: true
145
+
146
+ # @!attribute vendor_identifier
147
+ # The vendor identifier of integration
148
+ #
149
+ # @return [Symbol, Stigg::Models::V1::CustomerCreateParams::Integration::VendorIdentifier]
150
+ required :vendor_identifier,
151
+ enum: -> { Stigg::V1::CustomerCreateParams::Integration::VendorIdentifier },
152
+ api_name: :vendorIdentifier
153
+
154
+ # @!method initialize(id:, synced_entity_id:, vendor_identifier:)
155
+ # @param id [String] Integration details
156
+ #
157
+ # @param synced_entity_id [String, nil] Synced entity id
158
+ #
159
+ # @param vendor_identifier [Symbol, Stigg::Models::V1::CustomerCreateParams::Integration::VendorIdentifier] The vendor identifier of integration
160
+
161
+ # The vendor identifier of integration
162
+ #
163
+ # @see Stigg::Models::V1::CustomerCreateParams::Integration#vendor_identifier
164
+ module VendorIdentifier
165
+ extend Stigg::Internal::Type::Enum
166
+
167
+ AUTH0 = :AUTH0
168
+ ZUORA = :ZUORA
169
+ STRIPE = :STRIPE
170
+ HUBSPOT = :HUBSPOT
171
+ AWS_MARKETPLACE = :AWS_MARKETPLACE
172
+ SNOWFLAKE = :SNOWFLAKE
173
+ SALESFORCE = :SALESFORCE
174
+ BIG_QUERY = :BIG_QUERY
175
+ OPEN_FGA = :OPEN_FGA
176
+ APP_STORE = :APP_STORE
177
+
178
+ # @!method self.values
179
+ # @return [Array<Symbol>]
180
+ end
181
+ end
182
+ end
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#list
7
+ class CustomerListParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute ending_before
12
+ # Ending before this UUID for pagination
13
+ #
14
+ # @return [String, nil]
15
+ optional :ending_before, String
16
+
17
+ # @!attribute limit
18
+ # Items per page
19
+ #
20
+ # @return [Integer, nil]
21
+ optional :limit, Integer
22
+
23
+ # @!attribute starting_after
24
+ # Starting after this UUID for pagination
25
+ #
26
+ # @return [String, nil]
27
+ optional :starting_after, String
28
+
29
+ # @!method initialize(ending_before: nil, limit: nil, starting_after: nil, request_options: {})
30
+ # @param ending_before [String] Ending before this UUID for pagination
31
+ #
32
+ # @param limit [Integer] Items per page
33
+ #
34
+ # @param starting_after [String] Starting after this UUID for pagination
35
+ #
36
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,223 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#list
7
+ class CustomerListResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [Array<Stigg::Models::V1::CustomerListResponse::Data>]
11
+ required :data, -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CustomerListResponse::Data] }
12
+
13
+ # @!method initialize(data:)
14
+ # @param data [Array<Stigg::Models::V1::CustomerListResponse::Data>]
15
+
16
+ class Data < Stigg::Internal::Type::BaseModel
17
+ # @!attribute id
18
+ # Customer slug
19
+ #
20
+ # @return [String]
21
+ required :id, String
22
+
23
+ # @!attribute archived_at
24
+ # Timestamp of when the record was deleted
25
+ #
26
+ # @return [Time, nil]
27
+ required :archived_at, Time, api_name: :archivedAt, nil?: true
28
+
29
+ # @!attribute created_at
30
+ # Timestamp of when the record was created
31
+ #
32
+ # @return [Time]
33
+ required :created_at, Time, api_name: :createdAt
34
+
35
+ # @!attribute cursor_id
36
+ # Cursor ID for query pagination
37
+ #
38
+ # @return [String]
39
+ required :cursor_id, String, api_name: :cursorId
40
+
41
+ # @!attribute updated_at
42
+ # Timestamp of when the record was last updated
43
+ #
44
+ # @return [Time]
45
+ required :updated_at, Time, api_name: :updatedAt
46
+
47
+ # @!attribute coupon_id
48
+ # Customer level coupon
49
+ #
50
+ # @return [String, nil]
51
+ optional :coupon_id, String, api_name: :couponId, nil?: true
52
+
53
+ # @!attribute default_payment_method
54
+ # The default payment method details
55
+ #
56
+ # @return [Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod, nil]
57
+ optional :default_payment_method,
58
+ -> { Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod },
59
+ api_name: :defaultPaymentMethod,
60
+ nil?: true
61
+
62
+ # @!attribute email
63
+ # The email of the customer
64
+ #
65
+ # @return [String, nil]
66
+ optional :email, String, nil?: true
67
+
68
+ # @!attribute integrations
69
+ # List of integrations
70
+ #
71
+ # @return [Array<Stigg::Models::V1::CustomerListResponse::Data::Integration>, nil]
72
+ optional :integrations,
73
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CustomerListResponse::Data::Integration] }
74
+
75
+ # @!attribute metadata
76
+ # Additional metadata
77
+ #
78
+ # @return [Hash{Symbol=>String}, nil]
79
+ optional :metadata, Stigg::Internal::Type::HashOf[String]
80
+
81
+ # @!attribute name
82
+ # The name of the customer
83
+ #
84
+ # @return [String, nil]
85
+ optional :name, String, nil?: true
86
+
87
+ # @!method initialize(id:, archived_at:, created_at:, cursor_id:, updated_at:, coupon_id: nil, default_payment_method: nil, email: nil, integrations: nil, metadata: nil, name: nil)
88
+ # @param id [String] Customer slug
89
+ #
90
+ # @param archived_at [Time, nil] Timestamp of when the record was deleted
91
+ #
92
+ # @param created_at [Time] Timestamp of when the record was created
93
+ #
94
+ # @param cursor_id [String] Cursor ID for query pagination
95
+ #
96
+ # @param updated_at [Time] Timestamp of when the record was last updated
97
+ #
98
+ # @param coupon_id [String, nil] Customer level coupon
99
+ #
100
+ # @param default_payment_method [Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod, nil] The default payment method details
101
+ #
102
+ # @param email [String, nil] The email of the customer
103
+ #
104
+ # @param integrations [Array<Stigg::Models::V1::CustomerListResponse::Data::Integration>] List of integrations
105
+ #
106
+ # @param metadata [Hash{Symbol=>String}] Additional metadata
107
+ #
108
+ # @param name [String, nil] The name of the customer
109
+
110
+ # @see Stigg::Models::V1::CustomerListResponse::Data#default_payment_method
111
+ class DefaultPaymentMethod < Stigg::Internal::Type::BaseModel
112
+ # @!attribute billing_id
113
+ # The default payment method id
114
+ #
115
+ # @return [String, nil]
116
+ required :billing_id, String, api_name: :billingId, nil?: true
117
+
118
+ # @!attribute card_expiry_month
119
+ # The expiration month of the default payment method
120
+ #
121
+ # @return [Float, nil]
122
+ required :card_expiry_month, Float, api_name: :cardExpiryMonth, nil?: true
123
+
124
+ # @!attribute card_expiry_year
125
+ # The expiration year of the default payment method
126
+ #
127
+ # @return [Float, nil]
128
+ required :card_expiry_year, Float, api_name: :cardExpiryYear, nil?: true
129
+
130
+ # @!attribute card_last4_digits
131
+ # The last 4 digits of the default payment method
132
+ #
133
+ # @return [String, nil]
134
+ required :card_last4_digits, String, api_name: :cardLast4Digits, nil?: true
135
+
136
+ # @!attribute type
137
+ # The default payment method type
138
+ #
139
+ # @return [Symbol, Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod::Type]
140
+ required :type, enum: -> { Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod::Type }
141
+
142
+ # @!method initialize(billing_id:, card_expiry_month:, card_expiry_year:, card_last4_digits:, type:)
143
+ # The default payment method details
144
+ #
145
+ # @param billing_id [String, nil] The default payment method id
146
+ #
147
+ # @param card_expiry_month [Float, nil] The expiration month of the default payment method
148
+ #
149
+ # @param card_expiry_year [Float, nil] The expiration year of the default payment method
150
+ #
151
+ # @param card_last4_digits [String, nil] The last 4 digits of the default payment method
152
+ #
153
+ # @param type [Symbol, Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod::Type] The default payment method type
154
+
155
+ # The default payment method type
156
+ #
157
+ # @see Stigg::Models::V1::CustomerListResponse::Data::DefaultPaymentMethod#type
158
+ module Type
159
+ extend Stigg::Internal::Type::Enum
160
+
161
+ CARD = :CARD
162
+ BANK = :BANK
163
+ CASH_APP = :CASH_APP
164
+
165
+ # @!method self.values
166
+ # @return [Array<Symbol>]
167
+ end
168
+ end
169
+
170
+ class Integration < Stigg::Internal::Type::BaseModel
171
+ # @!attribute id
172
+ # Integration details
173
+ #
174
+ # @return [String]
175
+ required :id, String
176
+
177
+ # @!attribute synced_entity_id
178
+ # Synced entity id
179
+ #
180
+ # @return [String, nil]
181
+ required :synced_entity_id, String, api_name: :syncedEntityId, nil?: true
182
+
183
+ # @!attribute vendor_identifier
184
+ # The vendor identifier of integration
185
+ #
186
+ # @return [Symbol, Stigg::Models::V1::CustomerListResponse::Data::Integration::VendorIdentifier]
187
+ required :vendor_identifier,
188
+ enum: -> { Stigg::Models::V1::CustomerListResponse::Data::Integration::VendorIdentifier },
189
+ api_name: :vendorIdentifier
190
+
191
+ # @!method initialize(id:, synced_entity_id:, vendor_identifier:)
192
+ # @param id [String] Integration details
193
+ #
194
+ # @param synced_entity_id [String, nil] Synced entity id
195
+ #
196
+ # @param vendor_identifier [Symbol, Stigg::Models::V1::CustomerListResponse::Data::Integration::VendorIdentifier] The vendor identifier of integration
197
+
198
+ # The vendor identifier of integration
199
+ #
200
+ # @see Stigg::Models::V1::CustomerListResponse::Data::Integration#vendor_identifier
201
+ module VendorIdentifier
202
+ extend Stigg::Internal::Type::Enum
203
+
204
+ AUTH0 = :AUTH0
205
+ ZUORA = :ZUORA
206
+ STRIPE = :STRIPE
207
+ HUBSPOT = :HUBSPOT
208
+ AWS_MARKETPLACE = :AWS_MARKETPLACE
209
+ SNOWFLAKE = :SNOWFLAKE
210
+ SALESFORCE = :SALESFORCE
211
+ BIG_QUERY = :BIG_QUERY
212
+ OPEN_FGA = :OPEN_FGA
213
+ APP_STORE = :APP_STORE
214
+
215
+ # @!method self.values
216
+ # @return [Array<Symbol>]
217
+ end
218
+ end
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end
@@ -0,0 +1,216 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#create
7
+ class CustomerResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [Stigg::Models::V1::CustomerResponse::Data]
11
+ required :data, -> { Stigg::V1::CustomerResponse::Data }
12
+
13
+ # @!method initialize(data:)
14
+ # @param data [Stigg::Models::V1::CustomerResponse::Data]
15
+
16
+ # @see Stigg::Models::V1::CustomerResponse#data
17
+ class Data < Stigg::Internal::Type::BaseModel
18
+ # @!attribute id
19
+ # Customer slug
20
+ #
21
+ # @return [String]
22
+ required :id, String
23
+
24
+ # @!attribute archived_at
25
+ # Timestamp of when the record was deleted
26
+ #
27
+ # @return [Time, nil]
28
+ required :archived_at, Time, api_name: :archivedAt, nil?: true
29
+
30
+ # @!attribute created_at
31
+ # Timestamp of when the record was created
32
+ #
33
+ # @return [Time]
34
+ required :created_at, Time, api_name: :createdAt
35
+
36
+ # @!attribute updated_at
37
+ # Timestamp of when the record was last updated
38
+ #
39
+ # @return [Time]
40
+ required :updated_at, Time, api_name: :updatedAt
41
+
42
+ # @!attribute coupon_id
43
+ # Customer level coupon
44
+ #
45
+ # @return [String, nil]
46
+ optional :coupon_id, String, api_name: :couponId, nil?: true
47
+
48
+ # @!attribute default_payment_method
49
+ # The default payment method details
50
+ #
51
+ # @return [Stigg::Models::V1::CustomerResponse::Data::DefaultPaymentMethod, nil]
52
+ optional :default_payment_method,
53
+ -> { Stigg::V1::CustomerResponse::Data::DefaultPaymentMethod },
54
+ api_name: :defaultPaymentMethod,
55
+ nil?: true
56
+
57
+ # @!attribute email
58
+ # The email of the customer
59
+ #
60
+ # @return [String, nil]
61
+ optional :email, String, nil?: true
62
+
63
+ # @!attribute integrations
64
+ # List of integrations
65
+ #
66
+ # @return [Array<Stigg::Models::V1::CustomerResponse::Data::Integration>, nil]
67
+ optional :integrations,
68
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerResponse::Data::Integration] }
69
+
70
+ # @!attribute metadata
71
+ # Additional metadata
72
+ #
73
+ # @return [Hash{Symbol=>String}, nil]
74
+ optional :metadata, Stigg::Internal::Type::HashOf[String]
75
+
76
+ # @!attribute name
77
+ # The name of the customer
78
+ #
79
+ # @return [String, nil]
80
+ optional :name, String, nil?: true
81
+
82
+ # @!method initialize(id:, archived_at:, created_at:, updated_at:, coupon_id: nil, default_payment_method: nil, email: nil, integrations: nil, metadata: nil, name: nil)
83
+ # @param id [String] Customer slug
84
+ #
85
+ # @param archived_at [Time, nil] Timestamp of when the record was deleted
86
+ #
87
+ # @param created_at [Time] Timestamp of when the record was created
88
+ #
89
+ # @param updated_at [Time] Timestamp of when the record was last updated
90
+ #
91
+ # @param coupon_id [String, nil] Customer level coupon
92
+ #
93
+ # @param default_payment_method [Stigg::Models::V1::CustomerResponse::Data::DefaultPaymentMethod, nil] The default payment method details
94
+ #
95
+ # @param email [String, nil] The email of the customer
96
+ #
97
+ # @param integrations [Array<Stigg::Models::V1::CustomerResponse::Data::Integration>] List of integrations
98
+ #
99
+ # @param metadata [Hash{Symbol=>String}] Additional metadata
100
+ #
101
+ # @param name [String, nil] The name of the customer
102
+
103
+ # @see Stigg::Models::V1::CustomerResponse::Data#default_payment_method
104
+ class DefaultPaymentMethod < Stigg::Internal::Type::BaseModel
105
+ # @!attribute billing_id
106
+ # The default payment method id
107
+ #
108
+ # @return [String, nil]
109
+ required :billing_id, String, api_name: :billingId, nil?: true
110
+
111
+ # @!attribute card_expiry_month
112
+ # The expiration month of the default payment method
113
+ #
114
+ # @return [Float, nil]
115
+ required :card_expiry_month, Float, api_name: :cardExpiryMonth, nil?: true
116
+
117
+ # @!attribute card_expiry_year
118
+ # The expiration year of the default payment method
119
+ #
120
+ # @return [Float, nil]
121
+ required :card_expiry_year, Float, api_name: :cardExpiryYear, nil?: true
122
+
123
+ # @!attribute card_last4_digits
124
+ # The last 4 digits of the default payment method
125
+ #
126
+ # @return [String, nil]
127
+ required :card_last4_digits, String, api_name: :cardLast4Digits, nil?: true
128
+
129
+ # @!attribute type
130
+ # The default payment method type
131
+ #
132
+ # @return [Symbol, Stigg::Models::V1::CustomerResponse::Data::DefaultPaymentMethod::Type]
133
+ required :type, enum: -> { Stigg::V1::CustomerResponse::Data::DefaultPaymentMethod::Type }
134
+
135
+ # @!method initialize(billing_id:, card_expiry_month:, card_expiry_year:, card_last4_digits:, type:)
136
+ # The default payment method details
137
+ #
138
+ # @param billing_id [String, nil] The default payment method id
139
+ #
140
+ # @param card_expiry_month [Float, nil] The expiration month of the default payment method
141
+ #
142
+ # @param card_expiry_year [Float, nil] The expiration year of the default payment method
143
+ #
144
+ # @param card_last4_digits [String, nil] The last 4 digits of the default payment method
145
+ #
146
+ # @param type [Symbol, Stigg::Models::V1::CustomerResponse::Data::DefaultPaymentMethod::Type] The default payment method type
147
+
148
+ # The default payment method type
149
+ #
150
+ # @see Stigg::Models::V1::CustomerResponse::Data::DefaultPaymentMethod#type
151
+ module Type
152
+ extend Stigg::Internal::Type::Enum
153
+
154
+ CARD = :CARD
155
+ BANK = :BANK
156
+ CASH_APP = :CASH_APP
157
+
158
+ # @!method self.values
159
+ # @return [Array<Symbol>]
160
+ end
161
+ end
162
+
163
+ class Integration < Stigg::Internal::Type::BaseModel
164
+ # @!attribute id
165
+ # Integration details
166
+ #
167
+ # @return [String]
168
+ required :id, String
169
+
170
+ # @!attribute synced_entity_id
171
+ # Synced entity id
172
+ #
173
+ # @return [String, nil]
174
+ required :synced_entity_id, String, api_name: :syncedEntityId, nil?: true
175
+
176
+ # @!attribute vendor_identifier
177
+ # The vendor identifier of integration
178
+ #
179
+ # @return [Symbol, Stigg::Models::V1::CustomerResponse::Data::Integration::VendorIdentifier]
180
+ required :vendor_identifier,
181
+ enum: -> { Stigg::V1::CustomerResponse::Data::Integration::VendorIdentifier },
182
+ api_name: :vendorIdentifier
183
+
184
+ # @!method initialize(id:, synced_entity_id:, vendor_identifier:)
185
+ # @param id [String] Integration details
186
+ #
187
+ # @param synced_entity_id [String, nil] Synced entity id
188
+ #
189
+ # @param vendor_identifier [Symbol, Stigg::Models::V1::CustomerResponse::Data::Integration::VendorIdentifier] The vendor identifier of integration
190
+
191
+ # The vendor identifier of integration
192
+ #
193
+ # @see Stigg::Models::V1::CustomerResponse::Data::Integration#vendor_identifier
194
+ module VendorIdentifier
195
+ extend Stigg::Internal::Type::Enum
196
+
197
+ AUTH0 = :AUTH0
198
+ ZUORA = :ZUORA
199
+ STRIPE = :STRIPE
200
+ HUBSPOT = :HUBSPOT
201
+ AWS_MARKETPLACE = :AWS_MARKETPLACE
202
+ SNOWFLAKE = :SNOWFLAKE
203
+ SALESFORCE = :SALESFORCE
204
+ BIG_QUERY = :BIG_QUERY
205
+ OPEN_FGA = :OPEN_FGA
206
+ APP_STORE = :APP_STORE
207
+
208
+ # @!method self.values
209
+ # @return [Array<Symbol>]
210
+ end
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end
216
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#retrieve
7
+ class CustomerRetrieveParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!method initialize(request_options: {})
12
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#unarchive
7
+ class CustomerUnarchiveParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!method initialize(request_options: {})
12
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
13
+ end
14
+ end
15
+ end
16
+ end