ultracart_api 3.3.2 → 3.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -4
  3. data/docs/ConfigurationApi.md +756 -0
  4. data/docs/DelayAutoOrdersResponse.md +12 -0
  5. data/docs/IntegrationLogApi.md +51 -0
  6. data/docs/IntegrationLogSummary.md +16 -0
  7. data/docs/IntegrationLogSummaryQueryRequest.md +9 -0
  8. data/docs/IntegrationLogSummaryQueryResponse.md +12 -0
  9. data/docs/OrderChannelPartner.md +1 -0
  10. data/docs/PaymentsConfiguration.md +23 -0
  11. data/docs/PaymentsConfigurationAffirm.md +15 -0
  12. data/docs/PaymentsConfigurationAmazon.md +15 -0
  13. data/docs/PaymentsConfigurationCOD.md +13 -0
  14. data/docs/PaymentsConfigurationCash.md +9 -0
  15. data/docs/PaymentsConfigurationCheck.md +25 -0
  16. data/docs/PaymentsConfigurationCreditCard.md +16 -0
  17. data/docs/PaymentsConfigurationLoanHero.md +12 -0
  18. data/docs/PaymentsConfigurationPayPal.md +36 -0
  19. data/docs/PaymentsConfigurationPurchaseOrder.md +11 -0
  20. data/docs/PaymentsConfigurationQuoteRequest.md +10 -0
  21. data/docs/PaymentsConfigurationResponse.md +12 -0
  22. data/docs/PaymentsConfigurationRestrictions.md +19 -0
  23. data/docs/PaymentsConfigurationSezzle.md +15 -0
  24. data/docs/PaymentsConfigurationWePay.md +35 -0
  25. data/docs/PaymentsConfigurationWireTransfer.md +18 -0
  26. data/docs/PaymentsThemeTransactionType.md +10 -0
  27. data/docs/PaymentsWepayEnroll.md +22 -0
  28. data/docs/RotatingTransactionGateway.md +50 -0
  29. data/docs/RotatingTransactionGatewayResponse.md +12 -0
  30. data/docs/RotatingTransactionGatewaysResponse.md +12 -0
  31. data/docs/RtgCurrency.md +10 -0
  32. data/docs/RtgDayOfMonthRestriction.md +9 -0
  33. data/docs/RtgDayOfWeekRestriction.md +10 -0
  34. data/docs/RtgSummaryGateway.md +24 -0
  35. data/docs/RtgSummaryResponse.md +14 -0
  36. data/docs/RtgThemeRestriction.md +10 -0
  37. data/docs/StripeConnectResponse.md +12 -0
  38. data/docs/TransactionGateway.md +71 -0
  39. data/docs/TransactionGatewaysRequest.md +10 -0
  40. data/docs/TransactionGatewaysResponse.md +12 -0
  41. data/lib/ultracart_api.rb +36 -0
  42. data/lib/ultracart_api/api/configuration_api.rb +843 -0
  43. data/lib/ultracart_api/api/integration_log_api.rb +55 -0
  44. data/lib/ultracart_api/models/delay_auto_orders_response.rb +221 -0
  45. data/lib/ultracart_api/models/integration_log_summary.rb +256 -0
  46. data/lib/ultracart_api/models/integration_log_summary_query_request.rb +195 -0
  47. data/lib/ultracart_api/models/integration_log_summary_query_response.rb +223 -0
  48. data/lib/ultracart_api/models/order_channel_partner.rb +11 -1
  49. data/lib/ultracart_api/models/payments_configuration.rb +319 -0
  50. data/lib/ultracart_api/models/payments_configuration_affirm.rb +247 -0
  51. data/lib/ultracart_api/models/payments_configuration_amazon.rb +247 -0
  52. data/lib/ultracart_api/models/payments_configuration_cash.rb +193 -0
  53. data/lib/ultracart_api/models/payments_configuration_check.rb +337 -0
  54. data/lib/ultracart_api/models/payments_configuration_cod.rb +229 -0
  55. data/lib/ultracart_api/models/payments_configuration_credit_card.rb +256 -0
  56. data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +220 -0
  57. data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +436 -0
  58. data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +211 -0
  59. data/lib/ultracart_api/models/payments_configuration_quote_request.rb +202 -0
  60. data/lib/ultracart_api/models/payments_configuration_response.rb +221 -0
  61. data/lib/ultracart_api/models/payments_configuration_restrictions.rb +283 -0
  62. data/lib/ultracart_api/models/payments_configuration_sezzle.rb +247 -0
  63. data/lib/ultracart_api/models/payments_configuration_we_pay.rb +427 -0
  64. data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +274 -0
  65. data/lib/ultracart_api/models/payments_theme_transaction_type.rb +239 -0
  66. data/lib/ultracart_api/models/payments_wepay_enroll.rb +310 -0
  67. data/lib/ultracart_api/models/rotating_transaction_gateway.rb +665 -0
  68. data/lib/ultracart_api/models/rotating_transaction_gateway_response.rb +221 -0
  69. data/lib/ultracart_api/models/rotating_transaction_gateways_response.rb +223 -0
  70. data/lib/ultracart_api/models/rtg_currency.rb +205 -0
  71. data/lib/ultracart_api/models/rtg_day_of_month_restriction.rb +195 -0
  72. data/lib/ultracart_api/models/rtg_day_of_week_restriction.rb +205 -0
  73. data/lib/ultracart_api/models/rtg_summary_gateway.rb +329 -0
  74. data/lib/ultracart_api/models/rtg_summary_response.rb +240 -0
  75. data/lib/ultracart_api/models/rtg_theme_restriction.rb +239 -0
  76. data/lib/ultracart_api/models/stripe_connect_response.rb +221 -0
  77. data/lib/ultracart_api/models/transaction_gateway.rb +823 -0
  78. data/lib/ultracart_api/models/transaction_gateways_request.rb +242 -0
  79. data/lib/ultracart_api/models/transaction_gateways_response.rb +223 -0
  80. data/lib/ultracart_api/version.rb +1 -1
  81. metadata +74 -2
