wallee-ruby-sdk 2.2.3 → 3.0.5

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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/lib/wallee-ruby-sdk.rb +63 -8
  5. data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
  6. data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
  7. data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
  8. data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
  9. data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
  10. data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
  11. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
  12. data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
  13. data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
  14. data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
  15. data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
  16. data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  17. data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
  18. data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
  19. data/lib/wallee-ruby-sdk/api/token_service_api.rb +189 -0
  20. data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
  21. data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
  22. data/lib/wallee-ruby-sdk/api_client.rb +7 -4
  23. data/lib/wallee-ruby-sdk/configuration.rb +2 -2
  24. data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
  25. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
  26. data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
  27. data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
  28. data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
  29. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
  30. data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
  31. data/lib/wallee-ruby-sdk/models/account.rb +31 -1
  32. data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
  33. data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
  34. data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
  35. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
  36. data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
  37. data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
  38. data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
  39. data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
  40. data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
  41. data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
  42. data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
  43. data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
  44. data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
  45. data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
  46. data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
  47. data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
  48. data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
  49. data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
  50. data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
  51. data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
  52. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
  53. data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
  54. data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
  55. data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +1 -1
  56. data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +1 -1
  57. data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
  58. data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
  59. data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
  60. data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
  61. data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
  62. data/lib/wallee-ruby-sdk/models/payment_contract.rb +1 -25
  63. data/lib/wallee-ruby-sdk/models/payment_link.rb +16 -40
  64. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
  65. data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
  66. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +16 -44
  67. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
  68. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
  69. data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
  70. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
  71. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -22
  72. data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
  73. data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
  74. data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
  75. data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
  76. data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
  77. data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
  78. data/lib/wallee-ruby-sdk/models/role.rb +1 -1
  79. data/lib/wallee-ruby-sdk/models/role_state.rb +37 -0
  80. data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
  81. data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  82. data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
  83. data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  84. data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
  85. data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +1 -1
  86. data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
  87. data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  88. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +61 -7
  89. data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
  90. data/lib/wallee-ruby-sdk/models/{payment_terminal_contact_address.rb → shopify_subscription_address_create.rb} +152 -2
  91. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
  92. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
  93. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
  94. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
  95. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
  96. data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
  97. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  98. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
  99. data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
  100. data/lib/wallee-ruby-sdk/models/space.rb +31 -1
  101. data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
  102. data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
  103. data/lib/wallee-ruby-sdk/models/subscriber.rb +1 -1
  104. data/lib/wallee-ruby-sdk/models/subscriber_create.rb +1 -1
  105. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  106. data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +1 -25
  107. data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +1 -29
  108. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +1 -25
  109. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +1 -25
  110. data/lib/wallee-ruby-sdk/models/subscription_charge.rb +49 -1
  111. data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +49 -1
  112. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
  113. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +12 -2
  114. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +1 -1
  115. data/lib/wallee-ruby-sdk/models/subscription_product.rb +11 -1
  116. data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +11 -1
  117. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
  118. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
  119. data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +11 -1
  120. data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
  121. data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
  122. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
  123. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
  124. data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
  125. data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
  126. data/lib/wallee-ruby-sdk/models/token.rb +1 -25
  127. data/lib/wallee-ruby-sdk/models/token_create.rb +1 -29
  128. data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
  129. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
  130. data/lib/wallee-ruby-sdk/models/transaction.rb +132 -4
  131. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
  132. data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  133. data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
  134. data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
  135. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
  136. data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
  137. data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
  138. data/lib/wallee-ruby-sdk/models/webhook_url.rb +35 -1
  139. data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
  140. data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
  141. data/lib/wallee-ruby-sdk/version.rb +1 -1
  142. data/test/condition_type_service_test.rb +22 -0
  143. data/wallee-ruby-sdk.gemspec +3 -2
  144. metadata +93 -17
@@ -20,7 +20,7 @@ require 'json'
20
20
  require 'logger'
21
21
  require 'tempfile'
22
22
  require 'typhoeus'
23
- require 'uri'
23
+ require 'addressable/uri'
24
24
  require 'base64'
25
25
  require 'time'
26
26
  require 'openssl'
@@ -71,7 +71,7 @@ module Wallee
71
71
  :message => response.return_message)
72
72
  else
73
73
  fail ApiError.new(:code => response.code,
74
- :response_headers => response.headers,
74
+ :response_headers => response.headers.to_h,
75
75
  :response_body => response.body),
76
76
  response.status_message
77
77
  end
