ultracart_api 3.4.6 → 3.4.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -4
  3. data/docs/EmailList.md +1 -0
  4. data/docs/EmailListSegmentFolder.md +12 -0
  5. data/docs/EmailListSegmentFolderResponse.md +12 -0
  6. data/docs/EmailListSegmentFoldersResponse.md +12 -0
  7. data/docs/EmailSegment.md +1 -0
  8. data/docs/PaymentsConfiguration.md +5 -3
  9. data/docs/PaymentsConfigurationAffirm.md +7 -7
  10. data/docs/PaymentsConfigurationAmazon.md +7 -7
  11. data/docs/PaymentsConfigurationCOD.md +5 -5
  12. data/docs/PaymentsConfigurationCash.md +1 -1
  13. data/docs/PaymentsConfigurationCheck.md +12 -17
  14. data/docs/PaymentsConfigurationCreditCard.md +11 -9
  15. data/docs/PaymentsConfigurationCreditCardType.md +17 -0
  16. data/docs/PaymentsConfigurationEcheck.md +11 -0
  17. data/docs/PaymentsConfigurationLoanHero.md +4 -4
  18. data/docs/PaymentsConfigurationMoneyOrder.md +11 -0
  19. data/docs/PaymentsConfigurationPayPal.md +28 -28
  20. data/docs/PaymentsConfigurationPurchaseOrder.md +3 -3
  21. data/docs/PaymentsConfigurationQuoteRequest.md +2 -2
  22. data/docs/PaymentsConfigurationRestrictions.md +14 -12
  23. data/docs/PaymentsConfigurationRestrictionsTheme.md +10 -0
  24. data/docs/PaymentsConfigurationSezzle.md +8 -7
  25. data/docs/PaymentsConfigurationTestMethod.md +18 -0
  26. data/docs/PaymentsConfigurationWePay.md +26 -26
  27. data/docs/PaymentsConfigurationWireTransfer.md +10 -10
  28. data/docs/StorefrontApi.md +260 -0
  29. data/lib/ultracart_api.rb +8 -0
  30. data/lib/ultracart_api/api/storefront_api.rb +295 -0
  31. data/lib/ultracart_api/models/email_list.rb +11 -1
  32. data/lib/ultracart_api/models/email_list_segment_folder.rb +240 -0
  33. data/lib/ultracart_api/models/email_list_segment_folder_response.rb +221 -0
  34. data/lib/ultracart_api/models/email_list_segment_folders_response.rb +223 -0
  35. data/lib/ultracart_api/models/email_segment.rb +11 -1
  36. data/lib/ultracart_api/models/payments_configuration.rb +50 -31
  37. data/lib/ultracart_api/models/payments_configuration_affirm.rb +81 -40
  38. data/lib/ultracart_api/models/payments_configuration_amazon.rb +51 -44
  39. data/lib/ultracart_api/models/payments_configuration_cash.rb +4 -3
  40. data/lib/ultracart_api/models/payments_configuration_check.rb +72 -103
  41. data/lib/ultracart_api/models/payments_configuration_cod.rb +39 -34
  42. data/lib/ultracart_api/models/payments_configuration_credit_card.rb +74 -39
  43. data/lib/ultracart_api/models/payments_configuration_credit_card_type.rb +309 -0
  44. data/lib/ultracart_api/models/payments_configuration_echeck.rb +214 -0
  45. data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +23 -19
  46. data/lib/ultracart_api/models/payments_configuration_money_order.rb +214 -0
  47. data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +270 -172
  48. data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +19 -16
  49. data/lib/ultracart_api/models/payments_configuration_quote_request.rb +12 -10
  50. data/lib/ultracart_api/models/payments_configuration_restrictions.rb +73 -39
  51. data/lib/ultracart_api/models/payments_configuration_restrictions_theme.rb +202 -0
  52. data/lib/ultracart_api/models/payments_configuration_sezzle.rb +99 -46
  53. data/lib/ultracart_api/models/payments_configuration_test_method.rb +319 -0
  54. data/lib/ultracart_api/models/payments_configuration_we_pay.rb +186 -160
  55. data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +71 -61
  56. data/lib/ultracart_api/version.rb +1 -1
  57. metadata +18 -2
@@ -14,24 +14,28 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationLoanHero
17
+ # Master flag indicating this merchant accepts Loan Hero
17
18
  attr_accessor :accept_loan_hero
18
19
 
19
- attr_accessor :loan_hero_accounting_code
20
+ # Optional Quickbooks accounting code
21
+ attr_accessor :accounting_code
20
22
 
21
- attr_accessor :loan_hero_deposit_to_account
23
+ # Optional Quickbooks deposit to account
24
+ attr_accessor :deposit_to_account
22
25
 
23
26
  attr_accessor :restrictions
24
27
 
28
+ # Internal field to aid UI
25
29
  attr_accessor :show_loan_hero
26
30
 
27
31
  # Attribute mapping from ruby-style variable name to JSON key.
28
32
  def self.attribute_map
