ultracart_api 3.4.7 → 3.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d32ebd5e5e349c6349a42f8ca2d21db241e7a6a10caeeea5d0ea2b475b93802
4
- data.tar.gz: d104fa317a4fd655526dfefac7a7ea16ee1ab1a0809bdcf3e0b0029d569d6c45
3
+ metadata.gz: 3ed08df224672f5ccb9e51e33798e90b6b51eefdaee4cecf9acf764686d384cb
4
+ data.tar.gz: a46c58ac67e47d643bf6fae2a44a486e0653a176e77f99ada4c8f78a20349285
5
5
  SHA512:
6
- metadata.gz: a3bc3f7707db8b4f13f2e6716ee70b12ffa6e4105f2e94ebd0d5e414b631e0ff1865d255d8f121d0a0dc5a33abad88ec9b0d6c329e95398b4a42049dcc5ee3b2
7
- data.tar.gz: b49103cb03613a3f0a33ded21fcbc185a6021a6ea00d4ca81c90471578206b4e2bd845007b8a12164e99c5694fcdb6a8a7242358c4acf0ae216980f250af705b
6
+ metadata.gz: 0cae0d62e529766fa80105b3d0fc218efb527297984f793c4aa36ad29c9090d423d7ec977eb8521bf212d353e7f79acef9440f3f07222f53b41574b36ceafc22
7
+ data.tar.gz: 3bfd17116a097f8f0938609704f9cab2d05a69ca33fd4bd3a8c17e87f4d5b3bca6d237847e470ce51b9239d9169f3869af29c190f387df169b82f13e6151cb6d
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.4.7
10
+ - Package version: 3.4.8
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.4.7.gem
27
+ gem install ./ultracart_api-3.4.8.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.4.7.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.4.8.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.4.7'
35
+ gem 'ultracart_api', '~> 3.4.8'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -899,7 +899,9 @@ Class | Method | HTTP request | Description
899
899
  - [UltracartClient::PaymentsConfigurationCash](docs/PaymentsConfigurationCash.md)
900
900
  - [UltracartClient::PaymentsConfigurationCheck](docs/PaymentsConfigurationCheck.md)
901
901
  - [UltracartClient::PaymentsConfigurationCreditCard](docs/PaymentsConfigurationCreditCard.md)
902
+ - [UltracartClient::PaymentsConfigurationEcheck](docs/PaymentsConfigurationEcheck.md)
902
903
  - [UltracartClient::PaymentsConfigurationLoanHero](docs/PaymentsConfigurationLoanHero.md)
904
+ - [UltracartClient::PaymentsConfigurationMoneyOrder](docs/PaymentsConfigurationMoneyOrder.md)
903
905
  - [UltracartClient::PaymentsConfigurationPayPal](docs/PaymentsConfigurationPayPal.md)
904
906
  - [UltracartClient::PaymentsConfigurationPurchaseOrder](docs/PaymentsConfigurationPurchaseOrder.md)
905
907
  - [UltracartClient::PaymentsConfigurationQuoteRequest](docs/PaymentsConfigurationQuoteRequest.md)
@@ -1107,6 +1109,7 @@ Not every change is committed to every SDK.
1107
1109
 
1108
1110
  | Version | Date | Comments |
1109
1111
  | --: | :-: | --- |
1112
+ | 3.4.8 | 08/04/2021 | configuration api - payments config refactoring |
1110
1113
  | 3.4.7 | 08/04/2021 | esp folders for lists/segments |
1111
1114
  | 3.4.5 | 08/03/2021 | configuration api bug fix for a bad response object on updateRotatingTransactionGateway |
1112
1115
  | 3.4.3 | 08/03/2021 | package tracking - add event_iso_date and event_timezone_id |
@@ -9,7 +9,9 @@ Name | Type | Description | Notes
9
9
  **check** | [**PaymentsConfigurationCheck**](PaymentsConfigurationCheck.md) | | [optional]
10
10
  **cod** | [**PaymentsConfigurationCOD**](PaymentsConfigurationCOD.md) | | [optional]
11
11
  **credit_card** | [**PaymentsConfigurationCreditCard**](PaymentsConfigurationCreditCard.md) | | [optional]
12
+ **e_check** | [**PaymentsConfigurationEcheck**](PaymentsConfigurationEcheck.md) | | [optional]
12
13
  **loan_hero** | [**PaymentsConfigurationLoanHero**](PaymentsConfigurationLoanHero.md) | | [optional]
