stigg 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +29 -1
- data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
- data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
- data/lib/stigg/models/v1/coupon_create_response.rb +11 -6
- data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
- data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +11 -6
- data/lib/stigg/models/v1/customer_create_params.rb +2 -0
- data/lib/stigg/models/v1/customer_list_params.rb +14 -14
- data/lib/stigg/models/v1/customer_list_response.rb +160 -174
- data/lib/stigg/models/v1/customer_response.rb +8 -1
- data/lib/stigg/models/v1/customer_update_params.rb +2 -0
- data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
- data/lib/stigg/models/v1/subscription_create_params.rb +1485 -6
- data/lib/stigg/models/v1/subscription_create_response.rb +703 -4
- data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
- data/lib/stigg/models/v1/subscription_delegate_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_list_params.rb +20 -24
- data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
- data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
- data/lib/stigg/models/v1/subscription_migrate_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
- data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
- data/lib/stigg/models/v1/subscription_retrieve_response.rb +42 -2
- data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
- data/lib/stigg/models/v1/subscription_transfer_response.rb +42 -2
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rb +2 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +2 -0
- data/lib/stigg/models/v1_create_event_params.rb +2 -0
- data/lib/stigg/models/v1_create_event_response.rb +8 -1
- data/lib/stigg/models/v1_create_usage_params.rb +19 -3
- data/lib/stigg/models/v1_create_usage_response.rb +7 -1
- data/lib/stigg/resources/v1/coupons.rb +12 -10
- data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
- data/lib/stigg/resources/v1/customers/usage.rb +0 -41
- data/lib/stigg/resources/v1/customers.rb +20 -20
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +6 -4
- data/lib/stigg/resources/v1/subscriptions.rb +74 -49
- data/lib/stigg/resources/v1.rb +2 -2
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +0 -7
- data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/coupon_create_response.rbi +11 -10
- data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +11 -10
- data/rbi/stigg/models/v1/customer_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/customer_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
- data/rbi/stigg/models/v1/customer_response.rbi +8 -1
- data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
- data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
- data/rbi/stigg/models/v1/subscription_create_params.rbi +4975 -84
- data/rbi/stigg/models/v1/subscription_create_response.rbi +2508 -1
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_list_params.rbi +26 -28
- data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
- data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
- data/rbi/stigg/models/v1/subscription_migrate_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
- data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +84 -1
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +1 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbi +1 -0
- data/rbi/stigg/models/v1_create_event_params.rbi +1 -0
- data/rbi/stigg/models/v1_create_event_response.rbi +8 -1
- data/rbi/stigg/models/v1_create_usage_params.rbi +44 -4
- data/rbi/stigg/models/v1_create_usage_response.rbi +8 -1
- data/rbi/stigg/resources/v1/coupons.rbi +20 -12
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -29
- data/rbi/stigg/resources/v1/customers.rbi +34 -20
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +12 -4
- data/rbi/stigg/resources/v1/subscriptions.rbi +102 -23
- data/rbi/stigg/resources/v1.rbi +2 -2
- data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
- data/sig/stigg/models/v1/coupon_create_response.rbs +4 -4
- data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
- data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +4 -4
- data/sig/stigg/models/v1/customer_list_params.rbs +11 -11
- data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
- data/sig/stigg/models/v1/subscription_create_params.rbs +2029 -5
- data/sig/stigg/models/v1/subscription_create_response.rbs +1022 -0
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_list_params.rbs +14 -14
- data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
- data/sig/stigg/models/v1/subscription_retrieve_response.rbs +31 -0
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +31 -0
- data/sig/stigg/models/v1_create_usage_params.rbs +15 -5
- data/sig/stigg/resources/v1/coupons.rbs +3 -3
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -10
- data/sig/stigg/resources/v1/customers.rbs +3 -5
- data/sig/stigg/resources/v1/subscriptions.rbs +19 -4
- metadata +2 -23
- data/lib/stigg/models/v1/customers/promotional_create_params.rb +0 -294
- data/lib/stigg/models/v1/customers/promotional_create_response.rb +0 -268
- data/lib/stigg/models/v1/customers/promotional_revoke_params.rb +0 -24
- data/lib/stigg/models/v1/customers/promotional_revoke_response.rb +0 -268
- data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
- data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
- data/lib/stigg/resources/v1/customers/promotional.rb +0 -69
- data/rbi/stigg/models/v1/customers/promotional_create_params.rbi +0 -639
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
- data/rbi/stigg/models/v1/customers/promotional_revoke_params.rbi +0 -42
- data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
- data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
- data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
- data/rbi/stigg/resources/v1/customers/promotional.rbi +0 -53
- data/sig/stigg/models/v1/customers/promotional_create_params.rbs +0 -234
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/promotional_revoke_params.rbs +0 -27
- data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
- data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
- data/sig/stigg/resources/v1/customers/promotional.rbs +0 -23
|
@@ -5,318 +5,302 @@ module Stigg
|
|
|
5
5
|
module V1
|
|
6
6
|
# @see Stigg::Resources::V1::Coupons#list
|
|
7
7
|
class CouponListResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# The unique identifier for the entity
|
|
9
10
|
#
|
|
10
|
-
# @return [
|
|
11
|
-
required :
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :id, String
|
|
12
13
|
|
|
13
|
-
# @!
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
# @!attribute amounts_off
|
|
15
|
+
# Fixed amount discounts in different currencies
|
|
16
|
+
#
|
|
17
|
+
# @return [Array<Stigg::Models::V1::CouponListResponse::AmountsOff>, nil]
|
|
18
|
+
required :amounts_off,
|
|
19
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::AmountsOff] },
|
|
20
|
+
api_name: :amountsOff,
|
|
21
|
+
nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute billing_id
|
|
24
|
+
# The unique identifier for the entity in the billing provider
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
required :billing_id, String, api_name: :billingId, nil?: true
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::Data::AmountsOff] },
|
|
29
|
-
api_name: :amountsOff,
|
|
30
|
-
nil?: true
|
|
29
|
+
# @!attribute billing_link_url
|
|
30
|
+
# The URL to the entity in the billing provider
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
required :billing_link_url, String, api_name: :billingLinkUrl, nil?: true
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
# @!attribute created_at
|
|
36
|
+
# Timestamp of when the record was created
|
|
37
|
+
#
|
|
38
|
+
# @return [Time]
|
|
39
|
+
required :created_at, Time, api_name: :createdAt
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
# @!attribute description
|
|
42
|
+
# Description of the coupon
|
|
43
|
+
#
|
|
44
|
+
# @return [String, nil]
|
|
45
|
+
required :description, String, nil?: true
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
# @!attribute duration_in_months
|
|
48
|
+
# Duration of the coupon validity in months
|
|
49
|
+
#
|
|
50
|
+
# @return [Float, nil]
|
|
51
|
+
required :duration_in_months, Float, api_name: :durationInMonths, nil?: true
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
# @!attribute name
|
|
54
|
+
# Name of the coupon
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
required :name, String
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
# @!attribute percent_off
|
|
60
|
+
# Percentage discount off the original price
|
|
61
|
+
#
|
|
62
|
+
# @return [Float, nil]
|
|
63
|
+
required :percent_off, Float, api_name: :percentOff, nil?: true
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
# @!attribute source
|
|
66
|
+
# The source of the coupon
|
|
67
|
+
#
|
|
68
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Source, nil]
|
|
69
|
+
required :source, enum: -> { Stigg::Models::V1::CouponListResponse::Source }, nil?: true
|
|
67
70
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
# @!attribute status
|
|
72
|
+
# Current status of the coupon
|
|
73
|
+
#
|
|
74
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Status]
|
|
75
|
+
required :status, enum: -> { Stigg::Models::V1::CouponListResponse::Status }
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
# @!attribute type
|
|
78
|
+
# Type of the coupon (percentage or fixed amount)
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Type]
|
|
81
|
+
required :type, enum: -> { Stigg::Models::V1::CouponListResponse::Type }
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
# @!attribute updated_at
|
|
84
|
+
# Timestamp of when the record was last updated
|
|
85
|
+
#
|
|
86
|
+
# @return [Time]
|
|
87
|
+
required :updated_at, Time, api_name: :updatedAt
|
|
85
88
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
# @!method initialize(id:, amounts_off:, billing_id:, billing_link_url:, created_at:, description:, duration_in_months:, name:, percent_off:, source:, status:, type:, updated_at:)
|
|
90
|
+
# Discount instrument with percentage or fixed amount
|
|
91
|
+
#
|
|
92
|
+
# @param id [String] The unique identifier for the entity
|
|
93
|
+
#
|
|
94
|
+
# @param amounts_off [Array<Stigg::Models::V1::CouponListResponse::AmountsOff>, nil] Fixed amount discounts in different currencies
|
|
95
|
+
#
|
|
96
|
+
# @param billing_id [String, nil] The unique identifier for the entity in the billing provider
|
|
97
|
+
#
|
|
98
|
+
# @param billing_link_url [String, nil] The URL to the entity in the billing provider
|
|
99
|
+
#
|
|
100
|
+
# @param created_at [Time] Timestamp of when the record was created
|
|
101
|
+
#
|
|
102
|
+
# @param description [String, nil] Description of the coupon
|
|
103
|
+
#
|
|
104
|
+
# @param duration_in_months [Float, nil] Duration of the coupon validity in months
|
|
105
|
+
#
|
|
106
|
+
# @param name [String] Name of the coupon
|
|
107
|
+
#
|
|
108
|
+
# @param percent_off [Float, nil] Percentage discount off the original price
|
|
109
|
+
#
|
|
110
|
+
# @param source [Symbol, Stigg::Models::V1::CouponListResponse::Source, nil] The source of the coupon
|
|
111
|
+
#
|
|
112
|
+
# @param status [Symbol, Stigg::Models::V1::CouponListResponse::Status] Current status of the coupon
|
|
113
|
+
#
|
|
114
|
+
# @param type [Symbol, Stigg::Models::V1::CouponListResponse::Type] Type of the coupon (percentage or fixed amount)
|
|
115
|
+
#
|
|
116
|
+
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
91
117
|
|
|
92
|
-
|
|
93
|
-
#
|
|
118
|
+
class AmountsOff < Stigg::Internal::Type::BaseModel
|
|
119
|
+
# @!attribute amount
|
|
120
|
+
# The price amount
|
|
94
121
|
#
|
|
95
|
-
# @return [
|
|
96
|
-
required :
|
|
122
|
+
# @return [Float]
|
|
123
|
+
required :amount, Float
|
|
97
124
|
|
|
98
|
-
# @!attribute
|
|
99
|
-
#
|
|
125
|
+
# @!attribute currency
|
|
126
|
+
# The price currency
|
|
100
127
|
#
|
|
101
|
-
# @return [
|
|
102
|
-
required :
|
|
128
|
+
# @return [Symbol, Stigg::Models::V1::CouponListResponse::AmountsOff::Currency]
|
|
129
|
+
required :currency, enum: -> { Stigg::Models::V1::CouponListResponse::AmountsOff::Currency }
|
|
103
130
|
|
|
104
|
-
# @!method initialize(
|
|
105
|
-
#
|
|
131
|
+
# @!method initialize(amount:, currency:)
|
|
132
|
+
# Monetary amount with currency
|
|
106
133
|
#
|
|
107
|
-
# @param
|
|
134
|
+
# @param amount [Float] The price amount
|
|
108
135
|
#
|
|
109
|
-
# @param
|
|
110
|
-
#
|
|
111
|
-
# @param billing_link_url [String, nil] The URL to the entity in the billing provider
|
|
112
|
-
#
|
|
113
|
-
# @param created_at [Time] Timestamp of when the record was created
|
|
114
|
-
#
|
|
115
|
-
# @param cursor_id [String] Cursor ID for query pagination
|
|
116
|
-
#
|
|
117
|
-
# @param description [String, nil] Description of the coupon
|
|
118
|
-
#
|
|
119
|
-
# @param duration_in_months [Float, nil] Duration of the coupon validity in months
|
|
120
|
-
#
|
|
121
|
-
# @param name [String] Name of the coupon
|
|
122
|
-
#
|
|
123
|
-
# @param percent_off [Float, nil] Percentage discount off the original price
|
|
124
|
-
#
|
|
125
|
-
# @param source [Symbol, Stigg::Models::V1::CouponListResponse::Data::Source, nil] The source of the coupon
|
|
126
|
-
#
|
|
127
|
-
# @param status [Symbol, Stigg::Models::V1::CouponListResponse::Data::Status] Current status of the coupon
|
|
128
|
-
#
|
|
129
|
-
# @param type [Symbol, Stigg::Models::V1::CouponListResponse::Data::Type] Type of the coupon (percentage or fixed amount)
|
|
130
|
-
#
|
|
131
|
-
# @param updated_at [Time] Timestamp of when the record was last updated
|
|
132
|
-
|
|
133
|
-
class AmountsOff < Stigg::Internal::Type::BaseModel
|
|
134
|
-
# @!attribute amount
|
|
135
|
-
# The price amount
|
|
136
|
-
#
|
|
137
|
-
# @return [Float]
|
|
138
|
-
required :amount, Float
|
|
139
|
-
|
|
140
|
-
# @!attribute currency
|
|
141
|
-
# The price currency
|
|
142
|
-
#
|
|
143
|
-
# @return [Symbol, Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency, nil]
|
|
144
|
-
required :currency,
|
|
145
|
-
enum: -> { Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency },
|
|
146
|
-
nil?: true
|
|
147
|
-
|
|
148
|
-
# @!method initialize(amount:, currency:)
|
|
149
|
-
# @param amount [Float] The price amount
|
|
150
|
-
#
|
|
151
|
-
# @param currency [Symbol, Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency, nil] The price currency
|
|
152
|
-
|
|
153
|
-
# The price currency
|
|
154
|
-
#
|
|
155
|
-
# @see Stigg::Models::V1::CouponListResponse::Data::AmountsOff#currency
|
|
156
|
-
module Currency
|
|
157
|
-
extend Stigg::Internal::Type::Enum
|
|
136
|
+
# @param currency [Symbol, Stigg::Models::V1::CouponListResponse::AmountsOff::Currency] The price currency
|
|
158
137
|
|
|
159
|
-
|
|
160
|
-
AED = :aed
|
|
161
|
-
ALL = :all
|
|
162
|
-
AMD = :amd
|
|
163
|
-
ANG = :ang
|
|
164
|
-
AUD = :aud
|
|
165
|
-
AWG = :awg
|
|
166
|
-
AZN = :azn
|
|
167
|
-
BAM = :bam
|
|
168
|
-
BBD = :bbd
|
|
169
|
-
BDT = :bdt
|
|
170
|
-
BGN = :bgn
|
|
171
|
-
BIF = :bif
|
|
172
|
-
BMD = :bmd
|
|
173
|
-
BND = :bnd
|
|
174
|
-
BSD = :bsd
|
|
175
|
-
BWP = :bwp
|
|
176
|
-
BYN = :byn
|
|
177
|
-
BZD = :bzd
|
|
178
|
-
BRL = :brl
|
|
179
|
-
CAD = :cad
|
|
180
|
-
CDF = :cdf
|
|
181
|
-
CHF = :chf
|
|
182
|
-
CNY = :cny
|
|
183
|
-
CZK = :czk
|
|
184
|
-
DKK = :dkk
|
|
185
|
-
DOP = :dop
|
|
186
|
-
DZD = :dzd
|
|
187
|
-
EGP = :egp
|
|
188
|
-
ETB = :etb
|
|
189
|
-
EUR = :eur
|
|
190
|
-
FJD = :fjd
|
|
191
|
-
GBP = :gbp
|
|
192
|
-
GEL = :gel
|
|
193
|
-
GIP = :gip
|
|
194
|
-
GMD = :gmd
|
|
195
|
-
GYD = :gyd
|
|
196
|
-
HKD = :hkd
|
|
197
|
-
HRK = :hrk
|
|
198
|
-
HTG = :htg
|
|
199
|
-
IDR = :idr
|
|
200
|
-
ILS = :ils
|
|
201
|
-
INR = :inr
|
|
202
|
-
ISK = :isk
|
|
203
|
-
JMD = :jmd
|
|
204
|
-
JPY = :jpy
|
|
205
|
-
KES = :kes
|
|
206
|
-
KGS = :kgs
|
|
207
|
-
KHR = :khr
|
|
208
|
-
KMF = :kmf
|
|
209
|
-
KRW = :krw
|
|
210
|
-
KYD = :kyd
|
|
211
|
-
KZT = :kzt
|
|
212
|
-
LBP = :lbp
|
|
213
|
-
LKR = :lkr
|
|
214
|
-
LRD = :lrd
|
|
215
|
-
LSL = :lsl
|
|
216
|
-
MAD = :mad
|
|
217
|
-
MDL = :mdl
|
|
218
|
-
MGA = :mga
|
|
219
|
-
MKD = :mkd
|
|
220
|
-
MMK = :mmk
|
|
221
|
-
MNT = :mnt
|
|
222
|
-
MOP = :mop
|
|
223
|
-
MRO = :mro
|
|
224
|
-
MVR = :mvr
|
|
225
|
-
MWK = :mwk
|
|
226
|
-
MXN = :mxn
|
|
227
|
-
MYR = :myr
|
|
228
|
-
MZN = :mzn
|
|
229
|
-
NAD = :nad
|
|
230
|
-
NGN = :ngn
|
|
231
|
-
NOK = :nok
|
|
232
|
-
NPR = :npr
|
|
233
|
-
NZD = :nzd
|
|
234
|
-
PGK = :pgk
|
|
235
|
-
PHP = :php
|
|
236
|
-
PKR = :pkr
|
|
237
|
-
PLN = :pln
|
|
238
|
-
QAR = :qar
|
|
239
|
-
RON = :ron
|
|
240
|
-
RSD = :rsd
|
|
241
|
-
RUB = :rub
|
|
242
|
-
RWF = :rwf
|
|
243
|
-
SAR = :sar
|
|
244
|
-
SBD = :sbd
|
|
245
|
-
SCR = :scr
|
|
246
|
-
SEK = :sek
|
|
247
|
-
SGD = :sgd
|
|
248
|
-
SLE = :sle
|
|
249
|
-
SLL = :sll
|
|
250
|
-
SOS = :sos
|
|
251
|
-
SZL = :szl
|
|
252
|
-
THB = :thb
|
|
253
|
-
TJS = :tjs
|
|
254
|
-
TOP = :top
|
|
255
|
-
TRY = :try
|
|
256
|
-
TTD = :ttd
|
|
257
|
-
TZS = :tzs
|
|
258
|
-
UAH = :uah
|
|
259
|
-
UZS = :uzs
|
|
260
|
-
VND = :vnd
|
|
261
|
-
VUV = :vuv
|
|
262
|
-
WST = :wst
|
|
263
|
-
XAF = :xaf
|
|
264
|
-
XCD = :xcd
|
|
265
|
-
YER = :yer
|
|
266
|
-
ZAR = :zar
|
|
267
|
-
ZMW = :zmw
|
|
268
|
-
CLP = :clp
|
|
269
|
-
DJF = :djf
|
|
270
|
-
GNF = :gnf
|
|
271
|
-
UGX = :ugx
|
|
272
|
-
PYG = :pyg
|
|
273
|
-
XOF = :xof
|
|
274
|
-
XPF = :xpf
|
|
275
|
-
|
|
276
|
-
# @!method self.values
|
|
277
|
-
# @return [Array<Symbol>]
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
# The source of the coupon
|
|
138
|
+
# The price currency
|
|
282
139
|
#
|
|
283
|
-
# @see Stigg::Models::V1::CouponListResponse::
|
|
284
|
-
module
|
|
140
|
+
# @see Stigg::Models::V1::CouponListResponse::AmountsOff#currency
|
|
141
|
+
module Currency
|
|
285
142
|
extend Stigg::Internal::Type::Enum
|
|
286
143
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
144
|
+
USD = :usd
|
|
145
|
+
AED = :aed
|
|
146
|
+
ALL = :all
|
|
147
|
+
AMD = :amd
|
|
148
|
+
ANG = :ang
|
|
149
|
+
AUD = :aud
|
|
150
|
+
AWG = :awg
|
|
151
|
+
AZN = :azn
|
|
152
|
+
BAM = :bam
|
|
153
|
+
BBD = :bbd
|
|
154
|
+
BDT = :bdt
|
|
155
|
+
BGN = :bgn
|
|
156
|
+
BIF = :bif
|
|
157
|
+
BMD = :bmd
|
|
158
|
+
BND = :bnd
|
|
159
|
+
BSD = :bsd
|
|
160
|
+
BWP = :bwp
|
|
161
|
+
BYN = :byn
|
|
162
|
+
BZD = :bzd
|
|
163
|
+
BRL = :brl
|
|
164
|
+
CAD = :cad
|
|
165
|
+
CDF = :cdf
|
|
166
|
+
CHF = :chf
|
|
167
|
+
CNY = :cny
|
|
168
|
+
CZK = :czk
|
|
169
|
+
DKK = :dkk
|
|
170
|
+
DOP = :dop
|
|
171
|
+
DZD = :dzd
|
|
172
|
+
EGP = :egp
|
|
173
|
+
ETB = :etb
|
|
174
|
+
EUR = :eur
|
|
175
|
+
FJD = :fjd
|
|
176
|
+
GBP = :gbp
|
|
177
|
+
GEL = :gel
|
|
178
|
+
GIP = :gip
|
|
179
|
+
GMD = :gmd
|
|
180
|
+
GYD = :gyd
|
|
181
|
+
HKD = :hkd
|
|
182
|
+
HRK = :hrk
|
|
183
|
+
HTG = :htg
|
|
184
|
+
IDR = :idr
|
|
185
|
+
ILS = :ils
|
|
186
|
+
INR = :inr
|
|
187
|
+
ISK = :isk
|
|
188
|
+
JMD = :jmd
|
|
189
|
+
JPY = :jpy
|
|
190
|
+
KES = :kes
|
|
191
|
+
KGS = :kgs
|
|
192
|
+
KHR = :khr
|
|
193
|
+
KMF = :kmf
|
|
194
|
+
KRW = :krw
|
|
195
|
+
KYD = :kyd
|
|
196
|
+
KZT = :kzt
|
|
197
|
+
LBP = :lbp
|
|
198
|
+
LKR = :lkr
|
|
199
|
+
LRD = :lrd
|
|
200
|
+
LSL = :lsl
|
|
201
|
+
MAD = :mad
|
|
202
|
+
MDL = :mdl
|
|
203
|
+
MGA = :mga
|
|
204
|
+
MKD = :mkd
|
|
205
|
+
MMK = :mmk
|
|
206
|
+
MNT = :mnt
|
|
207
|
+
MOP = :mop
|
|
208
|
+
MRO = :mro
|
|
209
|
+
MVR = :mvr
|
|
210
|
+
MWK = :mwk
|
|
211
|
+
MXN = :mxn
|
|
212
|
+
MYR = :myr
|
|
213
|
+
MZN = :mzn
|
|
214
|
+
NAD = :nad
|
|
215
|
+
NGN = :ngn
|
|
216
|
+
NOK = :nok
|
|
217
|
+
NPR = :npr
|
|
218
|
+
NZD = :nzd
|
|
219
|
+
PGK = :pgk
|
|
220
|
+
PHP = :php
|
|
221
|
+
PKR = :pkr
|
|
222
|
+
PLN = :pln
|
|
223
|
+
QAR = :qar
|
|
224
|
+
RON = :ron
|
|
225
|
+
RSD = :rsd
|
|
226
|
+
RUB = :rub
|
|
227
|
+
RWF = :rwf
|
|
228
|
+
SAR = :sar
|
|
229
|
+
SBD = :sbd
|
|
230
|
+
SCR = :scr
|
|
231
|
+
SEK = :sek
|
|
232
|
+
SGD = :sgd
|
|
233
|
+
SLE = :sle
|
|
234
|
+
SLL = :sll
|
|
235
|
+
SOS = :sos
|
|
236
|
+
SZL = :szl
|
|
237
|
+
THB = :thb
|
|
238
|
+
TJS = :tjs
|
|
239
|
+
TOP = :top
|
|
240
|
+
TRY = :try
|
|
241
|
+
TTD = :ttd
|
|
242
|
+
TZS = :tzs
|
|
243
|
+
UAH = :uah
|
|
244
|
+
UZS = :uzs
|
|
245
|
+
VND = :vnd
|
|
246
|
+
VUV = :vuv
|
|
247
|
+
WST = :wst
|
|
248
|
+
XAF = :xaf
|
|
249
|
+
XCD = :xcd
|
|
250
|
+
YER = :yer
|
|
251
|
+
ZAR = :zar
|
|
252
|
+
ZMW = :zmw
|
|
253
|
+
CLP = :clp
|
|
254
|
+
DJF = :djf
|
|
255
|
+
GNF = :gnf
|
|
256
|
+
UGX = :ugx
|
|
257
|
+
PYG = :pyg
|
|
258
|
+
XOF = :xof
|
|
259
|
+
XPF = :xpf
|
|
290
260
|
|
|
291
261
|
# @!method self.values
|
|
292
262
|
# @return [Array<Symbol>]
|
|
293
263
|
end
|
|
264
|
+
end
|
|
294
265
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
266
|
+
# The source of the coupon
|
|
267
|
+
#
|
|
268
|
+
# @see Stigg::Models::V1::CouponListResponse#source
|
|
269
|
+
module Source
|
|
270
|
+
extend Stigg::Internal::Type::Enum
|
|
300
271
|
|
|
301
|
-
|
|
302
|
-
|
|
272
|
+
STIGG = :STIGG
|
|
273
|
+
STIGG_ADHOC = :STIGG_ADHOC
|
|
274
|
+
STRIPE = :STRIPE
|
|
303
275
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
276
|
+
# @!method self.values
|
|
277
|
+
# @return [Array<Symbol>]
|
|
278
|
+
end
|
|
307
279
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
280
|
+
# Current status of the coupon
|
|
281
|
+
#
|
|
282
|
+
# @see Stigg::Models::V1::CouponListResponse#status
|
|
283
|
+
module Status
|
|
284
|
+
extend Stigg::Internal::Type::Enum
|
|
313
285
|
|
|
314
|
-
|
|
315
|
-
|
|
286
|
+
ACTIVE = :ACTIVE
|
|
287
|
+
ARCHIVED = :ARCHIVED
|
|
316
288
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
289
|
+
# @!method self.values
|
|
290
|
+
# @return [Array<Symbol>]
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Type of the coupon (percentage or fixed amount)
|
|
294
|
+
#
|
|
295
|
+
# @see Stigg::Models::V1::CouponListResponse#type
|
|
296
|
+
module Type
|
|
297
|
+
extend Stigg::Internal::Type::Enum
|
|
298
|
+
|
|
299
|
+
FIXED = :FIXED
|
|
300
|
+
PERCENTAGE = :PERCENTAGE
|
|
301
|
+
|
|
302
|
+
# @!method self.values
|
|
303
|
+
# @return [Array<Symbol>]
|
|
320
304
|
end
|
|
321
305
|
end
|
|
322
306
|
end
|
|
@@ -6,12 +6,15 @@ module Stigg
|
|
|
6
6
|
# @see Stigg::Resources::V1::Coupons#retrieve
|
|
7
7
|
class CouponRetrieveResponse < Stigg::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
|
+
# Discount instrument with percentage or fixed amount
|
|
9
10
|
#
|
|
10
11
|
# @return [Stigg::Models::V1::CouponRetrieveResponse::Data]
|
|
11
12
|
required :data, -> { Stigg::Models::V1::CouponRetrieveResponse::Data }
|
|
12
13
|
|
|
13
14
|
# @!method initialize(data:)
|
|
14
|
-
#
|
|
15
|
+
# Response object
|
|
16
|
+
#
|
|
17
|
+
# @param data [Stigg::Models::V1::CouponRetrieveResponse::Data] Discount instrument with percentage or fixed amount
|
|
15
18
|
|
|
16
19
|
# @see Stigg::Models::V1::CouponRetrieveResponse#data
|
|
17
20
|
class Data < Stigg::Internal::Type::BaseModel
|
|
@@ -97,6 +100,8 @@ module Stigg
|
|
|
97
100
|
required :updated_at, Time, api_name: :updatedAt
|
|
98
101
|
|
|
99
102
|
# @!method initialize(id:, amounts_off:, billing_id:, billing_link_url:, created_at:, description:, duration_in_months:, name:, percent_off:, source:, status:, type:, updated_at:)
|
|
103
|
+
# Discount instrument with percentage or fixed amount
|
|
104
|
+
#
|
|
100
105
|
# @param id [String] The unique identifier for the entity
|
|
101
106
|
#
|
|
102
107
|
# @param amounts_off [Array<Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff>, nil] Fixed amount discounts in different currencies
|
|
@@ -133,15 +138,15 @@ module Stigg
|
|
|
133
138
|
# @!attribute currency
|
|
134
139
|
# The price currency
|
|
135
140
|
#
|
|
136
|
-
# @return [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency
|
|
137
|
-
required :currency,
|
|
138
|
-
enum: -> { Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency },
|
|
139
|
-
nil?: true
|
|
141
|
+
# @return [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency]
|
|
142
|
+
required :currency, enum: -> { Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency }
|
|
140
143
|
|
|
141
144
|
# @!method initialize(amount:, currency:)
|
|
145
|
+
# Monetary amount with currency
|
|
146
|
+
#
|
|
142
147
|
# @param amount [Float] The price amount
|
|
143
148
|
#
|
|
144
|
-
# @param currency [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency
|
|
149
|
+
# @param currency [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency] The price currency
|
|
145
150
|
|
|
146
151
|
# The price currency
|
|
147
152
|
#
|
|
@@ -152,6 +152,8 @@ module Stigg
|
|
|
152
152
|
api_name: :vendorIdentifier
|
|
153
153
|
|
|
154
154
|
# @!method initialize(id:, synced_entity_id:, vendor_identifier:)
|
|
155
|
+
# External billing or CRM integration link
|
|
156
|
+
#
|
|
155
157
|
# @param id [String] Integration details
|
|
156
158
|
#
|
|
157
159
|
# @param synced_entity_id [String, nil] Synced entity id
|