ultracart_api 3.4.8 → 3.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/docs/PaymentsConfiguration.md +4 -4
  4. data/docs/PaymentsConfigurationAffirm.md +7 -7
  5. data/docs/PaymentsConfigurationAmazon.md +7 -7
  6. data/docs/PaymentsConfigurationCOD.md +5 -5
  7. data/docs/PaymentsConfigurationCash.md +1 -1
  8. data/docs/PaymentsConfigurationCheck.md +12 -13
  9. data/docs/PaymentsConfigurationCreditCard.md +11 -8
  10. data/docs/PaymentsConfigurationEcheck.md +3 -3
  11. data/docs/PaymentsConfigurationLoanHero.md +4 -4
  12. data/docs/PaymentsConfigurationMoneyOrder.md +3 -1
  13. data/docs/PaymentsConfigurationPayPal.md +28 -28
  14. data/docs/PaymentsConfigurationPurchaseOrder.md +3 -3
  15. data/docs/PaymentsConfigurationQuoteRequest.md +2 -2
  16. data/docs/PaymentsConfigurationRestrictions.md +12 -12
  17. data/docs/PaymentsConfigurationSezzle.md +8 -7
  18. data/docs/PaymentsConfigurationWePay.md +26 -26
  19. data/docs/PaymentsConfigurationWireTransfer.md +10 -10
  20. data/lib/ultracart_api/models/payments_configuration.rb +41 -40
  21. data/lib/ultracart_api/models/payments_configuration_affirm.rb +81 -40
  22. data/lib/ultracart_api/models/payments_configuration_amazon.rb +51 -44
  23. data/lib/ultracart_api/models/payments_configuration_cash.rb +4 -3
  24. data/lib/ultracart_api/models/payments_configuration_check.rb +71 -68
  25. data/lib/ultracart_api/models/payments_configuration_cod.rb +39 -34
  26. data/lib/ultracart_api/models/payments_configuration_credit_card.rb +71 -33
  27. data/lib/ultracart_api/models/payments_configuration_echeck.rb +22 -19
  28. data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +23 -19
  29. data/lib/ultracart_api/models/payments_configuration_money_order.rb +25 -4
  30. data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +270 -172
  31. data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +19 -16
  32. data/lib/ultracart_api/models/payments_configuration_quote_request.rb +12 -10
  33. data/lib/ultracart_api/models/payments_configuration_restrictions.rb +48 -36
  34. data/lib/ultracart_api/models/payments_configuration_sezzle.rb +97 -46
  35. data/lib/ultracart_api/models/payments_configuration_we_pay.rb +186 -160
  36. data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +71 -61
  37. data/lib/ultracart_api/version.rb +1 -1
  38. metadata +2 -2
@@ -14,20 +14,23 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationPurchaseOrder
17
+ # Master flag indicating this merchant accepts purchase orders
17
18
  attr_accessor :accept_purchase_orders
18
19
 
19
- attr_accessor :purchase_order_approved_customers_only
20
+ # If true, only approved customers may pay with a purchase order
21
+ attr_accessor :approved_customers_only
20
22
 
21
- attr_accessor :purchase_order_prevent_duplicate_number
23
+ # If true, customers may not use duplicate PO numbers for any order
24
+ attr_accessor :prevent_duplicate_number
22
25
 
23
26
  attr_accessor :restrictions
24
27
 
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
- :'accept_purchase_orders' => :'acceptPurchaseOrders',
29
- :'purchase_order_approved_customers_only' => :'purchaseOrderApprovedCustomersOnly',
30
- :'purchase_order_prevent_duplicate_number' => :'purchaseOrderPreventDuplicateNumber',
31
+ :'accept_purchase_orders' => :'accept_purchase_orders',
32
+ :'approved_customers_only' => :'approved_customers_only',
33
+ :'prevent_duplicate_number' => :'prevent_duplicate_number',
31
34
  :'restrictions' => :'restrictions'
32
35
  }
33
36
  end
@@ -36,8 +39,8 @@ module UltracartClient
36
39
  def self.swagger_types
37
40
  {
38
41
  :'accept_purchase_orders' => :'BOOLEAN',
39
- :'purchase_order_approved_customers_only' => :'BOOLEAN',
40
- :'purchase_order_prevent_duplicate_number' => :'BOOLEAN',
42
+ :'approved_customers_only' => :'BOOLEAN',
43
+ :'prevent_duplicate_number' => :'BOOLEAN',
41
44
  :'restrictions' => :'PaymentsConfigurationRestrictions'
42
45
  }