14
+ **money_order** | [**PaymentsConfigurationMoneyOrder**](PaymentsConfigurationMoneyOrder.md) | | [optional]
13
15
  **pay_pal** | [**PaymentsConfigurationPayPal**](PaymentsConfigurationPayPal.md) | | [optional]
14
16
  **purchase_order** | [**PaymentsConfigurationPurchaseOrder**](PaymentsConfigurationPurchaseOrder.md) | | [optional]
15
17
  **quote_request** | [**PaymentsConfigurationQuoteRequest**](PaymentsConfigurationQuoteRequest.md) | | [optional]
@@ -4,13 +4,9 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **accept_check_orders** | **BOOLEAN** | | [optional]
7
- **accept_e_check** | **BOOLEAN** | | [optional]
8
- **accept_money_orders** | **BOOLEAN** | | [optional]
9
7
  **check_accounting_code** | **String** | | [optional]
10
8
  **check_deposit_to_account** | **String** | | [optional]
11
9
  **checks_payable_to** | **String** | | [optional]
12
- **e_check_accounting_code** | **String** | | [optional]
13
- **e_check_deposit_to_account** | **String** | | [optional]
14
10
  **mail_to_address1** | **String** | | [optional]
15
11
  **mail_to_address2** | **String** | | [optional]
16
12
  **mail_to_city** | **String** | | [optional]
@@ -0,0 +1,11 @@
1
+ # UltracartClient::PaymentsConfigurationEcheck
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **accept_e_check** | **BOOLEAN** | | [optional]
7
+ **e_check_accounting_code** | **String** | | [optional]
8
+ **e_check_deposit_to_account** | **String** | | [optional]
9
+ **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # UltracartClient::PaymentsConfigurationMoneyOrder
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **accept_money_orders** | **BOOLEAN** | | [optional]
7
+ **restrictions** | [**PaymentsConfigurationRestrictions**](PaymentsConfigurationRestrictions.md) | | [optional]
8
+
9
+
data/lib/ultracart_api.rb CHANGED
@@ -498,7 +498,9 @@ require 'ultracart_api/models/payments_configuration_cod'
498
498
  require 'ultracart_api/models/payments_configuration_cash'
499
499
  require 'ultracart_api/models/payments_configuration_check'
500
500
  require 'ultracart_api/models/payments_configuration_credit_card'
501
+ require 'ultracart_api/models/payments_configuration_echeck'
501
502
  require 'ultracart_api/models/payments_configuration_loan_hero'
503
+ require 'ultracart_api/models/payments_configuration_money_order'
502
504
  require 'ultracart_api/models/payments_configuration_pay_pal'
503
505
  require 'ultracart_api/models/payments_configuration_purchase_order'
504
506
  require 'ultracart_api/models/payments_configuration_quote_request'
@@ -26,8 +26,12 @@ module UltracartClient
26
26
 
27
27
  attr_accessor :credit_card
28
28
 
29
+ attr_accessor :e_check
30
+
29
31
  attr_accessor :loan_hero
30
32
 
33
+ attr_accessor :money_order
34
+
31
35
  attr_accessor :pay_pal
32
36
 
33
37
  attr_accessor :purchase_order
@@ -55,7 +59,9 @@ module UltracartClient
55
59
  :'check' => :'check',
56
60
  :'cod' => :'cod',
57
61
  :'credit_card' => :'creditCard',
62
+ :'e_check' => :'eCheck',
58
63
  :'loan_hero' => :'loanHero',
64
+ :'money_order' => :'moneyOrder',
59
65
  :'pay_pal' => :'payPal',
60
66
  :'purchase_order' => :'purchaseOrder',
61
67
  :'quote_request' => :'quoteRequest',
@@ -77,7 +83,9 @@ module UltracartClient
77
83
  :'check' => :'PaymentsConfigurationCheck',
78
84
  :'cod' => :'PaymentsConfigurationCOD',
79
85
  :'credit_card' => :'PaymentsConfigurationCreditCard',
86
+ :'e_check' => :'PaymentsConfigurationEcheck',
80
87
  :'loan_hero' => :'PaymentsConfigurationLoanHero',
88
+ :'money_order' => :'PaymentsConfigurationMoneyOrder',
81
89
  :'pay_pal' => :'PaymentsConfigurationPayPal',
82
90
  :'purchase_order' => :'PaymentsConfigurationPurchaseOrder',
