ultracart_api 4.0.103.rc → 4.0.104.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,250 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class PointOfSaleRegister
18
+ # The merchant id that owns this point of sale register.
19
+ attr_accessor :merchant_id
20
+
21
+ # Name of the register.
22
+ attr_accessor :name
23
+
24
+ # Object identifier of the point of sale location where this register is located.
25
+ attr_accessor :pos_location_oid
26
+
27
+ # Object identifier of the point of sale register.
28
+ attr_accessor :pos_register_oid
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'merchant_id' => :'merchant_id',
34
+ :'name' => :'name',
35
+ :'pos_location_oid' => :'pos_location_oid',
36
+ :'pos_register_oid' => :'pos_register_oid'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'merchant_id' => :'String',
49
+ :'name' => :'String',
50
+ :'pos_location_oid' => :'Integer',
51
+ :'pos_register_oid' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::PointOfSaleRegister` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::PointOfSaleRegister`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'merchant_id')
77
+ self.merchant_id = attributes[:'merchant_id']
78
+ end
79
+
80
+ if attributes.key?(:'name')
81
+ self.name = attributes[:'name']
82
+ end
83
+
84
+ if attributes.key?(:'pos_location_oid')
85
+ self.pos_location_oid = attributes[:'pos_location_oid']
86
+ end
87
+
88
+ if attributes.key?(:'pos_register_oid')
89
+ self.pos_register_oid = attributes[:'pos_register_oid']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ merchant_id == o.merchant_id &&
112
+ name == o.name &&
113
+ pos_location_oid == o.pos_location_oid &&
114
+ pos_register_oid == o.pos_register_oid
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [merchant_id, name, pos_location_oid, pos_register_oid].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ new.build_from_hash(attributes)
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
+ self.send("#{key}=", nil)
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :Time
166
+ Time.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ # models (e.g. Pet) or oneOf
197
+ klass = UltracartClient.const_get(type)
198
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+
250
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.103.rc'
14
+ VERSION = '4.0.104.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -587,6 +587,7 @@ require 'ultracart_api/models/order_payment_insurance'
587
587
  require 'ultracart_api/models/order_payment_purchase_order'
588
588
  require 'ultracart_api/models/order_payment_transaction'
589
589
  require 'ultracart_api/models/order_payment_transaction_detail'
590
+ require 'ultracart_api/models/order_point_of_sale'
590
591
  require 'ultracart_api/models/order_process_payment_request'
591
592
  require 'ultracart_api/models/order_process_payment_response'
592
593
  require 'ultracart_api/models/order_property'
@@ -608,6 +609,9 @@ require 'ultracart_api/models/order_tracking_number_detail'
608
609
  require 'ultracart_api/models/order_tracking_number_details'
609
610
  require 'ultracart_api/models/orders_response'
610
611
  require 'ultracart_api/models/permission'
612
+ require 'ultracart_api/models/point_of_sale_location'
613
+ require 'ultracart_api/models/point_of_sale_reader'
614
+ require 'ultracart_api/models/point_of_sale_register'
611
615
  require 'ultracart_api/models/pricing_tier'
612
616
  require 'ultracart_api/models/pricing_tier_notification'
613
617
  require 'ultracart_api/models/pricing_tiers_response'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.103.rc
4
+ version: 4.0.104.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-27 00:00:00.000000000 Z
11
+ date: 2023-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -645,6 +645,7 @@ files:
645
645
  - docs/OrderPaymentPurchaseOrder.md
646
646
  - docs/OrderPaymentTransaction.md
647
647
  - docs/OrderPaymentTransactionDetail.md
648
+ - docs/OrderPointOfSale.md
648
649
  - docs/OrderProcessPaymentRequest.md
649
650
  - docs/OrderProcessPaymentResponse.md
650
651
  - docs/OrderProperty.md
@@ -666,6 +667,9 @@ files:
666
667
  - docs/OrderTrackingNumberDetails.md
667
668
  - docs/OrdersResponse.md
668
669
  - docs/Permission.md
670
+ - docs/PointOfSaleLocation.md
671
+ - docs/PointOfSaleReader.md
672
+ - docs/PointOfSaleRegister.md
669
673
  - docs/PricingTier.md
670
674
  - docs/PricingTierNotification.md
671
675
  - docs/PricingTiersResponse.md
@@ -1391,6 +1395,7 @@ files:
1391
1395
  - lib/ultracart_api/models/order_payment_purchase_order.rb
1392
1396
  - lib/ultracart_api/models/order_payment_transaction.rb
1393
1397
  - lib/ultracart_api/models/order_payment_transaction_detail.rb
1398
+ - lib/ultracart_api/models/order_point_of_sale.rb
1394
1399
  - lib/ultracart_api/models/order_process_payment_request.rb
1395
1400
  - lib/ultracart_api/models/order_process_payment_response.rb
1396
1401
  - lib/ultracart_api/models/order_property.rb
@@ -1412,6 +1417,9 @@ files:
1412
1417
  - lib/ultracart_api/models/order_tracking_number_details.rb
1413
1418
  - lib/ultracart_api/models/orders_response.rb
1414
1419
  - lib/ultracart_api/models/permission.rb
1420
+ - lib/ultracart_api/models/point_of_sale_location.rb
1421
+ - lib/ultracart_api/models/point_of_sale_reader.rb
1422
+ - lib/ultracart_api/models/point_of_sale_register.rb
1415
1423
  - lib/ultracart_api/models/pricing_tier.rb
1416
1424
  - lib/ultracart_api/models/pricing_tier_notification.rb
1417
1425
  - lib/ultracart_api/models/pricing_tiers_response.rb