43
46
  end
@@ -50,16 +53,16 @@ module UltracartClient
50
53
  # convert string to symbol for hash key
51
54
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
55
 
53
- if attributes.has_key?(:'acceptPurchaseOrders')
54
- self.accept_purchase_orders = attributes[:'acceptPurchaseOrders']
56
+ if attributes.has_key?(:'accept_purchase_orders')
57
+ self.accept_purchase_orders = attributes[:'accept_purchase_orders']
55
58
  end
56
59
 
57
- if attributes.has_key?(:'purchaseOrderApprovedCustomersOnly')
58
- self.purchase_order_approved_customers_only = attributes[:'purchaseOrderApprovedCustomersOnly']
60
+ if attributes.has_key?(:'approved_customers_only')
61
+ self.approved_customers_only = attributes[:'approved_customers_only']
59
62
  end
60
63
 
61
- if attributes.has_key?(:'purchaseOrderPreventDuplicateNumber')
62
- self.purchase_order_prevent_duplicate_number = attributes[:'purchaseOrderPreventDuplicateNumber']
64
+ if attributes.has_key?(:'prevent_duplicate_number')
65
+ self.prevent_duplicate_number = attributes[:'prevent_duplicate_number']
63
66
  end
64
67
 
65
68
  if attributes.has_key?(:'restrictions')
@@ -86,8 +89,8 @@ module UltracartClient
86
89
  return true if self.equal?(o)
87
90
  self.class == o.class &&
88
91
  accept_purchase_orders == o.accept_purchase_orders &&
89
- purchase_order_approved_customers_only == o.purchase_order_approved_customers_only &&
90
- purchase_order_prevent_duplicate_number == o.purchase_order_prevent_duplicate_number &&
92
+ approved_customers_only == o.approved_customers_only &&
93
+ prevent_duplicate_number == o.prevent_duplicate_number &&
91
94
  restrictions == o.restrictions
92
95
  end
93
96
 
@@ -100,7 +103,7 @@ module UltracartClient
100
103
  # Calculates hash code according to all attributes.
101
104
  # @return [Fixnum] Hash code
102
105
  def hash
103
- [accept_purchase_orders, purchase_order_approved_customers_only, purchase_order_prevent_duplicate_number, restrictions].hash
106
+ [accept_purchase_orders, approved_customers_only, prevent_duplicate_number, restrictions].hash
104
107
  end
105
108
 
106
109
  # Builds the object from hash
@@ -14,17 +14,19 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationQuoteRequest
17
+ # Master flag indicating this merchant accepts quote requests
17
18
  attr_accessor :accept_quote_requests
18
19
 
19
- attr_accessor :quote_request_approved_customers_only
20
+ # If true, only approved customers may use quote requests
21
+ attr_accessor :approved_customers_only
20
22
 
21
23
  attr_accessor :restrictions
22
24
 
23
25
  # Attribute mapping from ruby-style variable name to JSON key.
24
26
  def self.attribute_map
25
27
  {
26
- :'accept_quote_requests' => :'acceptQuoteRequests',
27
- :'quote_request_approved_customers_only' => :'quoteRequestApprovedCustomersOnly',
28
+ :'accept_quote_requests' => :'accept_quote_requests',
29
+ :'approved_customers_only' => :'approved_customers_only',
28
30
  :'restrictions' => :'restrictions'
29
31
  }
30
32
  end
@@ -33,7 +35,7 @@ module UltracartClient
33
35
  def self.swagger_types
34
36
  {
35
37
  :'accept_quote_requests' => :'BOOLEAN',
36
- :'quote_request_approved_customers_only' => :'BOOLEAN',
38
+ :'approved_customers_only' => :'BOOLEAN',
37
39
  :'restrictions' => :'PaymentsConfigurationRestrictions'
38
40
  }
39
41
  end
@@ -46,12 +48,12 @@ module UltracartClient
46
48
  # convert string to symbol for hash key
47
49
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
50
 
49
- if attributes.has_key?(:'acceptQuoteRequests')
50
- self.accept_quote_requests = attributes[:'acceptQuoteRequests']
51
+ if attributes.has_key?(:'accept_quote_requests')
52
+ self.accept_quote_requests = attributes[:'accept_quote_requests']
51
53
  end
52
54
 