83
91
  :'quote_request' => :'PaymentsConfigurationQuoteRequest',
@@ -122,10 +130,18 @@ module UltracartClient
122
130
  self.credit_card = attributes[:'creditCard']
123
131
  end
124
132
 
133
+ if attributes.has_key?(:'eCheck')
134
+ self.e_check = attributes[:'eCheck']
135
+ end
136
+
125
137
  if attributes.has_key?(:'loanHero')
126
138
  self.loan_hero = attributes[:'loanHero']
127
139
  end
128
140
 
141
+ if attributes.has_key?(:'moneyOrder')
142
+ self.money_order = attributes[:'moneyOrder']
143
+ end
144
+
129
145
  if attributes.has_key?(:'payPal')
130
146
  self.pay_pal = attributes[:'payPal']
131
147
  end
@@ -187,7 +203,9 @@ module UltracartClient
187
203
  check == o.check &&
188
204
  cod == o.cod &&
189
205
  credit_card == o.credit_card &&
206
+ e_check == o.e_check &&
190
207
  loan_hero == o.loan_hero &&
208
+ money_order == o.money_order &&
191
209
  pay_pal == o.pay_pal &&
192
210
  purchase_order == o.purchase_order &&
193
211
  quote_request == o.quote_request &&
@@ -208,7 +226,7 @@ module UltracartClient
208
226
  # Calculates hash code according to all attributes.
209
227
  # @return [Fixnum] Hash code
210
228
  def hash
211
- [affirm, amazon, cash, check, cod, credit_card, loan_hero, pay_pal, purchase_order, quote_request, sezzle, show_accounting_code, switch_to_sub_tab, switch_to_tab, we_pay, wire_transfer].hash
229
+ [affirm, amazon, cash, check, cod, credit_card, e_check, loan_hero, money_order, pay_pal, purchase_order, quote_request, sezzle, show_accounting_code, switch_to_sub_tab, switch_to_tab, we_pay, wire_transfer].hash
212
230
  end
213
231
 
214
232
  # Builds the object from hash
@@ -16,20 +16,12 @@ module UltracartClient
16
16
  class PaymentsConfigurationCheck
17
17
  attr_accessor :accept_check_orders
18
18
 
19
- attr_accessor :accept_e_check
20
-
21
- attr_accessor :accept_money_orders
22
-
23
19
  attr_accessor :check_accounting_code
24
20
 
25
21
  attr_accessor :check_deposit_to_account
26
22
 
27
23
  attr_accessor :checks_payable_to
28
24
 
29
- attr_accessor :e_check_accounting_code
30
-
31
- attr_accessor :e_check_deposit_to_account
32
-
33
25
  attr_accessor :mail_to_address1
34
26
 
35
27
  attr_accessor :mail_to_address2
@@ -54,13 +46,9 @@ module UltracartClient
54
46
  def self.attribute_map