29
33
  {
30
- :'accept_loan_hero' => :'acceptLoanHero',
31
- :'loan_hero_accounting_code' => :'loanHeroAccountingCode',
32
- :'loan_hero_deposit_to_account' => :'loanHeroDepositToAccount',
34
+ :'accept_loan_hero' => :'accept_loan_hero',
35
+ :'accounting_code' => :'accounting_code',
36
+ :'deposit_to_account' => :'deposit_to_account',
33
37
  :'restrictions' => :'restrictions',
34
- :'show_loan_hero' => :'showLoanHero'
38
+ :'show_loan_hero' => :'show_loan_hero'
35
39
  }
36
40
  end
37
41
 
@@ -39,8 +43,8 @@ module UltracartClient
39
43
  def self.swagger_types
40
44
  {
41
45
  :'accept_loan_hero' => :'BOOLEAN',
42
- :'loan_hero_accounting_code' => :'String',
43
- :'loan_hero_deposit_to_account' => :'String',
46
+ :'accounting_code' => :'String',
47
+ :'deposit_to_account' => :'String',
44
48
  :'restrictions' => :'PaymentsConfigurationRestrictions',
45
49
  :'show_loan_hero' => :'BOOLEAN'
46
50
  }
@@ -54,24 +58,24 @@ module UltracartClient
54
58
  # convert string to symbol for hash key
55
59
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
60
 
57
- if attributes.has_key?(:'acceptLoanHero')
58
- self.accept_loan_hero = attributes[:'acceptLoanHero']
61
+ if attributes.has_key?(:'accept_loan_hero')
62
+ self.accept_loan_hero = attributes[:'accept_loan_hero']
59
63
  end
60
64
 
61
- if attributes.has_key?(:'loanHeroAccountingCode')
62
- self.loan_hero_accounting_code = attributes[:'loanHeroAccountingCode']
65
+ if attributes.has_key?(:'accounting_code')
66
+ self.accounting_code = attributes[:'accounting_code']
63
67
  end
64
68
 
65
- if attributes.has_key?(:'loanHeroDepositToAccount')
66
- self.loan_hero_deposit_to_account = attributes[:'loanHeroDepositToAccount']
69
+ if attributes.has_key?(:'deposit_to_account')
70
+ self.deposit_to_account = attributes[:'deposit_to_account']
67
71
  end
68
72
 
69
73
  if attributes.has_key?(:'restrictions')
70
74
  self.restrictions = attributes[:'restrictions']
71
75
  end
72
76
 
73
- if attributes.has_key?(:'showLoanHero')
74
- self.show_loan_hero = attributes[:'showLoanHero']
77
+ if attributes.has_key?(:'show_loan_hero')
78
+ self.show_loan_hero = attributes[:'show_loan_hero']
75
79
  end
76
80
  end
77
81
 
@@ -94,8 +98,8 @@ module UltracartClient
94
98
  return true if self.equal?(o)
95
99
  self.class == o.class &&
96
100
  accept_loan_hero == o.accept_loan_hero &&
97
- loan_hero_accounting_code == o.loan_hero_accounting_code &&
98
- loan_hero_deposit_to_account == o.loan_hero_deposit_to_account &&
101
+ accounting_code == o.accounting_code &&
102
+ deposit_to_account == o.deposit_to_account &&
99
103
  restrictions == o.restrictions &&
100
104
  show_loan_hero == o.show_loan_hero
101
105
  end
@@ -109,7 +113,7 @@ module UltracartClient
109
113
  # Calculates hash code according to all attributes.
110
114
  # @return [Fixnum] Hash code
111
115
  def hash
112
- [accept_loan_hero, loan_hero_accounting_code, loan_hero_deposit_to_account, restrictions, show_loan_hero].hash
116
+ [accept_loan_hero, accounting_code, deposit_to_account, restrictions, show_loan_hero].hash
113
117
  end
114
118
 
115
119
  # Builds the object from hash
@@ -0,0 +1,214 @@
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
+ # Master flag for this merchant accepting money orders
18
+ attr_accessor :accept_money_orders
19
+
20
+ # Optional Quickbooks accounting code
21
+ attr_accessor :accounting_code
22
+
23
+ # Optional Quickbooks deposit to account
24
+ attr_accessor :deposit_to_account
25
+
26
+ attr_accessor :restrictions
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'accept_money_orders' => :'accept_money_orders',
32
+ :'accounting_code' => :'accounting_code',
33
+ :'deposit_to_account' => :'deposit_to_account',
34
+ :'restrictions' => :'restrictions'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'accept_money_orders' => :'BOOLEAN',
42
+ :'accounting_code' => :'String',
43
+ :'deposit_to_account' => :'String',
44
+ :'restrictions' => :'PaymentsConfigurationRestrictions'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'accept_money_orders')
57
+ self.accept_money_orders = attributes[:'accept_money_orders']
58
+ end
59
+
60
+ if attributes.has_key?(:'accounting_code')
61
+ self.accounting_code = attributes[:'accounting_code']
62
+ end
63
+
64
+ if attributes.has_key?(:'deposit_to_account')
65
+ self.deposit_to_account = attributes[:'deposit_to_account']
66
+ end
67
+
68
+ if attributes.has_key?(:'restrictions')
69
+ self.restrictions = attributes[:'restrictions']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ accept_money_orders == o.accept_money_orders &&
92
+ accounting_code == o.accounting_code &&
93
+ deposit_to_account == o.deposit_to_account &&
94
+ restrictions == o.restrictions
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [accept_money_orders, accounting_code, deposit_to_account, restrictions].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = UltracartClient.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+ end
@@ -14,131 +14,181 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationPayPal
17
- attr_accessor :accept_pay_pal
17
+ # Master flag that determine if PayPal is an active payment for this account
18
+ attr_accessor :accept_paypal
18
19
 