@@ -0,0 +1,240 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class RtgSummaryResponse
17
+ attr_accessor :gateways
18
+
19
+ attr_accessor :info_message
20
+
21
+ attr_accessor :migration_rtg_code
22
+
23
+ attr_accessor :migration_single_gateway_name
24
+
25
+ attr_accessor :show_delay_auto_orders
26
+
27
+ attr_accessor :show_migration
28
+
29
+ attr_accessor :warning
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'gateways' => :'gateways',
35
+ :'info_message' => :'info_message',
36
+ :'migration_rtg_code' => :'migration_rtg_code',
37
+ :'migration_single_gateway_name' => :'migration_single_gateway_name',
38
+ :'show_delay_auto_orders' => :'show_delay_auto_orders',
39
+ :'show_migration' => :'show_migration',
40
+ :'warning' => :'warning'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'gateways' => :'Array<RtgSummaryGateway>',
48
+ :'info_message' => :'String',
49
+ :'migration_rtg_code' => :'String',
50
+ :'migration_single_gateway_name' => :'String',
51
+ :'show_delay_auto_orders' => :'BOOLEAN',
52
+ :'show_migration' => :'BOOLEAN',
53
+ :'warning' => :'String'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
+
65
+ if attributes.has_key?(:'gateways')
66
+ if (value = attributes[:'gateways']).is_a?(Array)
67
+ self.gateways = value
68
+ end
69
+ end
70
+
71
+ if attributes.has_key?(:'info_message')
72
+ self.info_message = attributes[:'info_message']
73
+ end
74
+
75
+ if attributes.has_key?(:'migration_rtg_code')
76
+ self.migration_rtg_code = attributes[:'migration_rtg_code']
77
+ end
78
+
79
+ if attributes.has_key?(:'migration_single_gateway_name')
80
+ self.migration_single_gateway_name = attributes[:'migration_single_gateway_name']
81
+ end
82
+
83
+ if attributes.has_key?(:'show_delay_auto_orders')
84
+ self.show_delay_auto_orders = attributes[:'show_delay_auto_orders']
85
+ end
86
+
87
+ if attributes.has_key?(:'show_migration')
88
+ self.show_migration = attributes[:'show_migration']
89
+ end
90
+
91
+ if attributes.has_key?(:'warning')
92
+ self.warning = attributes[:'warning']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ gateways == o.gateways &&
115
+ info_message == o.info_message &&
116
+ migration_rtg_code == o.migration_rtg_code &&
117
+ migration_single_gateway_name == o.migration_single_gateway_name &&
118
+ show_delay_auto_orders == o.show_delay_auto_orders &&
119
+ show_migration == o.show_migration &&
120
+ warning == o.warning
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Fixnum] Hash code
131
+ def hash
132
+ [gateways, info_message, migration_rtg_code, migration_single_gateway_name, show_delay_auto_orders, show_migration, warning].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ self.class.swagger_types.each_pair do |key, type|
141
+ if type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :DateTime
162
+ DateTime.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :BOOLEAN
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ temp_model = UltracartClient.const_get(type).new
193
+ temp_model.build_from_hash(value)
194
+ end
195
+ end
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # to_body is an alias to to_hash (backward compatibility)
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_body
206
+ to_hash
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ next if value.nil?
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+ end
@@ -0,0 +1,239 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class RtgThemeRestriction
17
+ # Any restriction for this theme
18
+ attr_accessor :restriction
19
+
20
+ # The server name for this theme. This will not be populated for legacy (ancient) themes
21
+ attr_accessor :storefront_host_name
22
+
23
+ # Human friendly short code for this theme
24
+ attr_accessor :theme_code
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'restriction' => :'restriction',
52
+ :'storefront_host_name' => :'storefront_host_name',
53
+ :'theme_code' => :'theme_code'
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.swagger_types
59
+ {
60
+ :'restriction' => :'String',
61
+ :'storefront_host_name' => :'String',
62
+ :'theme_code' => :'String'
63
+ }
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ return unless attributes.is_a?(Hash)
70
+
71
+ # convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
+
74
+ if attributes.has_key?(:'restriction')
75
+ self.restriction = attributes[:'restriction']
76
+ end
77
+
78
+ if attributes.has_key?(:'storefront_host_name')
79
+ self.storefront_host_name = attributes[:'storefront_host_name']
80
+ end
81
+
82
+ if attributes.has_key?(:'theme_code')
83
+ self.theme_code = attributes[:'theme_code']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ restriction_validator = EnumAttributeValidator.new('String', ['invalid', 'valid', 'validOnly'])
98
+ return false unless restriction_validator.valid?(@restriction)
99
+ true
100
+ end
101
+
102
+ # Custom attribute writer method checking allowed values (enum).
103
+ # @param [Object] restriction Object to be assigned
104
+ def restriction=(restriction)
105
+ validator = EnumAttributeValidator.new('String', ['invalid', 'valid', 'validOnly'])
106
+ unless validator.valid?(restriction)
107
+ fail ArgumentError, 'invalid value for "restriction", must be one of #{validator.allowable_values}.'
108
+ end
109
+ @restriction = restriction
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ restriction == o.restriction &&
118
+ storefront_host_name == o.storefront_host_name &&
119
+ theme_code == o.theme_code
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Fixnum] Hash code
130
+ def hash
131
+ [restriction, storefront_host_name, theme_code].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ self.class.swagger_types.each_pair do |key, type|
140
+ if type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
144
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
+ end
146
+ elsif !attributes[self.class.attribute_map[key]].nil?
147
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
149
+ end
150
+
151
+ self
152
+ end
153
+
154
+ # Deserializes the data based on type
155
+ # @param string type Data type
156
+ # @param string value Value to be deserialized
157
+ # @return [Object] Deserialized data
158
+ def _deserialize(type, value)
159
+ case type.to_sym
160
+ when :DateTime
161
+ DateTime.parse(value)
162
+ when :Date
163
+ Date.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :BOOLEAN
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ temp_model = UltracartClient.const_get(type).new
192
+ temp_model.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ next if value.nil?
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+ end