53
- if attributes.has_key?(:'quoteRequestApprovedCustomersOnly')
54
- self.quote_request_approved_customers_only = attributes[:'quoteRequestApprovedCustomersOnly']
55
+ if attributes.has_key?(:'approved_customers_only')
56
+ self.approved_customers_only = attributes[:'approved_customers_only']
55
57
  end
56
58
 
57
59
  if attributes.has_key?(:'restrictions')
@@ -78,7 +80,7 @@ module UltracartClient
78
80
  return true if self.equal?(o)
79
81
  self.class == o.class &&
80
82
  accept_quote_requests == o.accept_quote_requests &&
81
- quote_request_approved_customers_only == o.quote_request_approved_customers_only &&
83
+ approved_customers_only == o.approved_customers_only &&
82
84
  restrictions == o.restrictions
83
85
  end
84
86
 
@@ -91,7 +93,7 @@ module UltracartClient
91
93
  # Calculates hash code according to all attributes.
92
94
  # @return [Fixnum] Hash code
93
95
  def hash
94
- [accept_quote_requests, quote_request_approved_customers_only, restrictions].hash
96
+ [accept_quote_requests, approved_customers_only, restrictions].hash
95
97
  end
96
98
 
97
99
  # Builds the object from hash
@@ -14,45 +14,57 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationRestrictions
17
+ # Maximum subtotal
17
18
  attr_accessor :maximum_subtotal
18
19
 
20
+ # Minimum subtotal
19
21
  attr_accessor :minimum_subtotal
20
22
 
23
+ # Payment method
21
24
  attr_accessor :payment_method
22
25
 
26
+ # Alaska and Hawaii restriction
23
27
  attr_accessor :restriction_alaska_hawaii
24
28
 
29
+ # APO/FPO restriction
25
30
  attr_accessor :restriction_apo_fpo
26
31
 
32
+ # Canada restriction
27
33
  attr_accessor :restriction_canada
28
34
 
35
+ # Continental US restriction
29
36
  attr_accessor :restriction_continental_us
30
37
 
38
+ # Domestic only restriction
31
39
  attr_accessor :restriction_domestic_only
32
40
 
41
+ # International only restriction
33
42
  attr_accessor :restriction_international_only
34
43
 
44
+ # PO Box restriction
35
45
  attr_accessor :restriction_po_box
36
46
 
47
+ # Puerto Rico restriction
37
48
  attr_accessor :restriction_puerto_rico
38
49
 
50
+ # US Territories restriction
39
51
  attr_accessor :restriction_us_territories
40
52
 
41
53
  # Attribute mapping from ruby-style variable name to JSON key.
42
54
  def self.attribute_map
43
55
  {
44
- :'maximum_subtotal' => :'maximumSubtotal',
45
- :'minimum_subtotal' => :'minimumSubtotal',
46
- :'payment_method' => :'paymentMethod',
47
- :'restriction_alaska_hawaii' => :'restrictionAlaskaHawaii',
48
- :'restriction_apo_fpo' => :'restrictionApoFpo',
49
- :'restriction_canada' => :'restrictionCanada',
50
- :'restriction_continental_us' => :'restrictionContinentalUS',
51
- :'restriction_domestic_only' => :'restrictionDomesticOnly',
52
- :'restriction_international_only' => :'restrictionInternationalOnly',
53
- :'restriction_po_box' => :'restrictionPoBox',
54
- :'restriction_puerto_rico' => :'restrictionPuertoRico',
55
- :'restriction_us_territories' => :'restrictionUSTerritories'
56
+ :'maximum_subtotal' => :'maximum_subtotal',
57
+ :'minimum_subtotal' => :'minimum_subtotal',
58
+ :'payment_method' => :'payment_method',
59
+ :'restriction_alaska_hawaii' => :'restriction_alaska_hawaii',
60
+ :'restriction_apo_fpo' => :'restriction_apo_fpo',
61
+ :'restriction_canada' => :'restriction_canada',
62
+ :'restriction_continental_us' => :'restriction_continental_us',
63
+ :'restriction_domestic_only' => :'restriction_domestic_only',
64
+ :'restriction_international_only' => :'restriction_international_only',
65
+ :'restriction_po_box' => :'restriction_po_box',
66
+ :'restriction_puerto_rico' => :'restriction_puerto_rico',
67
+ :'restriction_us_territories' => :'restriction_us_territories'
56
68
  }
57
69
  end
58
70
 