19
- attr_accessor :paypal_accounting_code
20
+ # Optional accounting code that is set to Quickbooks when an order uses this payment method.
21
+ attr_accessor :accounting_code
20
22
 
21
- attr_accessor :paypal_api_password
23
+ # PayPal API password
24
+ attr_accessor :api_password
22
25
 
23
- attr_accessor :paypal_api_user_name
26
+ # PayPal API username
27
+ attr_accessor :api_username
24
28
 
25
- attr_accessor :paypal_certificate_on_file
29
+ # (Legacy) true if there is a PayPal certificate already on file. Used to manage the internal UI
30
+ attr_accessor :certificate_on_file
26
31
 
27
- attr_accessor :paypal_deposit_to_account
32
+ # The account to deposit funds
33
+ attr_accessor :deposit_to_account
28
34
 
29
- attr_accessor :paypal_email
35
+ # The main PayPal email address
36
+ attr_accessor :email
30
37
 
31
- attr_accessor :paypal_environment
38
+ # PayPal configuration, live or sandbox
39
+ attr_accessor :environment
32
40
 
33
- attr_accessor :paypal_header_image_url
41
+ # The URL for the PayPal header
42
+ attr_accessor :header_image_url
34
43
 
35
- attr_accessor :paypal_hide_bill_me_later
44
+ # True if the Bill Me Later button should be hidden during checkout
45
+ attr_accessor :hide_bill_me_later
36
46
 
37
- attr_accessor :paypal_hide_express_checkout_on_view_cart
47
+ # True if the PayPal express checkout button should be hidden on the view cart page. This will force the customer to enter address information before being able to checkout with PayPal
48
+ attr_accessor :hide_express_checkout_on_view_cart
38
49
 
39
- attr_accessor :paypal_hide_for_unshipped_orders
50
+ # True if PayPal should be hidden for orders with no shippable product, such as digital orders
51
+ attr_accessor :hide_for_unshipped_orders
40
52
 
41
- attr_accessor :paypal_hold_in_ar
53
+ # If true, PayPal orders are held in Accounts Receivable for review
54
+ attr_accessor :hold_in_ar
42
55
 
43
- attr_accessor :paypal_landing_page
56
+ # PayPal landing page
57
+ attr_accessor :landing_page
44
58
 
45
- attr_accessor :paypal_mode
59
+ # The PayPal mode
60
+ attr_accessor :mode
46
61
 
47
- attr_accessor :paypal_private_key_password
62
+ # PayPal API private key password
63
+ attr_accessor :private_key_password
48
64
 
49
- attr_accessor :paypal_processing_fee
65
+ # Optional additional fee to charge if PayPal is used. It is rare for this to be used.
66
+ attr_accessor :processing_fee
50
67
 
51
- attr_accessor :paypal_processing_perc
68
+ # The processing percentage charged by PayPal
69
+ attr_accessor :processing_percentage
52
70
 
53
- attr_accessor :paypal_send_recurring
71
+ # True if the internal UI should recommend opening a PayPal account
72
+ attr_accessor :push_paypal
54
73
 
55
- attr_accessor :paypal_show_card_logos_not_directly_supported
74
+ attr_accessor :restrictions
56
75
 
57
- attr_accessor :paypal_show_signature
76
+ # True if UltraCart should send recurring orders to PayPal. There are restrictions to what PayPal will accept for recurring orders. Be careful.
77
+ attr_accessor :send_recurring
58
78
 
59
- attr_accessor :paypal_signature
79
+ # Short marketing text
80
+ attr_accessor :short_paypal_marketing_text
60
81
 
61
- attr_accessor :paypal_solution_type
82
+ # internal ui flag
83
+ attr_accessor :show_card_logos_not_directly_supported
62
84
 
63
- attr_accessor :paypal_summary_email
85
+ # Internal flag used to manage UI
86
+ attr_accessor :show_signature
64
87
 
65
- attr_accessor :paypal_summary_mode
88
+ # PayPal signature
89
+ attr_accessor :signature
66
90
 
67
- attr_accessor :paypal_zero_dollar_penny
91
+ # PayPal solution type
92
+ attr_accessor :solution_type
68
93
 
69
- attr_accessor :push_pay_pal
94
+ # The email where PayPal summaries should be sent
95
+ attr_accessor :summary_email
70
96
 