55
47
  {
56
48
  :'accept_check_orders' => :'acceptCheckOrders',
57
- :'accept_e_check' => :'acceptECheck',
58
- :'accept_money_orders' => :'acceptMoneyOrders',
59
49
  :'check_accounting_code' => :'checkAccountingCode',
60
50
  :'check_deposit_to_account' => :'checkDepositToAccount',
61
51
  :'checks_payable_to' => :'checksPayableTo',
62
- :'e_check_accounting_code' => :'eCheckAccountingCode',
63
- :'e_check_deposit_to_account' => :'eCheckDepositToAccount',
64
52
  :'mail_to_address1' => :'mailToAddress1',
65
53
  :'mail_to_address2' => :'mailToAddress2',
66
54
  :'mail_to_city' => :'mailToCity',
@@ -78,13 +66,9 @@ module UltracartClient
78
66
  def self.swagger_types
79
67
  {
80
68
  :'accept_check_orders' => :'BOOLEAN',
81
- :'accept_e_check' => :'BOOLEAN',
82
- :'accept_money_orders' => :'BOOLEAN',
83
69
  :'check_accounting_code' => :'String',
84
70
  :'check_deposit_to_account' => :'String',
85
71
  :'checks_payable_to' => :'String',
86
- :'e_check_accounting_code' => :'String',
87
- :'e_check_deposit_to_account' => :'String',
88
72
  :'mail_to_address1' => :'String',
89
73
  :'mail_to_address2' => :'String',
90
74
  :'mail_to_city' => :'String',
@@ -110,14 +94,6 @@ module UltracartClient
110
94
  self.accept_check_orders = attributes[:'acceptCheckOrders']
111
95
  end
112
96
 
113
- if attributes.has_key?(:'acceptECheck')
114
- self.accept_e_check = attributes[:'acceptECheck']
115
- end
116
-
117
- if attributes.has_key?(:'acceptMoneyOrders')
118
- self.accept_money_orders = attributes[:'acceptMoneyOrders']
119
- end
120
-
121
97
  if attributes.has_key?(:'checkAccountingCode')
122
98
  self.check_accounting_code = attributes[:'checkAccountingCode']
123
99
  end
@@ -130,14 +106,6 @@ module UltracartClient
130
106
  self.checks_payable_to = attributes[:'checksPayableTo']
131
107
  end
132
108
 
133
- if attributes.has_key?(:'eCheckAccountingCode')
134
- self.e_check_accounting_code = attributes[:'eCheckAccountingCode']
135
- end
136
-
137
- if attributes.has_key?(:'eCheckDepositToAccount')
138
- self.e_check_deposit_to_account = attributes[:'eCheckDepositToAccount']
139
- end
140
-
141
109
  if attributes.has_key?(:'mailToAddress1')
142
110
  self.mail_to_address1 = attributes[:'mailToAddress1']
143
111
  end
@@ -198,13 +166,9 @@ module UltracartClient
198
166
  return true if self.equal?(o)
199
167
  self.class == o.class &&
200
168
  accept_check_orders == o.accept_check_orders &&
201
- accept_e_check == o.accept_e_check &&
202
- accept_money_orders == o.accept_money_orders &&
203
169
  check_accounting_code == o.check_accounting_code &&
204
170
  check_deposit_to_account == o.check_deposit_to_account &&
205
171
  checks_payable_to == o.checks_payable_to &&
206
- e_check_accounting_code == o.e_check_accounting_code &&
207
- e_check_deposit_to_account == o.e_check_deposit_to_account &&
208
172
  mail_to_address1 == o.mail_to_address1 &&
209
173
  mail_to_address2 == o.mail_to_address2 &&
210
174
  mail_to_city == o.mail_to_city &&
@@ -226,7 +190,7 @@ module UltracartClient
226
190
  # Calculates hash code according to all attributes.
227
191
  # @return [Fixnum] Hash code
228
192
  def hash
229
- [accept_check_orders, accept_e_check, accept_money_orders, check_accounting_code, check_deposit_to_account, checks_payable_to, e_check_accounting_code, e_check_deposit_to_account, mail_to_address1, mail_to_address2, mail_to_city, mail_to_country, mail_to_name, mail_to_state, mail_to_zip, money_order_accounting_code, money_order_deposit_to_account, restrictions].hash
193
+ [accept_check_orders, check_accounting_code, check_deposit_to_account, checks_payable_to, mail_to_address1, mail_to_address2, mail_to_city, mail_to_country, mail_to_name, mail_to_state, mail_to_zip, money_order_accounting_code, money_order_deposit_to_account, restrictions].hash
230
194
  end
231
195
 
232
196
  # Builds the object from hash
@@ -0,0 +1,211 @@
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 PaymentsConfigurationEcheck
17
+ attr_accessor :accept_e_check
18
+
19
+ attr_accessor :e_check_accounting_code
20
+
21
+ attr_accessor :e_check_deposit_to_account
22
+
23
+ attr_accessor :restrictions
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'accept_e_check' => :'acceptECheck',
29
+ :'e_check_accounting_code' => :'eCheckAccountingCode',
30
+ :'e_check_deposit_to_account' => :'eCheckDepositToAccount',
31
+ :'restrictions' => :'restrictions'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'accept_e_check' => :'BOOLEAN',
39
+ :'e_check_accounting_code' => :'String',
40
+ :'e_check_deposit_to_account' => :'String',
41
+ :'restrictions' => :'PaymentsConfigurationRestrictions'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'acceptECheck')
54
+ self.accept_e_check = attributes[:'acceptECheck']
55
+ end
56
+
57
+ if attributes.has_key?(:'eCheckAccountingCode')
58
+ self.e_check_accounting_code = attributes[:'eCheckAccountingCode']
59
+ end
60
+
61
+ if attributes.has_key?(:'eCheckDepositToAccount')
62
+ self.e_check_deposit_to_account = attributes[:'eCheckDepositToAccount']
63
+ end
64
+
65
+ if attributes.has_key?(:'restrictions')
66
+ self.restrictions = attributes[:'restrictions']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ accept_e_check == o.accept_e_check &&
89
+ e_check_accounting_code == o.e_check_accounting_code &&
90
+ e_check_deposit_to_account == o.e_check_deposit_to_account &&
91
+ restrictions == o.restrictions
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
+ [accept_e_check, e_check_accounting_code, e_check_deposit_to_account, restrictions].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 = UltracartClient.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
@@ -0,0 +1,193 @@
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 PaymentsConfigurationMoneyOrder
17
+ attr_accessor :accept_money_orders
18
+
19
+ attr_accessor :restrictions
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'accept_money_orders' => :'acceptMoneyOrders',
25
+ :'restrictions' => :'restrictions'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'accept_money_orders' => :'BOOLEAN',
33
+ :'restrictions' => :'PaymentsConfigurationRestrictions'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'acceptMoneyOrders')
46
+ self.accept_money_orders = attributes[:'acceptMoneyOrders']
47
+ end
48
+
49
+ if attributes.has_key?(:'restrictions')
50
+ self.restrictions = attributes[:'restrictions']
51
+ end
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = Array.new
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ accept_money_orders == o.accept_money_orders &&
73
+ restrictions == o.restrictions
74
+ end
75
+
76
+ # @see the `==` method
77
+ # @param [Object] Object to be compared
78
+ def eql?(o)
79
+ self == o
80
+ end
81
+
82
+ # Calculates hash code according to all attributes.
83
+ # @return [Fixnum] Hash code
84
+ def hash
85
+ [accept_money_orders, restrictions].hash
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :BOOLEAN
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ temp_model = UltracartClient.const_get(type).new
146
+ temp_model.build_from_hash(value)
147
+ end
148
+ end
149
+
150
+ # Returns the string representation of the object
151
+ # @return [String] String presentation of the object
152
+ def to_s
153
+ to_hash.to_s
154
+ end
155
+
156
+ # to_body is an alias to to_hash (backward compatibility)
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_body
159
+ to_hash
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ next if value.nil?
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ # Outputs non-array value in the form of hash
175
+ # For object, use to_hash. Otherwise, just return the value
176
+ # @param [Object] value Any valid value
177
+ # @return [Hash] Returns the value in the form of hash
178
+ def _to_hash(value)
179
+ if value.is_a?(Array)
180
+ value.compact.map { |v| _to_hash(v) }
181
+ elsif value.is_a?(Hash)
182
+ {}.tap do |hash|
183
+ value.each { |k, v| hash[k] = _to_hash(v) }
184
+ end
185
+ elsif value.respond_to? :to_hash
186
+ value.to_hash
187
+ else
188
+ value
189
+ end
190
+ end
191
+
192
+ end
193
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.4.7'
14
+ VERSION = '3.4.8'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.7
4
+ version: 3.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -694,7 +694,9 @@ files:
694
694
  - docs/PaymentsConfigurationCash.md