@@ -82,52 +94,52 @@ module UltracartClient
82
94
  # convert string to symbol for hash key
83
95
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
84
96
 
85
- if attributes.has_key?(:'maximumSubtotal')
86
- self.maximum_subtotal = attributes[:'maximumSubtotal']
97
+ if attributes.has_key?(:'maximum_subtotal')
98
+ self.maximum_subtotal = attributes[:'maximum_subtotal']
87
99
  end
88
100
 
89
- if attributes.has_key?(:'minimumSubtotal')
90
- self.minimum_subtotal = attributes[:'minimumSubtotal']
101
+ if attributes.has_key?(:'minimum_subtotal')
102
+ self.minimum_subtotal = attributes[:'minimum_subtotal']
91
103
  end
92
104
 
93
- if attributes.has_key?(:'paymentMethod')
94
- self.payment_method = attributes[:'paymentMethod']
105
+ if attributes.has_key?(:'payment_method')
106
+ self.payment_method = attributes[:'payment_method']
95
107
  end
96
108
 
97
- if attributes.has_key?(:'restrictionAlaskaHawaii')
98
- self.restriction_alaska_hawaii = attributes[:'restrictionAlaskaHawaii']
109
+ if attributes.has_key?(:'restriction_alaska_hawaii')
110
+ self.restriction_alaska_hawaii = attributes[:'restriction_alaska_hawaii']
99
111
  end
100
112
 
101
- if attributes.has_key?(:'restrictionApoFpo')
102
- self.restriction_apo_fpo = attributes[:'restrictionApoFpo']
113
+ if attributes.has_key?(:'restriction_apo_fpo')
114
+ self.restriction_apo_fpo = attributes[:'restriction_apo_fpo']
103
115
  end
104
116
 
105
- if attributes.has_key?(:'restrictionCanada')
106
- self.restriction_canada = attributes[:'restrictionCanada']
117
+ if attributes.has_key?(:'restriction_canada')
118
+ self.restriction_canada = attributes[:'restriction_canada']
107
119
  end
108
120
 
109
- if attributes.has_key?(:'restrictionContinentalUS')
110
- self.restriction_continental_us = attributes[:'restrictionContinentalUS']
121
+ if attributes.has_key?(:'restriction_continental_us')
122
+ self.restriction_continental_us = attributes[:'restriction_continental_us']
111
123
  end
112
124
 
113
- if attributes.has_key?(:'restrictionDomesticOnly')
114
- self.restriction_domestic_only = attributes[:'restrictionDomesticOnly']
125
+ if attributes.has_key?(:'restriction_domestic_only')
126
+ self.restriction_domestic_only = attributes[:'restriction_domestic_only']
115
127
  end
116
128
 
117
- if attributes.has_key?(:'restrictionInternationalOnly')
118
- self.restriction_international_only = attributes[:'restrictionInternationalOnly']
129
+ if attributes.has_key?(:'restriction_international_only')
130
+ self.restriction_international_only = attributes[:'restriction_international_only']
119
131
  end
120
132
 
121
- if attributes.has_key?(:'restrictionPoBox')
122
- self.restriction_po_box = attributes[:'restrictionPoBox']
133
+ if attributes.has_key?(:'restriction_po_box')
134
+ self.restriction_po_box = attributes[:'restriction_po_box']
123
135
  end
124
136
 
125
- if attributes.has_key?(:'restrictionPuertoRico')
126
- self.restriction_puerto_rico = attributes[:'restrictionPuertoRico']
137
+ if attributes.has_key?(:'restriction_puerto_rico')
138
+ self.restriction_puerto_rico = attributes[:'restriction_puerto_rico']
127
139
  end
128
140
 
129
- if attributes.has_key?(:'restrictionUSTerritories')
130
- self.restriction_us_territories = attributes[:'restrictionUSTerritories']
141
+ if attributes.has_key?(:'restriction_us_territories')
142
+ self.restriction_us_territories = attributes[:'restriction_us_territories']
131
143
  end
132
144
  end
133
145
 
@@ -14,33 +14,66 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class PaymentsConfigurationSezzle
17
+ # Master flag for this merchant accepting Sezzle payments
17
18
  attr_accessor :accept_sezzle
18
19
 
19
- attr_accessor :restrictions
20
+ # Optional Quickbooks code for this payment method
21
+ attr_accessor :accounting_code
22
+
23
+ # Business ID
24
+ attr_accessor :business_id
25
+
26
+ # Optional Quickbooks Deposit to Account value
27
+ attr_accessor :deposit_to_account
20
28
 