71
- attr_accessor :restrictions
97
+ # Description of what mode PayPal is operating
98
+ attr_accessor :summary_mode
99
+
100
+ # Send free items to PayPal as one cent items and subtract this penny from shipping. PayPal does not allow the sale of free items.
101
+ attr_accessor :zero_dollar_penny
102
+
103
+ class EnumAttributeValidator
104
+ attr_reader :datatype
105
+ attr_reader :allowable_values
72
106
 
73
- attr_accessor :short_pay_pal_marketing_text
107
+ def initialize(datatype, allowable_values)
108
+ @allowable_values = allowable_values.map do |value|
109
+ case datatype.to_s
110
+ when /Integer/i
111
+ value.to_i
112
+ when /Float/i
113
+ value.to_f
114
+ else
115
+ value
116
+ end
117
+ end
118
+ end
119
+
120
+ def valid?(value)
121
+ !value || allowable_values.include?(value)
122
+ end
123
+ end
74
124
 
75
125
  # Attribute mapping from ruby-style variable name to JSON key.
76
126
  def self.attribute_map
77
127
  {
78
- :'accept_pay_pal' => :'acceptPayPal',
79
- :'paypal_accounting_code' => :'paypalAccountingCode',
80
- :'paypal_api_password' => :'paypalApiPassword',
81
- :'paypal_api_user_name' => :'paypalApiUserName',
82
- :'paypal_certificate_on_file' => :'paypalCertificateOnFile',
83
- :'paypal_deposit_to_account' => :'paypalDepositToAccount',
84
- :'paypal_email' => :'paypalEmail',
85
- :'paypal_environment' => :'paypalEnvironment',
86
- :'paypal_header_image_url' => :'paypalHeaderImageUrl',
87
- :'paypal_hide_bill_me_later' => :'paypalHideBillMeLater',
88
- :'paypal_hide_express_checkout_on_view_cart' => :'paypalHideExpressCheckoutOnViewCart',
89
- :'paypal_hide_for_unshipped_orders' => :'paypalHideForUnshippedOrders',
90
- :'paypal_hold_in_ar' => :'paypalHoldInAR',
91
- :'paypal_landing_page' => :'paypalLandingPage',
92
- :'paypal_mode' => :'paypalMode',
93
- :'paypal_private_key_password' => :'paypalPrivateKeyPassword',
94
- :'paypal_processing_fee' => :'paypalProcessingFee',
95
- :'paypal_processing_perc' => :'paypalProcessingPerc',
96
- :'paypal_send_recurring' => :'paypalSendRecurring',
97
- :'paypal_show_card_logos_not_directly_supported' => :'paypalShowCardLogosNotDirectlySupported',
98
- :'paypal_show_signature' => :'paypalShowSignature',
99
- :'paypal_signature' => :'paypalSignature',
100
- :'paypal_solution_type' => :'paypalSolutionType',
101
- :'paypal_summary_email' => :'paypalSummaryEmail',
102
- :'paypal_summary_mode' => :'paypalSummaryMode',
103
- :'paypal_zero_dollar_penny' => :'paypalZeroDollarPenny',
104
- :'push_pay_pal' => :'pushPayPal',
128
+ :'accept_paypal' => :'accept_paypal',
129
+ :'accounting_code' => :'accounting_code',
130
+ :'api_password' => :'api_password',
131
+ :'api_username' => :'api_username',
132
+ :'certificate_on_file' => :'certificate_on_file',
133
+ :'deposit_to_account' => :'deposit_to_account',
134
+ :'email' => :'email',
135
+ :'environment' => :'environment',
136
+ :'header_image_url' => :'header_image_url',
137
+ :'hide_bill_me_later' => :'hide_bill_me_later',
138
+ :'hide_express_checkout_on_view_cart' => :'hide_express_checkout_on_view_cart',
139
+ :'hide_for_unshipped_orders' => :'hide_for_unshipped_orders',
140
+ :'hold_in_ar' => :'hold_in_ar',
141
+ :'landing_page' => :'landing_page',
142
+ :'mode' => :'mode',
143
+ :'private_key_password' => :'private_key_password',
144
+ :'processing_fee' => :'processing_fee',
145
+ :'processing_percentage' => :'processing_percentage',
146
+ :'push_paypal' => :'push_paypal',
105
147
  :'restrictions' => :'restrictions',
106
- :'short_pay_pal_marketing_text' => :'shortPayPalMarketingText'
148
+ :'send_recurring' => :'send_recurring',
149
+ :'short_paypal_marketing_text' => :'short_paypal_marketing_text',
150
+ :'show_card_logos_not_directly_supported' => :'show_card_logos_not_directly_supported',
151
+ :'show_signature' => :'show_signature',
152
+ :'signature' => :'signature',
153
+ :'solution_type' => :'solution_type',
154
+ :'summary_email' => :'summary_email',
155
+ :'summary_mode' => :'summary_mode',
156
+ :'zero_dollar_penny' => :'zero_dollar_penny'
107
157
  }
108
158
  end
109
159
 
110
160
  # Attribute type mapping.
111
161
  def self.swagger_types