695
695
  - docs/PaymentsConfigurationCheck.md
696
696
  - docs/PaymentsConfigurationCreditCard.md
697
+ - docs/PaymentsConfigurationEcheck.md
697
698
  - docs/PaymentsConfigurationLoanHero.md
699
+ - docs/PaymentsConfigurationMoneyOrder.md
698
700
  - docs/PaymentsConfigurationPayPal.md
699
701
  - docs/PaymentsConfigurationPurchaseOrder.md
700
702
  - docs/PaymentsConfigurationQuoteRequest.md
@@ -1346,7 +1348,9 @@ files:
1346
1348
  - lib/ultracart_api/models/payments_configuration_check.rb
1347
1349
  - lib/ultracart_api/models/payments_configuration_cod.rb
1348
1350
  - lib/ultracart_api/models/payments_configuration_credit_card.rb
1351
+ - lib/ultracart_api/models/payments_configuration_echeck.rb
1349
1352
  - lib/ultracart_api/models/payments_configuration_loan_hero.rb
1353
+ - lib/ultracart_api/models/payments_configuration_money_order.rb
1350
1354
  - lib/ultracart_api/models/payments_configuration_pay_pal.rb
1351
1355
  - lib/ultracart_api/models/payments_configuration_purchase_order.rb
1352
1356
  - lib/ultracart_api/models/payments_configuration_quote_request.rb