21
- attr_accessor :sezzle_accounting_code
29
+ # Sezzle environment
30
+ attr_accessor :environment
22
31
 
23
- attr_accessor :sezzle_business_id
32
+ # List of environments possible
33
+ attr_accessor :environments
24
34
 
25
- attr_accessor :sezzle_deposit_to_account
35
+ # Private API key
36
+ attr_accessor :private_api_key
26
37
 
27
- attr_accessor :sezzle_environment
38
+ # Public API key
39
+ attr_accessor :public_api_key
40
+
41
+ attr_accessor :restrictions
28
42
 
29
- attr_accessor :sezzle_private_api_key
43
+ class EnumAttributeValidator
44
+ attr_reader :datatype
45
+ attr_reader :allowable_values
46
+
47
+ def initialize(datatype, allowable_values)
48
+ @allowable_values = allowable_values.map do |value|
49
+ case datatype.to_s
50
+ when /Integer/i
51
+ value.to_i
52
+ when /Float/i
53
+ value.to_f
54
+ else
55
+ value
56
+ end
57
+ end
58
+ end
30
59
 
31
- attr_accessor :sezzle_public_api_key
60
+ def valid?(value)
61
+ !value || allowable_values.include?(value)
62
+ end
63
+ end
32
64
 
33
65
  # Attribute mapping from ruby-style variable name to JSON key.
34
66
  def self.attribute_map
35
67
  {
36
- :'accept_sezzle' => :'acceptSezzle',
37
- :'restrictions' => :'restrictions',
38
- :'sezzle_accounting_code' => :'sezzleAccountingCode',
39
- :'sezzle_business_id' => :'sezzleBusinessId',
40
- :'sezzle_deposit_to_account' => :'sezzleDepositToAccount',
41
- :'sezzle_environment' => :'sezzleEnvironment',
42
- :'sezzle_private_api_key' => :'sezzlePrivateApiKey',
43
- :'sezzle_public_api_key' => :'sezzlePublicApiKey'
68
+ :'accept_sezzle' => :'accept_sezzle',
69
+ :'accounting_code' => :'accounting_code',
70
+ :'business_id' => :'business_id',
71
+ :'deposit_to_account' => :'deposit_to_account',
72
+ :'environment' => :'environment',
73
+ :'environments' => :'environments',
74
+ :'private_api_key' => :'private_api_key',
75
+ :'public_api_key' => :'public_api_key',
76
+ :'restrictions' => :'restrictions'
44
77
  }
45
78
  end
46
79
 
@@ -48,13 +81,14 @@ module UltracartClient
48
81
  def self.swagger_types
49
82
  {
50
83
  :'accept_sezzle' => :'BOOLEAN',
51
- :'restrictions' => :'PaymentsConfigurationRestrictions',
52
- :'sezzle_accounting_code' => :'String',
53
- :'sezzle_business_id' => :'String',
54
- :'sezzle_deposit_to_account' => :'String',
55
- :'sezzle_environment' => :'String',
56
- :'sezzle_private_api_key' => :'String',
57
- :'sezzle_public_api_key' => :'String'
84
+ :'accounting_code' => :'String',
85
+ :'business_id' => :'String',
86
+ :'deposit_to_account' => :'String',
87
+ :'environment' => :'String',
88
+ :'environments' => :'Object',
89
+ :'private_api_key' => :'String',
90
+ :'public_api_key' => :'String',
91
+ :'restrictions' => :'PaymentsConfigurationRestrictions'
58
92
  }
59
93
  end
60
94
 
@@ -66,36 +100,40 @@ module UltracartClient
66
100
  # convert string to symbol for hash key
67
101
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
102
 
69
- if attributes.has_key?(:'acceptSezzle')
70
- self.accept_sezzle = attributes[:'acceptSezzle']
103
+ if attributes.has_key?(:'accept_sezzle')
104
+ self.accept_sezzle = attributes[:'accept_sezzle']
71
105
  end
72
106
 
73
- if attributes.has_key?(:'restrictions')
74
- self.restrictions = attributes[:'restrictions']
107
+ if attributes.has_key?(:'accounting_code')
108
+ self.accounting_code = attributes[:'accounting_code']
75
109
  end
76
110
 
