wallee-ruby-sdk 2.2.3 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/wallee-ruby-sdk.rb +17 -5
- data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +99 -0
- data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
- data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
- data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
- data/lib/wallee-ruby-sdk/api/token_service_api.rb +126 -0
- data/lib/wallee-ruby-sdk/api_client.rb +5 -3
- data/lib/wallee-ruby-sdk/configuration.rb +2 -2
- data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/models/account.rb +31 -1
- data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
- data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
- data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
- data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
- data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
- data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
- data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +51 -7
- data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/shopify_subscription_address_create.rb +546 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +353 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +261 -0
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
- data/lib/wallee-ruby-sdk/models/space.rb +31 -1
- data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_charge.rb +48 -0
- data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +48 -0
- data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
- data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
- data/lib/wallee-ruby-sdk/models/transaction.rb +69 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
- data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/webhook_url.rb +24 -0
- data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
- data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/wallee-ruby-sdk.gemspec +3 -2
- metadata +45 -14
@@ -19,7 +19,7 @@ require 'date'
|
|
19
19
|
|
20
20
|
module Wallee
|
21
21
|
#
|
22
|
-
class
|
22
|
+
class ShopifySubscriptionModelItem
|
23
23
|
#
|
24
24
|
attr_accessor :price_including_tax
|
25
25
|
|
@@ -53,7 +53,7 @@ module Wallee
|
|
53
53
|
:'product_id' => :'Integer',
|
54
54
|
:'quantity' => :'Float',
|
55
55
|
:'recalculate_price' => :'BOOLEAN',
|
56
|
-
:'tax_lines' => :'Array<
|
56
|
+
:'tax_lines' => :'Array<ShopifySubscriptionModelTaxLine>'
|
57
57
|
}
|
58
58
|
end
|
59
59
|
|
@@ -53,9 +53,6 @@ module Wallee
|
|
53
53
|
#
|
54
54
|
attr_accessor :relative_price_adjustment
|
55
55
|
|
56
|
-
#
|
57
|
-
attr_accessor :state
|
58
|
-
|
59
56
|
# Define whether the order confirmation email of the Shopify shop is sent to the customer for recurring orders.
|
60
57
|
attr_accessor :store_order_confirmation_email_enabled
|
61
58
|
|
@@ -88,7 +85,6 @@ module Wallee
|
|
88
85
|
:'minimal_billing_cycles' => :'minimalBillingCycles',
|
89
86
|
:'pricing_option' => :'pricingOption',
|
90
87
|
:'relative_price_adjustment' => :'relativePriceAdjustment',
|
91
|
-
:'state' => :'state',
|
92
88
|
:'store_order_confirmation_email_enabled' => :'storeOrderConfirmationEmailEnabled',
|
93
89
|
:'subscriber_suspension_allowed' => :'subscriberSuspensionAllowed',
|
94
90
|
:'termination_billing_cycles' => :'terminationBillingCycles',
|
@@ -112,7 +108,6 @@ module Wallee
|
|
112
108
|
:'minimal_billing_cycles' => :'Integer',
|
113
109
|
:'pricing_option' => :'ShopifySubscriptionProductPricingOption',
|
114
110
|
:'relative_price_adjustment' => :'Float',
|
115
|
-
:'state' => :'ShopifySubscriptionProductState',
|
116
111
|
:'store_order_confirmation_email_enabled' => :'BOOLEAN',
|
117
112
|
:'subscriber_suspension_allowed' => :'BOOLEAN',
|
118
113
|
:'termination_billing_cycles' => :'Integer',
|
@@ -174,10 +169,6 @@ module Wallee
|
|
174
169
|
self.relative_price_adjustment = attributes[:'relativePriceAdjustment']
|
175
170
|
end
|
176
171
|
|
177
|
-
if attributes.has_key?(:'state')
|
178
|
-
self.state = attributes[:'state']
|
179
|
-
end
|
180
|
-
|
181
172
|
if attributes.has_key?(:'storeOrderConfirmationEmailEnabled')
|
182
173
|
self.store_order_confirmation_email_enabled = attributes[:'storeOrderConfirmationEmailEnabled']
|
183
174
|
end
|
@@ -207,22 +198,27 @@ module Wallee
|
|
207
198
|
# @return Array for valid properties with the reasons
|
208
199
|
def list_invalid_properties
|
209
200
|
invalid_properties = Array.new
|
210
|
-
if @
|
211
|
-
invalid_properties.push('invalid value for "
|
201
|
+
if @product_id.nil?
|
202
|
+
invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
|
212
203
|
end
|
213
204
|
|
214
205
|
if @product_variant_id.nil?
|
215
206
|
invalid_properties.push('invalid value for "product_variant_id", product_variant_id cannot be nil.')
|
216
207
|
end
|
217
208
|
|
209
|
+
if @shop.nil?
|
210
|
+
invalid_properties.push('invalid value for "shop", shop cannot be nil.')
|
211
|
+
end
|
212
|
+
|
218
213
|
invalid_properties
|
219
214
|
end
|
220
215
|
|
221
216
|
# Check to see if the all the properties in the model are valid
|
222
217
|
# @return true if the model is valid
|
223
218
|
def valid?
|
224
|
-
return false if @
|
219
|
+
return false if @product_id.nil?
|
225
220
|
return false if @product_variant_id.nil?
|
221
|
+
return false if @shop.nil?
|
226
222
|
true
|
227
223
|
end
|
228
224
|
|
@@ -242,7 +238,6 @@ module Wallee
|
|
242
238
|
minimal_billing_cycles == o.minimal_billing_cycles &&
|
243
239
|
pricing_option == o.pricing_option &&
|
244
240
|
relative_price_adjustment == o.relative_price_adjustment &&
|
245
|
-
state == o.state &&
|
246
241
|
store_order_confirmation_email_enabled == o.store_order_confirmation_email_enabled &&
|
247
242
|
subscriber_suspension_allowed == o.subscriber_suspension_allowed &&
|
248
243
|
termination_billing_cycles == o.termination_billing_cycles &&
|
@@ -260,7 +255,7 @@ module Wallee
|
|
260
255
|
# Calculates hash code according to all attributes.
|
261
256
|
# @return [Fixnum] Hash code
|
262
257
|
def hash
|
263
|
-
[absolute_price_adjustment, billing_day_of_month, billing_interval_amount, billing_interval_unit, billing_weekday, fixed_price, maximal_billing_cycles, maximal_suspendable_cycles, minimal_billing_cycles, pricing_option, relative_price_adjustment,
|
258
|
+
[absolute_price_adjustment, billing_day_of_month, billing_interval_amount, billing_interval_unit, billing_weekday, fixed_price, maximal_billing_cycles, maximal_suspendable_cycles, minimal_billing_cycles, pricing_option, relative_price_adjustment, store_order_confirmation_email_enabled, subscriber_suspension_allowed, termination_billing_cycles, product_id, product_variant_id, shop].hash
|
264
259
|
end
|
265
260
|
|
266
261
|
# Builds the object from hash
|
@@ -19,7 +19,7 @@ require 'date'
|
|
19
19
|
|
20
20
|
module Wallee
|
21
21
|
#
|
22
|
-
class
|
22
|
+
class ShopifySubscriptionProductUpdate
|
23
23
|
#
|
24
24
|
attr_accessor :absolute_price_adjustment
|
25
25
|
|
@@ -53,9 +53,6 @@ module Wallee
|
|
53
53
|
#
|
54
54
|
attr_accessor :relative_price_adjustment
|
55
55
|
|
56
|
-
#
|
57
|
-
attr_accessor :state
|
58
|
-
|
59
56
|
# Define whether the order confirmation email of the Shopify shop is sent to the customer for recurring orders.
|
60
57
|
attr_accessor :store_order_confirmation_email_enabled
|
61
58
|
|
@@ -85,7 +82,6 @@ module Wallee
|
|
85
82
|
:'minimal_billing_cycles' => :'minimalBillingCycles',
|
86
83
|
:'pricing_option' => :'pricingOption',
|
87
84
|
:'relative_price_adjustment' => :'relativePriceAdjustment',
|
88
|
-
:'state' => :'state',
|
89
85
|
:'store_order_confirmation_email_enabled' => :'storeOrderConfirmationEmailEnabled',
|
90
86
|
:'subscriber_suspension_allowed' => :'subscriberSuspensionAllowed',
|
91
87
|
:'termination_billing_cycles' => :'terminationBillingCycles',
|
@@ -108,7 +104,6 @@ module Wallee
|
|
108
104
|
:'minimal_billing_cycles' => :'Integer',
|
109
105
|
:'pricing_option' => :'ShopifySubscriptionProductPricingOption',
|
110
106
|
:'relative_price_adjustment' => :'Float',
|
111
|
-
:'state' => :'ShopifySubscriptionProductState',
|
112
107
|
:'store_order_confirmation_email_enabled' => :'BOOLEAN',
|
113
108
|
:'subscriber_suspension_allowed' => :'BOOLEAN',
|
114
109
|
:'termination_billing_cycles' => :'Integer',
|
@@ -169,10 +164,6 @@ module Wallee
|
|
169
164
|
self.relative_price_adjustment = attributes[:'relativePriceAdjustment']
|
170
165
|
end
|
171
166
|
|
172
|
-
if attributes.has_key?(:'state')
|
173
|
-
self.state = attributes[:'state']
|
174
|
-
end
|
175
|
-
|
176
167
|
if attributes.has_key?(:'storeOrderConfirmationEmailEnabled')
|
177
168
|
self.store_order_confirmation_email_enabled = attributes[:'storeOrderConfirmationEmailEnabled']
|
178
169
|
end
|
@@ -233,7 +224,6 @@ module Wallee
|
|
233
224
|
minimal_billing_cycles == o.minimal_billing_cycles &&
|
234
225
|
pricing_option == o.pricing_option &&
|
235
226
|
relative_price_adjustment == o.relative_price_adjustment &&
|
236
|
-
state == o.state &&
|
237
227
|
store_order_confirmation_email_enabled == o.store_order_confirmation_email_enabled &&
|
238
228
|
subscriber_suspension_allowed == o.subscriber_suspension_allowed &&
|
239
229
|
termination_billing_cycles == o.termination_billing_cycles &&
|
@@ -250,7 +240,7 @@ module Wallee
|
|
250
240
|
# Calculates hash code according to all attributes.
|
251
241
|
# @return [Fixnum] Hash code
|
252
242
|
def hash
|
253
|
-
[absolute_price_adjustment, billing_day_of_month, billing_interval_amount, billing_interval_unit, billing_weekday, fixed_price, maximal_billing_cycles, maximal_suspendable_cycles, minimal_billing_cycles, pricing_option, relative_price_adjustment,
|
243
|
+
[absolute_price_adjustment, billing_day_of_month, billing_interval_amount, billing_interval_unit, billing_weekday, fixed_price, maximal_billing_cycles, maximal_suspendable_cycles, minimal_billing_cycles, pricing_option, relative_price_adjustment, store_order_confirmation_email_enabled, subscriber_suspension_allowed, termination_billing_cycles, id, version].hash
|
254
244
|
end
|
255
245
|
|
256
246
|
# Builds the object from hash
|
@@ -0,0 +1,211 @@
|
|
1
|
+
=begin
|
2
|
+
The wallee API allows an easy interaction with the wallee web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module Wallee
|
21
|
+
#
|
22
|
+
class ShopifySubscriptionUpdateAddressesRequest
|
23
|
+
#
|
24
|
+
attr_accessor :billing_address
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :id
|
28
|
+
|
29
|
+
#
|
30
|
+
attr_accessor :shipping_address
|
31
|
+
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
33
|
+
def self.attribute_map
|
34
|
+
{
|
35
|
+
:'billing_address' => :'billingAddress',
|
36
|
+
:'id' => :'id',
|
37
|
+
:'shipping_address' => :'shippingAddress'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.swagger_types
|
43
|
+
{
|
44
|
+
:'billing_address' => :'ShopifySubscriptionAddressCreate',
|
45
|
+
:'id' => :'Integer',
|
46
|
+
:'shipping_address' => :'ShopifySubscriptionAddressCreate'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'billingAddress')
|
59
|
+
self.billing_address = attributes[:'billingAddress']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'id')
|
63
|
+
self.id = attributes[:'id']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'shippingAddress')
|
67
|
+
self.shipping_address = attributes[:'shippingAddress']
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
+
# @return Array for valid properties with the reasons
|
73
|
+
def list_invalid_properties
|
74
|
+
invalid_properties = Array.new
|
75
|
+
invalid_properties
|
76
|
+
end
|
77
|
+
|
78
|
+
# Check to see if the all the properties in the model are valid
|
79
|
+
# @return true if the model is valid
|
80
|
+
def valid?
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
billing_address == o.billing_address &&
|
90
|
+
id == o.id &&
|
91
|
+
shipping_address == o.shipping_address
|
92
|
+
end
|
93
|
+
|
94
|
+
# @see the `==` method
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def eql?(o)
|
97
|
+
self == o
|
98
|
+
end
|
99
|
+
|
100
|
+
# Calculates hash code according to all attributes.
|
101
|
+
# @return [Fixnum] Hash code
|
102
|
+
def hash
|
103
|
+
[billing_address, id, shipping_address].hash
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.swagger_types.each_pair do |key, type|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
113
|
+
# check to ensure the input is an array given that the attribute
|
114
|
+
# is documented as an array but the input is not
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
116
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
117
|
+
end
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
119
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :BOOLEAN
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
temp_model = Wallee.const_get(type).new
|
164
|
+
temp_model.build_from_hash(value)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# Returns the string representation of the object
|
169
|
+
# @return [String] String presentation of the object
|
170
|
+
def to_s
|
171
|
+
to_hash.to_s
|
172
|
+
end
|
173
|
+
|
174
|
+
# to_body is an alias to to_hash (backward compatibility)
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_body
|
177
|
+
to_hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the object in the form of hash
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
182
|
+
def to_hash
|
183
|
+
hash = {}
|
184
|
+
self.class.attribute_map.each_pair do |attr, param|
|
185
|
+
value = self.send(attr)
|
186
|
+
next if value.nil?
|
187
|
+
hash[param] = _to_hash(value)
|
188
|
+
end
|
189
|
+
hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Outputs non-array value in the form of hash
|
193
|
+
# For object, use to_hash. Otherwise, just return the value
|
194
|
+
# @param [Object] value Any valid value
|
195
|
+
# @return [Hash] Returns the value in the form of hash
|
196
|
+
def _to_hash(value)
|
197
|
+
if value.is_a?(Array)
|
198
|
+
value.compact.map{ |v| _to_hash(v) }
|
199
|
+
elsif value.is_a?(Hash)
|
200
|
+
{}.tap do |hash|
|
201
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
202
|
+
end
|
203
|
+
elsif value.respond_to? :to_hash
|
204
|
+
value.to_hash
|
205
|
+
else
|
206
|
+
value
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
211
|
+
end
|
@@ -20,17 +20,8 @@ require 'date'
|
|
20
20
|
module Wallee
|
21
21
|
#
|
22
22
|
class ShopifySubscriptionUpdateRequest
|
23
|
-
# Define the day of the month on which the recurring orders should be created.
|
24
|
-
attr_accessor :billing_day_of_month
|
25
|
-
|
26
23
|
#
|
27
|
-
attr_accessor :
|
28
|
-
|
29
|
-
# Define how frequently recurring orders should be created.
|
30
|
-
attr_accessor :billing_interval_unit
|
31
|
-
|
32
|
-
# Define the weekday on which the recurring orders should be created.
|
33
|
-
attr_accessor :billing_weekday
|
24
|
+
attr_accessor :billing_configuration
|
34
25
|
|
35
26
|
#
|
36
27
|
attr_accessor :id
|
@@ -38,57 +29,31 @@ module Wallee
|
|
38
29
|
#
|
39
30
|
attr_accessor :items
|
40
31
|
|
41
|
-
# Define the maximum number of orders the subscription will run for.
|
42
|
-
attr_accessor :maximal_billing_cycles
|
43
|
-
|
44
|
-
# Define the maximum number of orders the subscription can be suspended for at a time.
|
45
|
-
attr_accessor :maximal_suspendable_cycles
|
46
|
-
|
47
|
-
# Define the minimal number of orders the subscription will run for.
|
48
|
-
attr_accessor :minimal_billing_cycles
|
49
|
-
|
50
32
|
#
|
51
33
|
attr_accessor :store_order_confirmation_email_enabled
|
52
34
|
|
53
35
|
#
|
54
36
|
attr_accessor :subscriber_suspension_allowed
|
55
37
|
|
56
|
-
# Define the number of orders the subscription will keep running for after its termination has been requested.
|
57
|
-
attr_accessor :termination_billing_cycles
|
58
|
-
|
59
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
39
|
def self.attribute_map
|
61
40
|
{
|
62
|
-
:'
|
63
|
-
:'billing_interval_amount' => :'billingIntervalAmount',
|
64
|
-
:'billing_interval_unit' => :'billingIntervalUnit',
|
65
|
-
:'billing_weekday' => :'billingWeekday',
|
41
|
+
:'billing_configuration' => :'billingConfiguration',
|
66
42
|
:'id' => :'id',
|
67
43
|
:'items' => :'items',
|
68
|
-
:'maximal_billing_cycles' => :'maximalBillingCycles',
|
69
|
-
:'maximal_suspendable_cycles' => :'maximalSuspendableCycles',
|
70
|
-
:'minimal_billing_cycles' => :'minimalBillingCycles',
|
71
44
|
:'store_order_confirmation_email_enabled' => :'storeOrderConfirmationEmailEnabled',
|
72
|
-
:'subscriber_suspension_allowed' => :'subscriberSuspensionAllowed'
|
73
|
-
:'termination_billing_cycles' => :'terminationBillingCycles'
|
45
|
+
:'subscriber_suspension_allowed' => :'subscriberSuspensionAllowed'
|
74
46
|
}
|
75
47
|
end
|
76
48
|
|
77
49
|
# Attribute type mapping.
|
78
50
|
def self.swagger_types
|
79
51
|
{
|
80
|
-
:'
|
81
|
-
:'billing_interval_amount' => :'Integer',
|
82
|
-
:'billing_interval_unit' => :'ShopifySubscriptionBillingIntervalUnit',
|
83
|
-
:'billing_weekday' => :'ShopifySubscriptionWeekday',
|
52
|
+
:'billing_configuration' => :'ShopifySubscriptionModelBillingConfiguration',
|
84
53
|
:'id' => :'Integer',
|
85
|
-
:'items' => :'Array<
|
86
|
-
:'maximal_billing_cycles' => :'Integer',
|
87
|
-
:'maximal_suspendable_cycles' => :'Integer',
|
88
|
-
:'minimal_billing_cycles' => :'Integer',
|
54
|
+
:'items' => :'Array<ShopifySubscriptionModelItem>',
|
89
55
|
:'store_order_confirmation_email_enabled' => :'BOOLEAN',
|
90
|
-
:'subscriber_suspension_allowed' => :'BOOLEAN'
|
91
|
-
:'termination_billing_cycles' => :'Integer'
|
56
|
+
:'subscriber_suspension_allowed' => :'BOOLEAN'
|
92
57
|
}
|
93
58
|
end
|
94
59
|
|
@@ -100,20 +65,8 @@ module Wallee
|
|
100
65
|
# convert string to symbol for hash key
|
101
66
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
102
67
|
|
103
|
-
if attributes.has_key?(:'
|
104
|
-
self.
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.has_key?(:'billingIntervalAmount')
|
108
|
-
self.billing_interval_amount = attributes[:'billingIntervalAmount']
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.has_key?(:'billingIntervalUnit')
|
112
|
-
self.billing_interval_unit = attributes[:'billingIntervalUnit']
|
113
|
-
end
|
114
|
-
|
115
|
-
if attributes.has_key?(:'billingWeekday')
|
116
|
-
self.billing_weekday = attributes[:'billingWeekday']
|
68
|
+
if attributes.has_key?(:'billingConfiguration')
|
69
|
+
self.billing_configuration = attributes[:'billingConfiguration']
|
117
70
|
end
|
118
71
|
|
119
72
|
if attributes.has_key?(:'id')
|
@@ -126,18 +79,6 @@ module Wallee
|
|
126
79
|
end
|
127
80
|
end
|
128
81
|
|
129
|
-
if attributes.has_key?(:'maximalBillingCycles')
|
130
|
-
self.maximal_billing_cycles = attributes[:'maximalBillingCycles']
|
131
|
-
end
|
132
|
-
|
133
|
-
if attributes.has_key?(:'maximalSuspendableCycles')
|
134
|
-
self.maximal_suspendable_cycles = attributes[:'maximalSuspendableCycles']
|
135
|
-
end
|
136
|
-
|
137
|
-
if attributes.has_key?(:'minimalBillingCycles')
|
138
|
-
self.minimal_billing_cycles = attributes[:'minimalBillingCycles']
|
139
|
-
end
|
140
|
-
|
141
82
|
if attributes.has_key?(:'storeOrderConfirmationEmailEnabled')
|
142
83
|
self.store_order_confirmation_email_enabled = attributes[:'storeOrderConfirmationEmailEnabled']
|
143
84
|
end
|
@@ -145,10 +86,6 @@ module Wallee
|
|
145
86
|
if attributes.has_key?(:'subscriberSuspensionAllowed')
|
146
87
|
self.subscriber_suspension_allowed = attributes[:'subscriberSuspensionAllowed']
|
147
88
|
end
|
148
|
-
|
149
|
-
if attributes.has_key?(:'terminationBillingCycles')
|
150
|
-
self.termination_billing_cycles = attributes[:'terminationBillingCycles']
|
151
|
-
end
|
152
89
|
end
|
153
90
|
|
154
91
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -169,18 +106,11 @@ module Wallee
|
|
169
106
|
def ==(o)
|
170
107
|
return true if self.equal?(o)
|
171
108
|
self.class == o.class &&
|
172
|
-
|
173
|
-
billing_interval_amount == o.billing_interval_amount &&
|
174
|
-
billing_interval_unit == o.billing_interval_unit &&
|
175
|
-
billing_weekday == o.billing_weekday &&
|
109
|
+
billing_configuration == o.billing_configuration &&
|
176
110
|
id == o.id &&
|
177
111
|
items == o.items &&
|
178
|
-
maximal_billing_cycles == o.maximal_billing_cycles &&
|
179
|
-
maximal_suspendable_cycles == o.maximal_suspendable_cycles &&
|
180
|
-
minimal_billing_cycles == o.minimal_billing_cycles &&
|
181
112
|
store_order_confirmation_email_enabled == o.store_order_confirmation_email_enabled &&
|
182
|
-
subscriber_suspension_allowed == o.subscriber_suspension_allowed
|
183
|
-
termination_billing_cycles == o.termination_billing_cycles
|
113
|
+
subscriber_suspension_allowed == o.subscriber_suspension_allowed
|
184
114
|
end
|
185
115
|
|
186
116
|
# @see the `==` method
|
@@ -192,7 +122,7 @@ module Wallee
|
|
192
122
|
# Calculates hash code according to all attributes.
|
193
123
|
# @return [Fixnum] Hash code
|
194
124
|
def hash
|
195
|
-
[
|
125
|
+
[billing_configuration, id, items, store_order_confirmation_email_enabled, subscriber_suspension_allowed].hash
|
196
126
|
end
|
197
127
|
|
198
128
|
# Builds the object from hash
|