@@ -108,6 +108,8 @@ module Wallee
108
108
 
109
109
  header_params = header_params.merge(get_authentication_headers(http_method, path, query_params))
110
110
 
111
+
112
+
111
113
  req_opts = {
112
114
  :method => http_method,
113
115
  :headers => header_params,
@@ -145,7 +147,8 @@ module Wallee
145
147
  # @return [Hash] the authentication headers
146
148
  def get_authentication_headers(http_method, path, query)
147
149
  base_url = URI(@config.base_url)
148
- completed_path = "#{base_url.path}#{path}"+'?'+query.map{|k,v| "#{k}=#{v}"}.join('&')
150
+ completed_path = "#{base_url.path}#{path}"
151
+ completed_path += "?" + query.map{|k,v| "#{k}=#{v}"}.join('&') unless query.empty?
149
152
  version = "1"
150
153
  timestamp = Time.now.to_i
151
154
  securedData = "#{version}|#{@config.user_id}|#{timestamp}|#{http_method.upcase}|#{completed_path}"
@@ -292,7 +295,7 @@ module Wallee
292
295
  def build_request_url(path)
293
296
  # Add leading and trailing slashes to path
294
297
  path = "/#{path}".gsub(/\/+/, '/')
295
- URI.encode(@config.base_url + path)
298
+ Addressable::URI.encode(@config.base_url + path)
296
299
  end
297
300
 
298
301
  # Builds the HTTP request body
@@ -15,7 +15,7 @@ limitations under the License.
15
15
 
16
16
  =end
17
17
 
18
- require 'uri'
18
+ require 'addressable/uri'
19
19
 
20
20
  module Wallee
21
21
  class Configuration
@@ -133,7 +133,7 @@ module Wallee
133
133
 
134
134
  def base_url
135
135
  url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
136
- URI.encode(url)
136
+ Addressable::URI.encode(url)
137
137
  end
138
138
 
139
139
  end
@@ -19,6 +19,9 @@ require 'date'
19
19
 
20
20
  module Wallee
21
21
  class AbstractAccountUpdate
22
+ #
23
+ attr_accessor :last_modified_date
24
+
22
25
  # The name of the account identifies the account within the administrative interface.
23
26
  attr_accessor :name
24
27
 
@@ -28,6 +31,7 @@ module Wallee
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
34
+ :'last_modified_date' => :'lastModifiedDate',
31
35
  :'name' => :'name',
32
36
  :'subaccount_limit' => :'subaccountLimit'
33
37
  }
@@ -36,6 +40,7 @@ module Wallee
36
40
  # Attribute type mapping.
37
41
  def self.swagger_types
38
42
  {
43
+ :'last_modified_date' => :'DateTime',
39
44
  :'name' => :'String',
40
45
  :'subaccount_limit' => :'Integer'
41
46
  }
@@ -49,6 +54,10 @@ module Wallee
49
54
  # convert string to symbol for hash key
50
55
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
56
 
57
+ if attributes.has_key?(:'lastModifiedDate')
58
+ self.last_modified_date = attributes[:'lastModifiedDate']
59
+ end
60
+
52
61
  if attributes.has_key?(:'name')
53
62
  self.name = attributes[:'name']
54
63
  end
@@ -100,6 +109,7 @@ module Wallee
100
109
  def ==(o)
101
110
  return true if self.equal?(o)
102
111
  self.class == o.class &&
112
+ last_modified_date == o.last_modified_date &&
103
113
  name == o.name &&
104
114
  subaccount_limit == o.subaccount_limit
105
115
  end
@@ -113,7 +123,7 @@ module Wallee
113
123
  # Calculates hash code according to all attributes.
114
124
  # @return [Fixnum] Hash code
115
125
  def hash
116
- [name, subaccount_limit].hash
126
+ [last_modified_date, name, subaccount_limit].hash
117
127
  end
118
128
 
119
129
  # Builds the object from hash
@@ -31,8 +31,8 @@ module Wallee
31
31
  # The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction.
32
32
  attr_accessor :available_until
33
33
 
34
- # By making the billing address required the transaction can only be created when a billing address is provided within the request.
35
- attr_accessor :billing_address_required
34
+ # The billing address handling mode controls if the address is collected or not and how it is collected.
35
+ attr_accessor :billing_address_handling_mode
36
36
 
37
37
  # The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'.
38
38
  attr_accessor :currency
@@ -49,8 +49,8 @@ module Wallee
49
49
  # The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive.