77
- if attributes.has_key?(:'sezzleAccountingCode')
78
- self.sezzle_accounting_code = attributes[:'sezzleAccountingCode']
111
+ if attributes.has_key?(:'business_id')
112
+ self.business_id = attributes[:'business_id']
79
113
  end
80
114
 
81
- if attributes.has_key?(:'sezzleBusinessId')
82
- self.sezzle_business_id = attributes[:'sezzleBusinessId']
115
+ if attributes.has_key?(:'deposit_to_account')
116
+ self.deposit_to_account = attributes[:'deposit_to_account']
83
117
  end
84
118
 
85
- if attributes.has_key?(:'sezzleDepositToAccount')
86
- self.sezzle_deposit_to_account = attributes[:'sezzleDepositToAccount']
119
+ if attributes.has_key?(:'environment')
120
+ self.environment = attributes[:'environment']
87
121
  end
88
122
 
89
- if attributes.has_key?(:'sezzleEnvironment')
90
- self.sezzle_environment = attributes[:'sezzleEnvironment']
123
+ if attributes.has_key?(:'environments')
124
+ self.environments = attributes[:'environments']
91
125
  end
92
126
 
93
- if attributes.has_key?(:'sezzlePrivateApiKey')
94
- self.sezzle_private_api_key = attributes[:'sezzlePrivateApiKey']
127
+ if attributes.has_key?(:'private_api_key')
128
+ self.private_api_key = attributes[:'private_api_key']
95
129
  end
96
130
 
97
- if attributes.has_key?(:'sezzlePublicApiKey')
98
- self.sezzle_public_api_key = attributes[:'sezzlePublicApiKey']
131
+ if attributes.has_key?(:'public_api_key')
132
+ self.public_api_key = attributes[:'public_api_key']
133
+ end
134
+
135
+ if attributes.has_key?(:'restrictions')
136
+ self.restrictions = attributes[:'restrictions']
99
137
  end
100
138
  end
101
139
 
@@ -109,22 +147,35 @@ module UltracartClient
109
147
  # Check to see if the all the properties in the model are valid
110
148
  # @return true if the model is valid
111
149
  def valid?
150
+ environment_validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
151
+ return false unless environment_validator.valid?(@environment)
112
152
  true
113
153
  end
114
154
 
155
+ # Custom attribute writer method checking allowed values (enum).
156
+ # @param [Object] environment Object to be assigned
157
+ def environment=(environment)
158
+ validator = EnumAttributeValidator.new('String', ['Live', 'Sandbox'])
159
+ unless validator.valid?(environment)
160
+ fail ArgumentError, 'invalid value for "environment", must be one of #{validator.allowable_values}.'
161
+ end
162
+ @environment = environment
163
+ end
164
+
115
165
  # Checks equality by comparing each attribute.
116
166
  # @param [Object] Object to be compared
117
167
  def ==(o)
118
168
  return true if self.equal?(o)
119
169
  self.class == o.class &&
120
170
  accept_sezzle == o.accept_sezzle &&
121
- restrictions == o.restrictions &&
122
- sezzle_accounting_code == o.sezzle_accounting_code &&
123
- sezzle_business_id == o.sezzle_business_id &&
124
- sezzle_deposit_to_account == o.sezzle_deposit_to_account &&
125
- sezzle_environment == o.sezzle_environment &&
126
- sezzle_private_api_key == o.sezzle_private_api_key &&
127
- sezzle_public_api_key == o.sezzle_public_api_key
171
+ accounting_code == o.accounting_code &&
172
+ business_id == o.business_id &&
173
+ deposit_to_account == o.deposit_to_account &&
174
+ environment == o.environment &&
175
+ environments == o.environments &&
176
+ private_api_key == o.private_api_key &&
177
+ public_api_key == o.public_api_key &&
178
+ restrictions == o.restrictions
128
179
  end
129
180
 
130
181
  # @see the `==` method
@@ -136,7 +187,7 @@ module UltracartClient
136
187
  # Calculates hash code according to all attributes.
137
188
  # @return [Fixnum] Hash code
138
189
  def hash
139
- [accept_sezzle, restrictions, sezzle_accounting_code, sezzle_business_id, sezzle_deposit_to_account, sezzle_environment, sezzle_private_api_key, sezzle_public_api_key].hash
190
+ [accept_sezzle, accounting_code, business_id, deposit_to_account, environment, environments, private_api_key, public_api_key, restrictions].hash
140
191
  end
141
192
 
142
193
  # Builds the object from hash