ultracart_api 3.10.14 → 3.10.17

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