stigg 0.1.0.pre.alpha.2 → 0.1.0.pre.alpha.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/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +24 -24
- data/lib/stigg/models/v1/customer_import_params.rb +75 -0
- data/lib/stigg/models/v1/customer_import_response.rb +35 -0
- data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +16 -16
- data/lib/stigg/models/v1/customer_response.rb +1 -1
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_params.rb +296 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_response.rb +341 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_params.rb +24 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_response.rb +342 -0
- data/lib/stigg/models/v1/event_report_params.rb +91 -0
- data/lib/stigg/models/v1/event_report_response.rb +25 -0
- data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +30 -29
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
- data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
- data/lib/stigg/models/v1/{subscription_create_params.rb → subscription_provision_params.rb} +118 -118
- data/lib/stigg/models/v1/{subscription_create_response.rb → subscription_provision_response.rb} +76 -75
- data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
- data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +7 -5
- data/lib/stigg/models/v1/usage_history_params.rb +54 -0
- data/lib/stigg/models/v1/usage_history_response.rb +155 -0
- data/lib/stigg/models/v1/usage_report_params.rb +114 -0
- data/lib/stigg/models/v1/usage_report_response.rb +120 -0
- data/lib/stigg/models.rb +0 -4
- data/lib/stigg/resources/v1/coupons.rb +4 -4
- data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +69 -0
- data/lib/stigg/resources/v1/customers.rb +59 -37
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +4 -4
- data/lib/stigg/resources/v1/subscriptions.rb +166 -64
- data/lib/stigg/resources/v1/usage.rb +79 -0
- data/lib/stigg/resources/v1.rb +6 -42
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +25 -16
- data/rbi/stigg/models/v1/{coupon_create_response.rbi → coupon.rbi} +156 -252
- data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
- data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
- data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +35 -35
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_params.rbi +640 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbi +42 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
- data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
- data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
- data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +66 -117
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
- data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
- data/rbi/stigg/models/v1/{subscription_create_params.rbi → subscription_provision_params.rbi} +794 -773
- data/rbi/stigg/models/v1/{subscription_create_response.rbi → subscription_provision_response.rbi} +481 -481
- data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
- data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +9 -16
- data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
- data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
- data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
- data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
- data/rbi/stigg/models.rbi +0 -4
- data/rbi/stigg/resources/v1/coupons.rbi +2 -2
- data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +57 -0
- data/rbi/stigg/resources/v1/customers.rbi +53 -36
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +2 -6
- data/rbi/stigg/resources/v1/subscriptions.rbi +179 -74
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
- data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
- data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_params.rbs +234 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbs +27 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
- data/sig/stigg/models/v1/event_report_params.rbs +82 -0
- data/sig/stigg/models/v1/event_report_response.rbs +15 -0
- data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +36 -41
- data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
- data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
- data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
- data/sig/stigg/models/v1/{subscription_create_params.rbs → subscription_provision_params.rbs} +200 -200
- data/sig/stigg/models/v1/{subscription_create_response.rbs → subscription_provision_response.rbs} +106 -106
- data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
- data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
- data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
- data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
- data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
- data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
- data/sig/stigg/models.rbs +0 -4
- data/sig/stigg/resources/v1/coupons.rbs +2 -2
- data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +23 -0
- data/sig/stigg/resources/v1/customers.rbs +17 -12
- data/sig/stigg/resources/v1/events.rbs +14 -0
- data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
- data/sig/stigg/resources/v1/subscriptions.rbs +65 -32
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -50
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -322
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -314
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -34
- data/lib/stigg/models/v1_create_event_params.rb +0 -89
- data/lib/stigg/models/v1_create_event_response.rb +0 -23
- data/lib/stigg/models/v1_create_usage_params.rb +0 -112
- data/lib/stigg/models/v1_create_usage_response.rb +0 -118
- data/lib/stigg/resources/v1/customers/usage.rb +0 -18
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -987
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -80
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -161
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -30
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -217
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -157
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -16
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -255
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
- data/sig/stigg/models/v1_create_event_params.rbs +0 -80
- data/sig/stigg/models/v1_create_event_response.rbs +0 -13
- data/sig/stigg/models/v1_create_usage_params.rbs +0 -100
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8e60f4fdad10d2d4b37e4f5d646accf564f8b280a86e1c9ba46b488138b1f43
|
|
4
|
+
data.tar.gz: eb0423ccd6a83e037421ab3e2d78187e6aff8024175a974af11d06d7f9f8a587
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2a1589cf8dc649e0d0cbadd3d2b3d4722b062d9da08c4b435052c2e457fcbfbaeb92b0a9ae110a02a2692fdfae37fc2ca80ba2b9e6d80cadedd19a487d66d10
|
|
7
|
+
data.tar.gz: 6abfbdeca00d4e2a8269c0afd32ef00ddc785d710e38ff7d49787539dceee459e9ac0c094d06c0df6cbace4b59e8725f420c6c9ee43ce24683fb9e845ba18ff4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.3 (2026-01-29)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update stainless config ([9d48da5](https://github.com/stiggio/stigg-ruby/commit/9d48da56de7780968ac51cdf3f80073bd8f3e7da))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.2 (2026-01-28)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
|
data/README.md
CHANGED
|
@@ -438,8 +438,8 @@ module Stigg
|
|
|
438
438
|
# @return [Hash{Symbol=>Object}]
|
|
439
439
|
#
|
|
440
440
|
# @example
|
|
441
|
-
# # `
|
|
442
|
-
#
|
|
441
|
+
# # `customer_response` is a `Stigg::V1::CustomerResponse`
|
|
442
|
+
# customer_response => {
|
|
443
443
|
# data: data
|
|
444
444
|
# }
|
|
445
445
|
def deconstruct_keys(keys)
|
|
@@ -4,19 +4,19 @@ module Stigg
|
|
|
4
4
|
module Models
|
|
5
5
|
module V1
|
|
6
6
|
# @see Stigg::Resources::V1::Coupons#create
|
|
7
|
-
class
|
|
7
|
+
class Coupon < Stigg::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
9
|
# Discount instrument with percentage or fixed amount
|
|
10
10
|
#
|
|
11
|
-
# @return [Stigg::Models::V1::
|
|
12
|
-
required :data, -> { Stigg::
|
|
11
|
+
# @return [Stigg::Models::V1::Coupon::Data]
|
|
12
|
+
required :data, -> { Stigg::V1::Coupon::Data }
|
|
13
13
|
|
|
14
14
|
# @!method initialize(data:)
|
|
15
15
|
# Response object
|
|
16
16
|
#
|
|
17
|
-
# @param data [Stigg::Models::V1::
|
|
17
|
+
# @param data [Stigg::Models::V1::Coupon::Data] Discount instrument with percentage or fixed amount
|
|
18
18
|
|
|
19
|
-
# @see Stigg::Models::V1::
|
|
19
|
+
# @see Stigg::Models::V1::Coupon#data
|
|
20
20
|
class Data < Stigg::Internal::Type::BaseModel
|
|
21
21
|
# @!attribute id
|
|
22
22
|
# The unique identifier for the entity
|
|
@@ -27,9 +27,9 @@ module Stigg
|
|
|
27
27
|
# @!attribute amounts_off
|
|
28
28
|
# Fixed amount discounts in different currencies
|
|
29
29
|
#
|
|
30
|
-
# @return [Array<Stigg::Models::V1::
|
|
30
|
+
# @return [Array<Stigg::Models::V1::Coupon::Data::AmountsOff>, nil]
|
|
31
31
|
required :amounts_off,
|
|
32
|
-
-> { Stigg::Internal::Type::ArrayOf[Stigg::
|
|
32
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::V1::Coupon::Data::AmountsOff] },
|
|
33
33
|
api_name: :amountsOff,
|
|
34
34
|
nil?: true
|
|
35
35
|
|
|
@@ -78,20 +78,20 @@ module Stigg
|
|
|
78
78
|
# @!attribute source
|
|
79
79
|
# The source of the coupon
|
|
80
80
|
#
|
|
81
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
82
|
-
required :source, enum: -> { Stigg::
|
|
81
|
+
# @return [Symbol, Stigg::Models::V1::Coupon::Data::Source, nil]
|
|
82
|
+
required :source, enum: -> { Stigg::V1::Coupon::Data::Source }, nil?: true
|
|
83
83
|
|
|
84
84
|
# @!attribute status
|
|
85
85
|
# Current status of the coupon
|
|
86
86
|
#
|
|
87
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
88
|
-
required :status, enum: -> { Stigg::
|
|
87
|
+
# @return [Symbol, Stigg::Models::V1::Coupon::Data::Status]
|
|
88
|
+
required :status, enum: -> { Stigg::V1::Coupon::Data::Status }
|
|
89
89
|
|
|
90
90
|
# @!attribute type
|
|
91
91
|
# Type of the coupon (percentage or fixed amount)
|
|
92
92
|
#
|
|
93
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
94
|
-
required :type, enum: -> { Stigg::
|
|
93
|
+
# @return [Symbol, Stigg::Models::V1::Coupon::Data::Type]
|
|
94
|
+
required :type, enum: -> { Stigg::V1::Coupon::Data::Type }
|
|
95
95
|
|
|
96
96
|
# @!attribute updated_at
|
|
97
97
|
# Timestamp of when the record was last updated
|
|
@@ -104,7 +104,7 @@ module Stigg
|
|
|
104
104
|
#
|
|
105
105
|
# @param id [String] The unique identifier for the entity
|
|
106
106
|
#
|
|
107
|
-
# @param amounts_off [Array<Stigg::Models::V1::
|
|
107
|
+
# @param amounts_off [Array<Stigg::Models::V1::Coupon::Data::AmountsOff>, nil] Fixed amount discounts in different currencies
|
|
108
108
|
#
|
|
109
109
|
# @param billing_id [String, nil] The unique identifier for the entity in the billing provider
|
|
110
110
|
#
|
|
@@ -120,11 +120,11 @@ module Stigg
|
|
|
120
120
|
#
|
|
121
121
|
# @param percent_off [Float, nil] Percentage discount off the original price
|
|
122
122
|
#
|
|
123
|
-
# @param source [Symbol, Stigg::Models::V1::
|
|
123
|
+
# @param source [Symbol, Stigg::Models::V1::Coupon::Data::Source, nil] The source of the coupon
|
|
124
124
|
#
|
|
125
|
-
# @param status [Symbol, Stigg::Models::V1::
|
|
125
|
+
# @param status [Symbol, Stigg::Models::V1::Coupon::Data::Status] Current status of the coupon
|
|
126
126
|
#
|
|
127
|
-
# @param type [Symbol, Stigg::Models::V1::
|
|
127
|
+
# @param type [Symbol, Stigg::Models::V1::Coupon::Data::Type] Type of the coupon (percentage or fixed amount)
|
|
128
128
|
#
|
|
129
129
|
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
130
130
|
|
|
@@ -138,19 +138,19 @@ module Stigg
|
|
|
138
138
|
# @!attribute currency
|
|
139
139
|
# The price currency
|
|
140
140
|
#
|
|
141
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
142
|
-
required :currency, enum: -> { Stigg::
|
|
141
|
+
# @return [Symbol, Stigg::Models::V1::Coupon::Data::AmountsOff::Currency]
|
|
142
|
+
required :currency, enum: -> { Stigg::V1::Coupon::Data::AmountsOff::Currency }
|
|
143
143
|
|
|
144
144
|
# @!method initialize(amount:, currency:)
|
|
145
145
|
# Monetary amount with currency
|
|
146
146
|
#
|
|
147
147
|
# @param amount [Float] The price amount
|
|
148
148
|
#
|
|
149
|
-
# @param currency [Symbol, Stigg::Models::V1::
|
|
149
|
+
# @param currency [Symbol, Stigg::Models::V1::Coupon::Data::AmountsOff::Currency] The price currency
|
|
150
150
|
|
|
151
151
|
# The price currency
|
|
152
152
|
#
|
|
153
|
-
# @see Stigg::Models::V1::
|
|
153
|
+
# @see Stigg::Models::V1::Coupon::Data::AmountsOff#currency
|
|
154
154
|
module Currency
|
|
155
155
|
extend Stigg::Internal::Type::Enum
|
|
156
156
|
|
|
@@ -278,7 +278,7 @@ module Stigg
|
|
|
278
278
|
|
|
279
279
|
# The source of the coupon
|
|
280
280
|
#
|
|
281
|
-
# @see Stigg::Models::V1::
|
|
281
|
+
# @see Stigg::Models::V1::Coupon::Data#source
|
|
282
282
|
module Source
|
|
283
283
|
extend Stigg::Internal::Type::Enum
|
|
284
284
|
|
|
@@ -292,7 +292,7 @@ module Stigg
|
|
|
292
292
|
|
|
293
293
|
# Current status of the coupon
|
|
294
294
|
#
|
|
295
|
-
# @see Stigg::Models::V1::
|
|
295
|
+
# @see Stigg::Models::V1::Coupon::Data#status
|
|
296
296
|
module Status
|
|
297
297
|
extend Stigg::Internal::Type::Enum
|
|
298
298
|
|
|
@@ -305,7 +305,7 @@ module Stigg
|
|
|
305
305
|
|
|
306
306
|
# Type of the coupon (percentage or fixed amount)
|
|
307
307
|
#
|
|
308
|
-
# @see Stigg::Models::V1::
|
|
308
|
+
# @see Stigg::Models::V1::Coupon::Data#type
|
|
309
309
|
module Type
|
|
310
310
|
extend Stigg::Internal::Type::Enum
|
|
311
311
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Customers#import
|
|
7
|
+
class CustomerImportParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customers
|
|
12
|
+
# List of customer objects to import
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Stigg::Models::V1::CustomerImportParams::Customer>]
|
|
15
|
+
required :customers, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerImportParams::Customer] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(customers:, request_options: {})
|
|
18
|
+
# @param customers [Array<Stigg::Models::V1::CustomerImportParams::Customer>] List of customer objects to import
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
|
|
22
|
+
class Customer < Stigg::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute id
|
|
24
|
+
# Customer slug
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :id, String
|
|
28
|
+
|
|
29
|
+
# @!attribute email
|
|
30
|
+
# The email of the customer
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
required :email, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute name
|
|
36
|
+
# The name of the customer
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
required :name, String, nil?: true
|
|
40
|
+
|
|
41
|
+
# @!attribute metadata
|
|
42
|
+
# Additional metadata
|
|
43
|
+
#
|
|
44
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
45
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
46
|
+
|
|
47
|
+
# @!attribute payment_method_id
|
|
48
|
+
# Billing provider payment method id
|
|
49
|
+
#
|
|
50
|
+
# @return [String, nil]
|
|
51
|
+
optional :payment_method_id, String, api_name: :paymentMethodId
|
|
52
|
+
|
|
53
|
+
# @!attribute updated_at
|
|
54
|
+
# Timestamp of when the record was last updated
|
|
55
|
+
#
|
|
56
|
+
# @return [Time, nil]
|
|
57
|
+
optional :updated_at, Time, api_name: :updatedAt
|
|
58
|
+
|
|
59
|
+
# @!method initialize(id:, email:, name:, metadata: nil, payment_method_id: nil, updated_at: nil)
|
|
60
|
+
# @param id [String] Customer slug
|
|
61
|
+
#
|
|
62
|
+
# @param email [String, nil] The email of the customer
|
|
63
|
+
#
|
|
64
|
+
# @param name [String, nil] The name of the customer
|
|
65
|
+
#
|
|
66
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata
|
|
67
|
+
#
|
|
68
|
+
# @param payment_method_id [String] Billing provider payment method id
|
|
69
|
+
#
|
|
70
|
+
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Customers#import
|
|
7
|
+
class CustomerImportResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
# List of newly created customer IDs from the import operation.
|
|
10
|
+
#
|
|
11
|
+
# @return [Stigg::Models::V1::CustomerImportResponse::Data]
|
|
12
|
+
required :data, -> { Stigg::Models::V1::CustomerImportResponse::Data }
|
|
13
|
+
|
|
14
|
+
# @!method initialize(data:)
|
|
15
|
+
# Response object
|
|
16
|
+
#
|
|
17
|
+
# @param data [Stigg::Models::V1::CustomerImportResponse::Data] List of newly created customer IDs from the import operation.
|
|
18
|
+
|
|
19
|
+
# @see Stigg::Models::V1::CustomerImportResponse#data
|
|
20
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
21
|
+
# @!attribute new_customers
|
|
22
|
+
# Customer IDs created during import
|
|
23
|
+
#
|
|
24
|
+
# @return [Array<String>]
|
|
25
|
+
required :new_customers, Stigg::Internal::Type::ArrayOf[String], api_name: :newCustomers
|
|
26
|
+
|
|
27
|
+
# @!method initialize(new_customers:)
|
|
28
|
+
# List of newly created customer IDs from the import operation.
|
|
29
|
+
#
|
|
30
|
+
# @param new_customers [Array<String>] Customer IDs created during import
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module Stigg
|
|
4
4
|
module Models
|
|
5
5
|
module V1
|
|
6
|
-
# @see Stigg::Resources::V1::Customers#
|
|
7
|
-
class
|
|
6
|
+
# @see Stigg::Resources::V1::Customers#provision
|
|
7
|
+
class CustomerProvisionParams < Stigg::Internal::Type::BaseModel
|
|
8
8
|
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Stigg::Internal::Type::RequestParameters
|
|
10
10
|
|
|
@@ -23,9 +23,9 @@ module Stigg
|
|
|
23
23
|
# @!attribute default_payment_method
|
|
24
24
|
# The default payment method details
|
|
25
25
|
#
|
|
26
|
-
# @return [Stigg::Models::V1::
|
|
26
|
+
# @return [Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod, nil]
|
|
27
27
|
optional :default_payment_method,
|
|
28
|
-
-> { Stigg::V1::
|
|
28
|
+
-> { Stigg::V1::CustomerProvisionParams::DefaultPaymentMethod },
|
|
29
29
|
api_name: :defaultPaymentMethod,
|
|
30
30
|
nil?: true
|
|
31
31
|
|
|
@@ -38,9 +38,9 @@ module Stigg
|
|
|
38
38
|
# @!attribute integrations
|
|
39
39
|
# List of integrations
|
|
40
40
|
#
|
|
41
|
-
# @return [Array<Stigg::Models::V1::
|
|
41
|
+
# @return [Array<Stigg::Models::V1::CustomerProvisionParams::Integration>, nil]
|
|
42
42
|
optional :integrations,
|
|
43
|
-
-> { Stigg::Internal::Type::ArrayOf[Stigg::V1::
|
|
43
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerProvisionParams::Integration] }
|
|
44
44
|
|
|
45
45
|
# @!attribute metadata
|
|
46
46
|
# Additional metadata
|
|
@@ -59,11 +59,11 @@ module Stigg
|
|
|
59
59
|
#
|
|
60
60
|
# @param coupon_id [String, nil] Customer level coupon
|
|
61
61
|
#
|
|
62
|
-
# @param default_payment_method [Stigg::Models::V1::
|
|
62
|
+
# @param default_payment_method [Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod, nil] The default payment method details
|
|
63
63
|
#
|
|
64
64
|
# @param email [String, nil] The email of the customer
|
|
65
65
|
#
|
|
66
|
-
# @param integrations [Array<Stigg::Models::V1::
|
|
66
|
+
# @param integrations [Array<Stigg::Models::V1::CustomerProvisionParams::Integration>] List of integrations
|
|
67
67
|
#
|
|
68
68
|
# @param metadata [Hash{Symbol=>String}] Additional metadata
|
|
69
69
|
#
|
|
@@ -99,8 +99,8 @@ module Stigg
|
|
|
99
99
|
# @!attribute type
|
|
100
100
|
# The default payment method type
|
|
101
101
|
#
|
|
102
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
103
|
-
required :type, enum: -> { Stigg::V1::
|
|
102
|
+
# @return [Symbol, Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod::Type]
|
|
103
|
+
required :type, enum: -> { Stigg::V1::CustomerProvisionParams::DefaultPaymentMethod::Type }
|
|
104
104
|
|
|
105
105
|
# @!method initialize(billing_id:, card_expiry_month:, card_expiry_year:, card_last4_digits:, type:)
|
|
106
106
|
# The default payment method details
|
|
@@ -113,11 +113,11 @@ module Stigg
|
|
|
113
113
|
#
|
|
114
114
|
# @param card_last4_digits [String, nil] The last 4 digits of the default payment method
|
|
115
115
|
#
|
|
116
|
-
# @param type [Symbol, Stigg::Models::V1::
|
|
116
|
+
# @param type [Symbol, Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod::Type] The default payment method type
|
|
117
117
|
|
|
118
118
|
# The default payment method type
|
|
119
119
|
#
|
|
120
|
-
# @see Stigg::Models::V1::
|
|
120
|
+
# @see Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod#type
|
|
121
121
|
module Type
|
|
122
122
|
extend Stigg::Internal::Type::Enum
|
|
123
123
|
|
|
@@ -146,9 +146,9 @@ module Stigg
|
|
|
146
146
|
# @!attribute vendor_identifier
|
|
147
147
|
# The vendor identifier of integration
|
|
148
148
|
#
|
|
149
|
-
# @return [Symbol, Stigg::Models::V1::
|
|
149
|
+
# @return [Symbol, Stigg::Models::V1::CustomerProvisionParams::Integration::VendorIdentifier]
|
|
150
150
|
required :vendor_identifier,
|
|
151
|
-
enum: -> { Stigg::V1::
|
|
151
|
+
enum: -> { Stigg::V1::CustomerProvisionParams::Integration::VendorIdentifier },
|
|
152
152
|
api_name: :vendorIdentifier
|
|
153
153
|
|
|
154
154
|
# @!method initialize(id:, synced_entity_id:, vendor_identifier:)
|
|
@@ -158,11 +158,11 @@ module Stigg
|
|
|
158
158
|
#
|
|
159
159
|
# @param synced_entity_id [String, nil] Synced entity id
|
|
160
160
|
#
|
|
161
|
-
# @param vendor_identifier [Symbol, Stigg::Models::V1::
|
|
161
|
+
# @param vendor_identifier [Symbol, Stigg::Models::V1::CustomerProvisionParams::Integration::VendorIdentifier] The vendor identifier of integration
|
|
162
162
|
|
|
163
163
|
# The vendor identifier of integration
|
|
164
164
|
#
|
|
165
|
-
# @see Stigg::Models::V1::
|
|
165
|
+
# @see Stigg::Models::V1::CustomerProvisionParams::Integration#vendor_identifier
|
|
166
166
|
module VendorIdentifier
|
|
167
167
|
extend Stigg::Internal::Type::Enum
|
|
168
168
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Stigg
|
|
4
4
|
module Models
|
|
5
5
|
module V1
|
|
6
|
-
# @see Stigg::Resources::V1::Customers#
|
|
6
|
+
# @see Stigg::Resources::V1::Customers#retrieve
|
|
7
7
|
class CustomerResponse < Stigg::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
9
|
# A customer can be either an organization or an individual
|