50
50
  attr_accessor :name
51
51
 
52
- # By making the shipping address required the transaction can only be created when a shipping address is provided within the request.
53
- attr_accessor :shipping_address_required
52
+ # The shipping address handling mode controls if the address is collected or not and how it is collected.
53
+ attr_accessor :shipping_address_handling_mode
54
54
 
55
55
  # Attribute mapping from ruby-style variable name to JSON key.
56
56
  def self.attribute_map
@@ -59,13 +59,13 @@ module Wallee
59
59
  :'applied_space_view' => :'appliedSpaceView',
60
60
  :'available_from' => :'availableFrom',
61
61
  :'available_until' => :'availableUntil',
62
- :'billing_address_required' => :'billingAddressRequired',
62
+ :'billing_address_handling_mode' => :'billingAddressHandlingMode',
63
63
  :'currency' => :'currency',
64
64
  :'language' => :'language',
65
65
  :'line_items' => :'lineItems',
66
66
  :'maximal_number_of_transactions' => :'maximalNumberOfTransactions',
67
67
  :'name' => :'name',
68
- :'shipping_address_required' => :'shippingAddressRequired'
68
+ :'shipping_address_handling_mode' => :'shippingAddressHandlingMode'
69
69
  }
70
70
  end
71
71
 
@@ -76,13 +76,13 @@ module Wallee
76
76
  :'applied_space_view' => :'Integer',
77
77
  :'available_from' => :'DateTime',
78
78
  :'available_until' => :'DateTime',
79
- :'billing_address_required' => :'BOOLEAN',
79
+ :'billing_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
80
80
  :'currency' => :'String',
81
81
  :'language' => :'String',
82
82
  :'line_items' => :'Array<LineItemCreate>',
83
83
  :'maximal_number_of_transactions' => :'Integer',
84
84
  :'name' => :'String',
85
- :'shipping_address_required' => :'BOOLEAN'
85
+ :'shipping_address_handling_mode' => :'PaymentLinkAddressHandlingMode'
86
86
  }
87
87
  end
88
88
 
@@ -112,8 +112,8 @@ module Wallee
112
112
  self.available_until = attributes[:'availableUntil']
113
113
  end
114
114
 
115
- if attributes.has_key?(:'billingAddressRequired')
116
- self.billing_address_required = attributes[:'billingAddressRequired']
115
+ if attributes.has_key?(:'billingAddressHandlingMode')
116
+ self.billing_address_handling_mode = attributes[:'billingAddressHandlingMode']
117
117
  end
118
118
 
119
119
  if attributes.has_key?(:'currency')
@@ -138,8 +138,8 @@ module Wallee
138
138
  self.name = attributes[:'name']
139
139
  end
140
140
 
141
- if attributes.has_key?(:'shippingAddressRequired')
142
- self.shipping_address_required = attributes[:'shippingAddressRequired']
141
+ if attributes.has_key?(:'shippingAddressHandlingMode')
142
+ self.shipping_address_handling_mode = attributes[:'shippingAddressHandlingMode']
143
143
  end
144
144
  end
145
145
 
@@ -180,13 +180,13 @@ module Wallee
180
180
  applied_space_view == o.applied_space_view &&
181
181
  available_from == o.available_from &&
182
182
  available_until == o.available_until &&
183
- billing_address_required == o.billing_address_required &&
183
+ billing_address_handling_mode == o.billing_address_handling_mode &&
184
184
  currency == o.currency &&
185
185
  language == o.language &&
186
186
  line_items == o.line_items &&
187
187
  maximal_number_of_transactions == o.maximal_number_of_transactions &&
188
188
  name == o.name &&
189
- shipping_address_required == o.shipping_address_required
189
+ shipping_address_handling_mode == o.shipping_address_handling_mode
190
190
  end
191
191
 
192
192
  # @see the `==` method
@@ -198,7 +198,7 @@ module Wallee
198
198
  # Calculates hash code according to all attributes.
199
199
  # @return [Fixnum] Hash code
200
200
  def hash
201
- [allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_required, currency, language, line_items, maximal_number_of_transactions, name, shipping_address_required].hash
201
+ [allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_handling_mode, currency, language, line_items, maximal_number_of_transactions, name, shipping_address_handling_mode].hash
202
202
  end
203
203
 
204
204
  # Builds the object from hash
@@ -18,7 +18,7 @@ limitations under the License.
18
18
  require 'date'
19
19
 
20
20
  module Wallee