112
162
  {
113
- :'accept_pay_pal' => :'BOOLEAN',
114
- :'paypal_accounting_code' => :'String',
115
- :'paypal_api_password' => :'String',
116
- :'paypal_api_user_name' => :'String',
117
- :'paypal_certificate_on_file' => :'BOOLEAN',
118
- :'paypal_deposit_to_account' => :'String',
119
- :'paypal_email' => :'String',
120
- :'paypal_environment' => :'String',
121
- :'paypal_header_image_url' => :'String',
122
- :'paypal_hide_bill_me_later' => :'BOOLEAN',
123
- :'paypal_hide_express_checkout_on_view_cart' => :'BOOLEAN',
124
- :'paypal_hide_for_unshipped_orders' => :'BOOLEAN',
125
- :'paypal_hold_in_ar' => :'BOOLEAN',
126
- :'paypal_landing_page' => :'String',
127
- :'paypal_mode' => :'String',
128
- :'paypal_private_key_password' => :'String',
129
- :'paypal_processing_fee' => :'String',
130
- :'paypal_processing_perc' => :'String',
131
- :'paypal_send_recurring' => :'String',
132
- :'paypal_show_card_logos_not_directly_supported' => :'BOOLEAN',
133
- :'paypal_show_signature' => :'BOOLEAN',
134
- :'paypal_signature' => :'String',
135
- :'paypal_solution_type' => :'String',
136
- :'paypal_summary_email' => :'String',
137
- :'paypal_summary_mode' => :'String',
138
- :'paypal_zero_dollar_penny' => :'BOOLEAN',
139
- :'push_pay_pal' => :'BOOLEAN',
163
+ :'accept_paypal' => :'BOOLEAN',
164
+ :'accounting_code' => :'String',
165
+ :'api_password' => :'String',
166
+ :'api_username' => :'String',
167
+ :'certificate_on_file' => :'BOOLEAN',
168
+ :'deposit_to_account' => :'String',
169
+ :'email' => :'String',
170
+ :'environment' => :'String',
171
+ :'header_image_url' => :'String',
172
+ :'hide_bill_me_later' => :'BOOLEAN',
173
+ :'hide_express_checkout_on_view_cart' => :'BOOLEAN',
174
+ :'hide_for_unshipped_orders' => :'BOOLEAN',
175
+ :'hold_in_ar' => :'BOOLEAN',
176
+ :'landing_page' => :'String',
177
+ :'mode' => :'String',
178
+ :'private_key_password' => :'String',
179
+ :'processing_fee' => :'String',
180
+ :'processing_percentage' => :'String',
181
+ :'push_paypal' => :'BOOLEAN',
140
182
  :'restrictions' => :'PaymentsConfigurationRestrictions',
141
- :'short_pay_pal_marketing_text' => :'BOOLEAN'
183
+ :'send_recurring' => :'BOOLEAN',
184
+ :'short_paypal_marketing_text' => :'BOOLEAN',
185
+ :'show_card_logos_not_directly_supported' => :'BOOLEAN',
186
+ :'show_signature' => :'BOOLEAN',
187
+ :'signature' => :'String',
188
+ :'solution_type' => :'String',
189
+ :'summary_email' => :'String',
190
+ :'summary_mode' => :'String',
191
+ :'zero_dollar_penny' => :'BOOLEAN'
142
192
  }
143
193
  end
144
194
 
@@ -150,120 +200,120 @@ module UltracartClient
150
200
  # convert string to symbol for hash key
151
201
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
152
202
 
153
- if attributes.has_key?(:'acceptPayPal')
154
- self.accept_pay_pal = attributes[:'acceptPayPal']
203
+ if attributes.has_key?(:'accept_paypal')
204
+ self.accept_paypal = attributes[:'accept_paypal']
155
205
  end
156
206
 
157
- if attributes.has_key?(:'paypalAccountingCode')
158
- self.paypal_accounting_code = attributes[:'paypalAccountingCode']
207
+ if attributes.has_key?(:'accounting_code')
208
+ self.accounting_code = attributes[:'accounting_code']
159
209
  end
160
210
 
161
- if attributes.has_key?(:'paypalApiPassword')
162
- self.paypal_api_password = attributes[:'paypalApiPassword']
211
+ if attributes.has_key?(:'api_password')
212
+ self.api_password = attributes[:'api_password']
163
213
  end
164
214
 
165
- if attributes.has_key?(:'paypalApiUserName')
166
- self.paypal_api_user_name = attributes[:'paypalApiUserName']
215
+ if attributes.has_key?(:'api_username')
216
+ self.api_username = attributes[:'api_username']
167
217
  end
168
218
 
169
- if attributes.has_key?(:'paypalCertificateOnFile')
170
- self.paypal_certificate_on_file = attributes[:'paypalCertificateOnFile']
219
+ if attributes.has_key?(:'certificate_on_file')
220
+ self.certificate_on_file = attributes[:'certificate_on_file']
171
221
  end
172
222
 
173
- if attributes.has_key?(:'paypalDepositToAccount')
174
- self.paypal_deposit_to_account = attributes[:'paypalDepositToAccount']
223
+ if attributes.has_key?(:'deposit_to_account')
224
+ self.deposit_to_account = attributes[:'deposit_to_account']
175
225
  end