21
- class AbstractShopifySubscriptionProductActive
21
+ class AbstractShopifySubscriptionProductUpdate
22
22
  #
23
23
  attr_accessor :absolute_price_adjustment
24
24
 
@@ -52,9 +52,6 @@ module Wallee
52
52
  #
53
53
  attr_accessor :relative_price_adjustment
54
54
 
55
- #
56
- attr_accessor :state
57
-
58
55
  # Define whether the order confirmation email of the Shopify shop is sent to the customer for recurring orders.
59
56
  attr_accessor :store_order_confirmation_email_enabled
60
57
 
@@ -78,7 +75,6 @@ module Wallee
78
75
  :'minimal_billing_cycles' => :'minimalBillingCycles',
79
76
  :'pricing_option' => :'pricingOption',
80
77
  :'relative_price_adjustment' => :'relativePriceAdjustment',
81
- :'state' => :'state',
82
78
  :'store_order_confirmation_email_enabled' => :'storeOrderConfirmationEmailEnabled',
83
79
  :'subscriber_suspension_allowed' => :'subscriberSuspensionAllowed',
84
80
  :'termination_billing_cycles' => :'terminationBillingCycles'
@@ -99,7 +95,6 @@ module Wallee
99
95
  :'minimal_billing_cycles' => :'Integer',
100
96
  :'pricing_option' => :'ShopifySubscriptionProductPricingOption',
101
97
  :'relative_price_adjustment' => :'Float',
102
- :'state' => :'ShopifySubscriptionProductState',
103
98
  :'store_order_confirmation_email_enabled' => :'BOOLEAN',
104
99
  :'subscriber_suspension_allowed' => :'BOOLEAN',
105
100
  :'termination_billing_cycles' => :'Integer'
@@ -158,10 +153,6 @@ module Wallee
158
153
  self.relative_price_adjustment = attributes[:'relativePriceAdjustment']
159
154
  end
160
155
 
161
- if attributes.has_key?(:'state')
162
- self.state = attributes[:'state']
163
- end
164
-
165
156
  if attributes.has_key?(:'storeOrderConfirmationEmailEnabled')
166
157
  self.store_order_confirmation_email_enabled = attributes[:'storeOrderConfirmationEmailEnabled']
167
158
  end
@@ -204,7 +195,6 @@ module Wallee
204
195
  minimal_billing_cycles == o.minimal_billing_cycles &&
205
196
  pricing_option == o.pricing_option &&
206
197
  relative_price_adjustment == o.relative_price_adjustment &&
207
- state == o.state &&
208
198
  store_order_confirmation_email_enabled == o.store_order_confirmation_email_enabled &&
209
199
  subscriber_suspension_allowed == o.subscriber_suspension_allowed &&
210
200
  termination_billing_cycles == o.termination_billing_cycles
@@ -219,7 +209,7 @@ module Wallee
219
209
  # Calculates hash code according to all attributes.
220
210
  # @return [Fixnum] Hash code
221
211
  def hash
222
- [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, state, store_order_confirmation_email_enabled, subscriber_suspension_allowed, termination_billing_cycles].hash
212
+ [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].hash
223
213
  end
224
214
 
225
215
  # Builds the object from hash
@@ -19,6 +19,9 @@ require 'date'
19
19
 
20
20
  module Wallee
21
21
  class AbstractSpaceUpdate
22
+ #
23
+ attr_accessor :last_modified_date
24
+
22
25
  # The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive.
23
26
  attr_accessor :name
24
27
 
@@ -43,6 +46,7 @@ module Wallee
43
46
  # Attribute mapping from ruby-style variable name to JSON key.
44
47
  def self.attribute_map