176
226
 
177
- if attributes.has_key?(:'paypalEmail')
178
- self.paypal_email = attributes[:'paypalEmail']
227
+ if attributes.has_key?(:'email')
228
+ self.email = attributes[:'email']
179
229
  end
180
230
 
181
- if attributes.has_key?(:'paypalEnvironment')
182
- self.paypal_environment = attributes[:'paypalEnvironment']
231
+ if attributes.has_key?(:'environment')
232
+ self.environment = attributes[:'environment']
183
233
  end
184
234
 
185
- if attributes.has_key?(:'paypalHeaderImageUrl')
186
- self.paypal_header_image_url = attributes[:'paypalHeaderImageUrl']
235
+ if attributes.has_key?(:'header_image_url')
236
+ self.header_image_url = attributes[:'header_image_url']
187
237
  end
188
238
 
189
- if attributes.has_key?(:'paypalHideBillMeLater')
190
- self.paypal_hide_bill_me_later = attributes[:'paypalHideBillMeLater']
239
+ if attributes.has_key?(:'hide_bill_me_later')
240
+ self.hide_bill_me_later = attributes[:'hide_bill_me_later']
191
241
  end
192
242
 
193
- if attributes.has_key?(:'paypalHideExpressCheckoutOnViewCart')
194
- self.paypal_hide_express_checkout_on_view_cart = attributes[:'paypalHideExpressCheckoutOnViewCart']
243
+ if attributes.has_key?(:'hide_express_checkout_on_view_cart')
244
+ self.hide_express_checkout_on_view_cart = attributes[:'hide_express_checkout_on_view_cart']
195
245
  end
196
246
 
197
- if attributes.has_key?(:'paypalHideForUnshippedOrders')
198
- self.paypal_hide_for_unshipped_orders = attributes[:'paypalHideForUnshippedOrders']
247
+ if attributes.has_key?(:'hide_for_unshipped_orders')
248
+ self.hide_for_unshipped_orders = attributes[:'hide_for_unshipped_orders']
199
249
  end
200
250
 
201
- if attributes.has_key?(:'paypalHoldInAR')
202
- self.paypal_hold_in_ar = attributes[:'paypalHoldInAR']
251
+ if attributes.has_key?(:'hold_in_ar')
252
+ self.hold_in_ar = attributes[:'hold_in_ar']
203
253
  end
204
254
 
205
- if attributes.has_key?(:'paypalLandingPage')
206
- self.paypal_landing_page = attributes[:'paypalLandingPage']
255
+ if attributes.has_key?(:'landing_page')
256
+ self.landing_page = attributes[:'landing_page']
207
257
  end
208
258
 
209
- if attributes.has_key?(:'paypalMode')
210
- self.paypal_mode = attributes[:'paypalMode']
259
+ if attributes.has_key?(:'mode')
260
+ self.mode = attributes[:'mode']
211
261
  end
212
262
 
213
- if attributes.has_key?(:'paypalPrivateKeyPassword')
214
- self.paypal_private_key_password = attributes[:'paypalPrivateKeyPassword']
263
+ if attributes.has_key?(:'private_key_password')
264
+ self.private_key_password = attributes[:'private_key_password']
215
265
  end
216
266
 
217
- if attributes.has_key?(:'paypalProcessingFee')
218
- self.paypal_processing_fee = attributes[:'paypalProcessingFee']
267
+ if attributes.has_key?(:'processing_fee')
268
+ self.processing_fee = attributes[:'processing_fee']
219
269
  end
220
270
 
221
- if attributes.has_key?(:'paypalProcessingPerc')
222
- self.paypal_processing_perc = attributes[:'paypalProcessingPerc']
271
+ if attributes.has_key?(:'processing_percentage')
272
+ self.processing_percentage = attributes[:'processing_percentage']
223
273
  end
224
274
 
225
- if attributes.has_key?(:'paypalSendRecurring')
226
- self.paypal_send_recurring = attributes[:'paypalSendRecurring']
275
+ if attributes.has_key?(:'push_paypal')
276
+ self.push_paypal = attributes[:'push_paypal']
227
277
  end
228
278
 
229
- if attributes.has_key?(:'paypalShowCardLogosNotDirectlySupported')
230
- self.paypal_show_card_logos_not_directly_supported = attributes[:'paypalShowCardLogosNotDirectlySupported']
279
+ if attributes.has_key?(:'restrictions')
280
+ self.restrictions = attributes[:'restrictions']
231
281
  end
232
282
 
233
- if attributes.has_key?(:'paypalShowSignature')
234
- self.paypal_show_signature = attributes[:'paypalShowSignature']
283
+ if attributes.has_key?(:'send_recurring')
284
+ self.send_recurring = attributes[:'send_recurring']
235
285
  end
236
286
 
237
- if attributes.has_key?(:'paypalSignature')
238
- self.paypal_signature = attributes[:'paypalSignature']
287
+ if attributes.has_key?(:'short_paypal_marketing_text')
288
+ self.short_paypal_marketing_text = attributes[:'short_paypal_marketing_text']
239
289
  end
240
290
 