45
48
  {
49
+ :'last_modified_date' => :'lastModifiedDate',
46
50
  :'name' => :'name',
47
51
  :'postal_address' => :'postalAddress',
48
52
  :'primary_currency' => :'primaryCurrency',
@@ -56,6 +60,7 @@ module Wallee
56
60
  # Attribute type mapping.
57
61
  def self.swagger_types
58
62
  {
63
+ :'last_modified_date' => :'DateTime',
59
64
  :'name' => :'String',
60
65
  :'postal_address' => :'SpaceAddressCreate',
61
66
  :'primary_currency' => :'String',
@@ -74,6 +79,10 @@ module Wallee
74
79
  # convert string to symbol for hash key
75
80
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
76
81
 
82
+ if attributes.has_key?(:'lastModifiedDate')
83
+ self.last_modified_date = attributes[:'lastModifiedDate']
84
+ end
85
+
77
86
  if attributes.has_key?(:'name')
78
87
  self.name = attributes[:'name']
79
88
  end
@@ -147,6 +156,7 @@ module Wallee
147
156
  def ==(o)
148
157
  return true if self.equal?(o)
149
158
  self.class == o.class &&
159
+ last_modified_date == o.last_modified_date &&
150
160
  name == o.name &&
151
161
  postal_address == o.postal_address &&
152
162
  primary_currency == o.primary_currency &&
@@ -165,7 +175,7 @@ module Wallee
165
175
  # Calculates hash code according to all attributes.
166
176
  # @return [Fixnum] Hash code
167
177
  def hash
168
- [name, postal_address, primary_currency, request_limit, state, technical_contact_addresses, time_zone].hash
178
+ [last_modified_date, name, postal_address, primary_currency, request_limit, state, technical_contact_addresses, time_zone].hash
169
179
  end
170
180
 
171
181
  # Builds the object from hash
@@ -28,6 +28,9 @@ module Wallee
28
28
  # The product name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive.
29
29
  attr_accessor :name
30
30
 
31
+ # Marks the product as locked. Meaning that customer can not change away from this product or change to this product later on.
32
+ attr_accessor :product_locked
33
+
31
34
  # The sort order controls in which order the product is listed. The sort order is used to order the products in ascending order.
32
35
  attr_accessor :sort_order
33
36
 
@@ -40,6 +43,7 @@ module Wallee
40
43
  :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
41
44
  :'failed_payment_suspension_period' => :'failedPaymentSuspensionPeriod',
42
45
  :'name' => :'name',
46
+ :'product_locked' => :'productLocked',
43
47
  :'sort_order' => :'sortOrder',
44
48
  :'state' => :'state'
45
49
  }
@@ -51,6 +55,7 @@ module Wallee
51
55
  :'allowed_payment_method_configurations' => :'Array<Integer>',
52
56
  :'failed_payment_suspension_period' => :'String',
53
57
  :'name' => :'String',
58
+ :'product_locked' => :'BOOLEAN',
54
59
  :'sort_order' => :'Integer',
55
60
  :'state' => :'SubscriptionProductState'
56
61
  }
@@ -78,6 +83,10 @@ module Wallee
78
83
  self.name = attributes[:'name']
79
84
  end
80
85
 
86
+ if attributes.has_key?(:'productLocked')
87
+ self.product_locked = attributes[:'productLocked']
88
+ end
89
+
81
90
  if attributes.has_key?(:'sortOrder')
82
91
  self.sort_order = attributes[:'sortOrder']
83
92
  end
@@ -123,6 +132,7 @@ module Wallee
123
132
  allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
124
133
  failed_payment_suspension_period == o.failed_payment_suspension_period &&
125
134
  name == o.name &&
135
+ product_locked == o.product_locked &&
126
136
  sort_order == o.sort_order &&
127
137
  state == o.state
128
138
  end
@@ -136,7 +146,7 @@ module Wallee
136
146
  # Calculates hash code according to all attributes.
137
147
  # @return [Fixnum] Hash code
138
148
  def hash
139
- [allowed_payment_method_configurations, failed_payment_suspension_period, name, sort_order, state].hash
149
+ [allowed_payment_method_configurations, failed_payment_suspension_period, name, product_locked, sort_order, state].hash
140
150
  end
141
151
 
142
152
  # Builds the object from hash
@@ -28,6 +28,9 @@ module Wallee
28
28
  #
29
29
  attr_accessor :billing_address
30
30
 
31
+ # The completion behavior controls when the transaction is completed.
32
+ attr_accessor :completion_behavior
33
+
31
34
  #
32
35
  attr_accessor :currency
33
36
 
@@ -79,6 +82,7 @@ module Wallee
79
82
  :'allowed_payment_method_brands' => :'allowedPaymentMethodBrands',
80
83
  :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
81
84
  :'billing_address' => :'billingAddress',
85
+ :'completion_behavior' => :'completionBehavior',
82
86
  :'currency' => :'currency',
83
87
  :'customer_email_address' => :'customerEmailAddress',
84
88
  :'customer_id' => :'customerId',
@@ -103,6 +107,7 @@ module Wallee
103
107
  :'allowed_payment_method_brands' => :'Array<PaymentMethodBrand>',
104
108
  :'allowed_payment_method_configurations' => :'Array<Integer>',
105
109
  :'billing_address' => :'AddressCreate',
110
+ :'completion_behavior' => :'TransactionCompletionBehavior',
106
111
  :'currency' => :'String',
107
112
  :'customer_email_address' => :'String',
108
113
  :'customer_id' => :'String',
@@ -145,6 +150,10 @@ module Wallee
145
150
  self.billing_address = attributes[:'billingAddress']
146
151
  end
147
152
 
153
+ if attributes.has_key?(:'completionBehavior')
154
+ self.completion_behavior = attributes[:'completionBehavior']
155
+ end
156
+
148
157
  if attributes.has_key?(:'currency')
149
158
  self.currency = attributes[:'currency']
150
159
  end
@@ -218,6 +227,14 @@ module Wallee
218
227
  invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 254.')
219
228
  end
220
229
 
230
+ if !@failed_url.nil? && @failed_url.to_s.length > 1000
231
+ invalid_properties.push('invalid value for "failed_url", the character length must be smaller than or equal to 1000.')
232
+ end
233
+
234
+ if !@failed_url.nil? && @failed_url.to_s.length < 9
235
+ invalid_properties.push('invalid value for "failed_url", the character length must be great than or equal to 9.')
236
+ end
237
+
221
238
  if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
222
239
  invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
223
240
  end
@@ -230,6 +247,14 @@ module Wallee
230
247
  invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 200.')
231
248
  end
232
249
 
250
+ if !@success_url.nil? && @success_url.to_s.length > 1000
251
+ invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 1000.')
252
+ end
253
+
254
+ if !@success_url.nil? && @success_url.to_s.length < 9
255
+ invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 9.')
256
+ end
257
+
233
258
  invalid_properties
234
259
  end
235
260
 
@@ -237,9 +262,13 @@ module Wallee
237
262
  # @return true if the model is valid
238
263
  def valid?
239
264
  return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
265
+ return false if !@failed_url.nil? && @failed_url.to_s.length > 1000
266
+ return false if !@failed_url.nil? && @failed_url.to_s.length < 9
240
267
  return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
241
268
  return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
242
269
  return false if !@shipping_method.nil? && @shipping_method.to_s.length > 200
270
+ return false if !@success_url.nil? && @success_url.to_s.length > 1000
271
+ return false if !@success_url.nil? && @success_url.to_s.length < 9
243
272
  true
244
273
  end
245
274
 
@@ -253,6 +282,20 @@ module Wallee
253
282
  @customer_email_address = customer_email_address
254
283
  end
255
284
 
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] failed_url Value to be assigned
287
+ def failed_url=(failed_url)
288
+ if !failed_url.nil? && failed_url.to_s.length > 1000
289
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be smaller than or equal to 1000.'
290
+ end
291
+
292
+ if !failed_url.nil? && failed_url.to_s.length < 9
293
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be great than or equal to 9.'
294
+ end
295
+
296
+ @failed_url = failed_url
297
+ end
298
+
256
299
  # Custom attribute writer method with validation
257
300
  # @param [Object] invoice_merchant_reference Value to be assigned
258
301
  def invoice_merchant_reference=(invoice_merchant_reference)
@@ -283,6 +326,20 @@ module Wallee
283
326
  @shipping_method = shipping_method
284
327
  end
285
328
 
329
+ # Custom attribute writer method with validation
330
+ # @param [Object] success_url Value to be assigned
331
+ def success_url=(success_url)
332
+ if !success_url.nil? && success_url.to_s.length > 1000
333
+ fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 1000.'
334
+ end
335
+
336
+ if !success_url.nil? && success_url.to_s.length < 9
337
+ fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 9.'
338
+ end
339
+
340
+ @success_url = success_url
341
+ end
342
+
286
343
  # Checks equality by comparing each attribute.
287
344
  # @param [Object] Object to be compared
288
345
  def ==(o)
@@ -291,6 +348,7 @@ module Wallee
291
348
  allowed_payment_method_brands == o.allowed_payment_method_brands &&
292
349
  allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
293
350
  billing_address == o.billing_address &&
351
+ completion_behavior == o.completion_behavior &&
294
352
  currency == o.currency &&
295
353
  customer_email_address == o.customer_email_address &&
296
354
  customer_id == o.customer_id &&
@@ -317,7 +375,7 @@ module Wallee
317
375
  # Calculates hash code according to all attributes.
318
376
  # @return [Fixnum] Hash code
319
377
  def hash
320
- [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode].hash
378
+ [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, completion_behavior, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode].hash
321
379
  end
322
380
 
323
381
  # Builds the object from hash