241
- if attributes.has_key?(:'paypalSolutionType')
242
- self.paypal_solution_type = attributes[:'paypalSolutionType']
291
+ if attributes.has_key?(:'show_card_logos_not_directly_supported')
292
+ self.show_card_logos_not_directly_supported = attributes[:'show_card_logos_not_directly_supported']
243
293
  end
244
294
 
245
- if attributes.has_key?(:'paypalSummaryEmail')
246
- self.paypal_summary_email = attributes[:'paypalSummaryEmail']
295
+ if attributes.has_key?(:'show_signature')
296
+ self.show_signature = attributes[:'show_signature']
247
297
  end
248
298
 
249
- if attributes.has_key?(:'paypalSummaryMode')
250
- self.paypal_summary_mode = attributes[:'paypalSummaryMode']
299
+ if attributes.has_key?(:'signature')
300
+ self.signature = attributes[:'signature']
251
301
  end
252
302
 
253
- if attributes.has_key?(:'paypalZeroDollarPenny')
254
- self.paypal_zero_dollar_penny = attributes[:'paypalZeroDollarPenny']
303
+ if attributes.has_key?(:'solution_type')
304
+ self.solution_type = attributes[:'solution_type']
255
305
  end
256
306
 
257
- if attributes.has_key?(:'pushPayPal')
258
- self.push_pay_pal = attributes[:'pushPayPal']
307
+ if attributes.has_key?(:'summary_email')
308
+ self.summary_email = attributes[:'summary_email']
259
309
  end
260
310
 
261
- if attributes.has_key?(:'restrictions')
262
- self.restrictions = attributes[:'restrictions']
311
+ if attributes.has_key?(:'summary_mode')
312
+ self.summary_mode = attributes[:'summary_mode']
263
313
  end
264
314
 
265
- if attributes.has_key?(:'shortPayPalMarketingText')
266
- self.short_pay_pal_marketing_text = attributes[:'shortPayPalMarketingText']
315
+ if attributes.has_key?(:'zero_dollar_penny')
316
+ self.zero_dollar_penny = attributes[:'zero_dollar_penny']
267
317
  end
268
318
  end
269
319
 
@@ -277,43 +327,91 @@ module UltracartClient
277
327
  # Check to see if the all the properties in the model are valid
278
328
  # @return true if the model is valid
279
329
  def valid?
330
+ environment_validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
331
+ return false unless environment_validator.valid?(@environment)
332
+ landing_page_validator = EnumAttributeValidator.new('String', ['Billing', 'Login'])
333
+ return false unless landing_page_validator.valid?(@landing_page)
334
+ mode_validator = EnumAttributeValidator.new('String', ['WPPECO', 'WPPECDP'])
335
+ return false unless mode_validator.valid?(@mode)
336
+ solution_type_validator = EnumAttributeValidator.new('String', ['Sole', 'Mark'])
337
+ return false unless solution_type_validator.valid?(@solution_type)
280
338
  true
281
339
  end
282
340
 
341
+ # Custom attribute writer method checking allowed values (enum).
342
+ # @param [Object] environment Object to be assigned
343
+ def environment=(environment)
344
+ validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
345
+ unless validator.valid?(environment)
346
+ fail ArgumentError, 'invalid value for "environment", must be one of #{validator.allowable_values}.'
347
+ end
348
+ @environment = environment
349
+ end
350
+
351
+ # Custom attribute writer method checking allowed values (enum).
352
+ # @param [Object] landing_page Object to be assigned
353
+ def landing_page=(landing_page)
354
+ validator = EnumAttributeValidator.new('String', ['Billing', 'Login'])
355
+ unless validator.valid?(landing_page)
356
+ fail ArgumentError, 'invalid value for "landing_page", must be one of #{validator.allowable_values}.'
357
+ end
358
+ @landing_page = landing_page
359
+ end
360
+
361
+ # Custom attribute writer method checking allowed values (enum).
362
+ # @param [Object] mode Object to be assigned
363
+ def mode=(mode)
364
+ validator = EnumAttributeValidator.new('String', ['WPPECO', 'WPPECDP'])
365
+ unless validator.valid?(mode)
366
+ fail ArgumentError, 'invalid value for "mode", must be one of #{validator.allowable_values}.'
367
+ end
368
+ @mode = mode
369
+ end
370
+
371
+ # Custom attribute writer method checking allowed values (enum).
372
+ # @param [Object] solution_type Object to be assigned
373
+ def solution_type=(solution_type)
374
+ validator = EnumAttributeValidator.new('String', ['Sole', 'Mark'])
375
+ unless validator.valid?(solution_type)
376
+ fail ArgumentError, 'invalid value for "solution_type", must be one of #{validator.allowable_values}.'
377
+ end
378
+ @solution_type = solution_type
379
+ end
380
+
283
381
  # Checks equality by comparing each attribute.
284
382
  # @param [Object] Object to be compared
285
383
  def ==(o)
286
384
  return true if self.equal?(o)
287
385
  self.class == o.class &&
288
- accept_pay_pal == o.accept_pay_pal &&
289
- paypal_accounting_code == o.paypal_accounting_code &&
290
- paypal_api_password == o.paypal_api_password &&
291
- paypal_api_user_name == o.paypal_api_user_name &&
292
- paypal_certificate_on_file == o.paypal_certificate_on_file &&
293
- paypal_deposit_to_account == o.paypal_deposit_to_account &&
294
- paypal_email == o.paypal_email &&
295
- paypal_environment == o.paypal_environment &&
296
- paypal_header_image_url == o.paypal_header_image_url &&
297
- paypal_hide_bill_me_later == o.paypal_hide_bill_me_later &&
298
- paypal_hide_express_checkout_on_view_cart == o.paypal_hide_express_checkout_on_view_cart &&
299
- paypal_hide_for_unshipped_orders == o.paypal_hide_for_unshipped_orders &&
300
- paypal_hold_in_ar == o.paypal_hold_in_ar &&
301
- paypal_landing_page == o.paypal_landing_page &&
302
- paypal_mode == o.paypal_mode &&
303
- paypal_private_key_password == o.paypal_private_key_password &&
304
- paypal_processing_fee == o.paypal_processing_fee &&
305
- paypal_processing_perc == o.paypal_processing_perc &&
306
- paypal_send_recurring == o.paypal_send_recurring &&
307
- paypal_show_card_logos_not_directly_supported == o.paypal_show_card_logos_not_directly_supported &&
308
- paypal_show_signature == o.paypal_show_signature &&
309
- paypal_signature == o.paypal_signature &&
310
- paypal_solution_type == o.paypal_solution_type &&
311
- paypal_summary_email == o.paypal_summary_email &&
312
- paypal_summary_mode == o.paypal_summary_mode &&
313
- paypal_zero_dollar_penny == o.paypal_zero_dollar_penny &&
314
- push_pay_pal == o.push_pay_pal &&
386
+ accept_paypal == o.accept_paypal &&
387
+ accounting_code == o.accounting_code &&
388
+ api_password == o.api_password &&
389
+ api_username == o.api_username &&
390
+ certificate_on_file == o.certificate_on_file &&
391
+ deposit_to_account == o.deposit_to_account &&
392
+ email == o.email &&
393
+ environment == o.environment &&
394
+ header_image_url == o.header_image_url &&
395
+ hide_bill_me_later == o.hide_bill_me_later &&
396
+ hide_express_checkout_on_view_cart == o.hide_express_checkout_on_view_cart &&
397
+ hide_for_unshipped_orders == o.hide_for_unshipped_orders &&
398
+ hold_in_ar == o.hold_in_ar &&
399
+ landing_page == o.landing_page &&
400
+ mode == o.mode &&
401
+ private_key_password == o.private_key_password &&
402
+ processing_fee == o.processing_fee &&
403
+ processing_percentage == o.processing_percentage &&
404
+ push_paypal == o.push_paypal &&
315
405
  restrictions == o.restrictions &&
316
- short_pay_pal_marketing_text == o.short_pay_pal_marketing_text
406
+ send_recurring == o.send_recurring &&
407
+ short_paypal_marketing_text == o.short_paypal_marketing_text &&
408
+ show_card_logos_not_directly_supported == o.show_card_logos_not_directly_supported &&
409
+ show_signature == o.show_signature &&
410
+ signature == o.signature &&
411
+ solution_type == o.solution_type &&
412
+ summary_email == o.summary_email &&
413
+ summary_mode == o.summary_mode &&
414
+ zero_dollar_penny == o.zero_dollar_penny
317
415
  end
318
416
 
319
417
  # @see the `==` method
@@ -325,7 +423,7 @@ module UltracartClient
325
423
  # Calculates hash code according to all attributes.
326
424
  # @return [Fixnum] Hash code
327
425
  def hash
328
- [accept_pay_pal, paypal_accounting_code, paypal_api_password, paypal_api_user_name, paypal_certificate_on_file, paypal_deposit_to_account, paypal_email, paypal_environment, paypal_header_image_url, paypal_hide_bill_me_later, paypal_hide_express_checkout_on_view_cart, paypal_hide_for_unshipped_orders, paypal_hold_in_ar, paypal_landing_page, paypal_mode, paypal_private_key_password, paypal_processing_fee, paypal_processing_perc, paypal_send_recurring, paypal_show_card_logos_not_directly_supported, paypal_show_signature, paypal_signature, paypal_solution_type, paypal_summary_email, paypal_summary_mode, paypal_zero_dollar_penny, push_pay_pal, restrictions, short_pay_pal_marketing_text].hash
426
+ [accept_paypal, accounting_code, api_password, api_username, certificate_on_file, deposit_to_account, email, environment, header_image_url, hide_bill_me_later, hide_express_checkout_on_view_cart, hide_for_unshipped_orders, hold_in_ar, landing_page, mode, private_key_password, processing_fee, processing_percentage, push_paypal, restrictions, send_recurring, short_paypal_marketing_text, show_card_logos_not_directly_supported, show_signature, signature, solution_type, summary_email, summary_mode, zero_dollar_penny].hash
329
427
  end
330
428
 
331
429
  # Builds the object from hash