ultracart_api 3.10.85 → 3.10.87
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -4
- data/docs/Coupon.md +4 -0
- data/docs/CouponMoreLoyaltyCashback.md +8 -0
- data/docs/CouponMoreLoyaltyPoints.md +8 -0
- data/docs/CouponPercentMoreLoyaltyCashback.md +8 -0
- data/docs/CouponPercentMoreLoyaltyPoints.md +8 -0
- data/docs/Order.md +1 -0
- data/docs/OrderPointOfSale.md +10 -0
- data/docs/PointOfSaleLocation.md +16 -0
- data/docs/PointOfSaleReader.md +16 -0
- data/docs/PointOfSaleRegister.md +11 -0
- data/lib/ultracart_api/models/coupon.rb +37 -1
- data/lib/ultracart_api/models/coupon_more_loyalty_cashback.rb +185 -0
- data/lib/ultracart_api/models/coupon_more_loyalty_points.rb +185 -0
- data/lib/ultracart_api/models/coupon_percent_more_loyalty_cashback.rb +185 -0
- data/lib/ultracart_api/models/coupon_percent_more_loyalty_points.rb +185 -0
- data/lib/ultracart_api/models/order.rb +10 -1
- data/lib/ultracart_api/models/order_point_of_sale.rb +202 -0
- data/lib/ultracart_api/models/point_of_sale_location.rb +265 -0
- data/lib/ultracart_api/models/point_of_sale_reader.rb +299 -0
- data/lib/ultracart_api/models/point_of_sale_register.rb +215 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
@@ -0,0 +1,215 @@
|
|
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 PointOfSaleRegister
|
17
|
+
# The merchant id that owns this point of sale register.
|
18
|
+
attr_accessor :merchant_id
|
19
|
+
|
20
|
+
# Name of the register.
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# Object identifier of the point of sale location where this register is located.
|
24
|
+
attr_accessor :pos_location_oid
|
25
|
+
|
26
|
+
# Object identifier of the point of sale register.
|
27
|
+
attr_accessor :pos_register_oid
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'merchant_id' => :'merchant_id',
|
33
|
+
:'name' => :'name',
|
34
|
+
:'pos_location_oid' => :'pos_location_oid',
|
35
|
+
:'pos_register_oid' => :'pos_register_oid'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'merchant_id' => :'String',
|
43
|
+
:'name' => :'String',
|
44
|
+
:'pos_location_oid' => :'Integer',
|
45
|
+
:'pos_register_oid' => :'Integer'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'merchant_id')
|
58
|
+
self.merchant_id = attributes[:'merchant_id']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'name')
|
62
|
+
self.name = attributes[:'name']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'pos_location_oid')
|
66
|
+
self.pos_location_oid = attributes[:'pos_location_oid']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'pos_register_oid')
|
70
|
+
self.pos_register_oid = attributes[:'pos_register_oid']
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
merchant_id == o.merchant_id &&
|
93
|
+
name == o.name &&
|
94
|
+
pos_location_oid == o.pos_location_oid &&
|
95
|
+
pos_register_oid == o.pos_register_oid
|
96
|
+
end
|
97
|
+
|
98
|
+
# @see the `==` method
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
102
|
+
end
|
103
|
+
|
104
|
+
# Calculates hash code according to all attributes.
|
105
|
+
# @return [Fixnum] Hash code
|
106
|
+
def hash
|
107
|
+
[merchant_id, name, pos_location_oid, pos_register_oid].hash
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.swagger_types.each_pair do |key, type|
|
116
|
+
if type =~ /\AArray<(.*)>/i
|
117
|
+
# check to ensure the input is an array given that the attribute
|
118
|
+
# is documented as an array but the input is not
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
125
|
+
end
|
126
|
+
|
127
|
+
self
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def _deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :DateTime
|
137
|
+
DateTime.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :BOOLEAN
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
temp_model = UltracartClient.const_get(type).new
|
168
|
+
temp_model.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
next if value.nil?
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
# For object, use to_hash. Otherwise, just return the value
|
198
|
+
# @param [Object] value Any valid value
|
199
|
+
# @return [Hash] Returns the value in the form of hash
|
200
|
+
def _to_hash(value)
|
201
|
+
if value.is_a?(Array)
|
202
|
+
value.compact.map { |v| _to_hash(v) }
|
203
|
+
elsif value.is_a?(Hash)
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
206
|
+
end
|
207
|
+
elsif value.respond_to? :to_hash
|
208
|
+
value.to_hash
|
209
|
+
else
|
210
|
+
value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
215
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -220,8 +220,12 @@ require 'ultracart_api/models/coupon_free_shipping_with_items_purchase'
|
|
220
220
|
require 'ultracart_api/models/coupon_free_shipping_with_subtotal'
|
221
221
|
require 'ultracart_api/models/coupon_item_search_result'
|
222
222
|
require 'ultracart_api/models/coupon_item_search_results_response'
|
223
|
+
require 'ultracart_api/models/coupon_more_loyalty_cashback'
|
224
|
+
require 'ultracart_api/models/coupon_more_loyalty_points'
|
223
225
|
require 'ultracart_api/models/coupon_multiple_amounts_off_items'
|
224
226
|
require 'ultracart_api/models/coupon_no_discount'
|
227
|
+
require 'ultracart_api/models/coupon_percent_more_loyalty_cashback'
|
228
|
+
require 'ultracart_api/models/coupon_percent_more_loyalty_points'
|
225
229
|
require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purchase'
|
226
230
|
require 'ultracart_api/models/coupon_percent_off_items'
|
227
231
|
require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
|
@@ -584,6 +588,7 @@ require 'ultracart_api/models/order_payment_insurance'
|
|
584
588
|
require 'ultracart_api/models/order_payment_purchase_order'
|
585
589
|
require 'ultracart_api/models/order_payment_transaction'
|
586
590
|
require 'ultracart_api/models/order_payment_transaction_detail'
|
591
|
+
require 'ultracart_api/models/order_point_of_sale'
|
587
592
|
require 'ultracart_api/models/order_process_payment_request'
|
588
593
|
require 'ultracart_api/models/order_process_payment_response'
|
589
594
|
require 'ultracart_api/models/order_property'
|
@@ -605,6 +610,9 @@ require 'ultracart_api/models/order_tracking_number_detail'
|
|
605
610
|
require 'ultracart_api/models/order_tracking_number_details'
|
606
611
|
require 'ultracart_api/models/orders_response'
|
607
612
|
require 'ultracart_api/models/permission'
|
613
|
+
require 'ultracart_api/models/point_of_sale_location'
|
614
|
+
require 'ultracart_api/models/point_of_sale_reader'
|
615
|
+
require 'ultracart_api/models/point_of_sale_register'
|
608
616
|
require 'ultracart_api/models/pricing_tier'
|
609
617
|
require 'ultracart_api/models/pricing_tier_notification'
|
610
618
|
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: 3.10.
|
4
|
+
version: 3.10.87
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -431,8 +431,12 @@ files:
|
|
431
431
|
- docs/CouponFreeShippingWithSubtotal.md
|
432
432
|
- docs/CouponItemSearchResult.md
|
433
433
|
- docs/CouponItemSearchResultsResponse.md
|
434
|
+
- docs/CouponMoreLoyaltyCashback.md
|
435
|
+
- docs/CouponMoreLoyaltyPoints.md
|
434
436
|
- docs/CouponMultipleAmountsOffItems.md
|
435
437
|
- docs/CouponNoDiscount.md
|
438
|
+
- docs/CouponPercentMoreLoyaltyCashback.md
|
439
|
+
- docs/CouponPercentMoreLoyaltyPoints.md
|
436
440
|
- docs/CouponPercentOffItemWithItemsQuantityPurchase.md
|
437
441
|
- docs/CouponPercentOffItems.md
|
438
442
|
- docs/CouponPercentOffItemsAndFreeShipping.md
|
@@ -802,6 +806,7 @@ files:
|
|
802
806
|
- docs/OrderPaymentPurchaseOrder.md
|
803
807
|
- docs/OrderPaymentTransaction.md
|
804
808
|
- docs/OrderPaymentTransactionDetail.md
|
809
|
+
- docs/OrderPointOfSale.md
|
805
810
|
- docs/OrderProcessPaymentRequest.md
|
806
811
|
- docs/OrderProcessPaymentResponse.md
|
807
812
|
- docs/OrderProperty.md
|
@@ -823,6 +828,9 @@ files:
|
|
823
828
|
- docs/OrderTrackingNumberDetails.md
|
824
829
|
- docs/OrdersResponse.md
|
825
830
|
- docs/Permission.md
|
831
|
+
- docs/PointOfSaleLocation.md
|
832
|
+
- docs/PointOfSaleReader.md
|
833
|
+
- docs/PointOfSaleRegister.md
|
826
834
|
- docs/PricingTier.md
|
827
835
|
- docs/PricingTierNotification.md
|
828
836
|
- docs/PricingTiersResponse.md
|
@@ -1181,8 +1189,12 @@ files:
|
|
1181
1189
|
- lib/ultracart_api/models/coupon_free_shipping_with_subtotal.rb
|
1182
1190
|
- lib/ultracart_api/models/coupon_item_search_result.rb
|
1183
1191
|
- lib/ultracart_api/models/coupon_item_search_results_response.rb
|
1192
|
+
- lib/ultracart_api/models/coupon_more_loyalty_cashback.rb
|
1193
|
+
- lib/ultracart_api/models/coupon_more_loyalty_points.rb
|
1184
1194
|
- lib/ultracart_api/models/coupon_multiple_amounts_off_items.rb
|
1185
1195
|
- lib/ultracart_api/models/coupon_no_discount.rb
|
1196
|
+
- lib/ultracart_api/models/coupon_percent_more_loyalty_cashback.rb
|
1197
|
+
- lib/ultracart_api/models/coupon_percent_more_loyalty_points.rb
|
1186
1198
|
- lib/ultracart_api/models/coupon_percent_off_item_with_items_quantity_purchase.rb
|
1187
1199
|
- lib/ultracart_api/models/coupon_percent_off_items.rb
|
1188
1200
|
- lib/ultracart_api/models/coupon_percent_off_items_and_free_shipping.rb
|
@@ -1545,6 +1557,7 @@ files:
|
|
1545
1557
|
- lib/ultracart_api/models/order_payment_purchase_order.rb
|
1546
1558
|
- lib/ultracart_api/models/order_payment_transaction.rb
|
1547
1559
|
- lib/ultracart_api/models/order_payment_transaction_detail.rb
|
1560
|
+
- lib/ultracart_api/models/order_point_of_sale.rb
|
1548
1561
|
- lib/ultracart_api/models/order_process_payment_request.rb
|
1549
1562
|
- lib/ultracart_api/models/order_process_payment_response.rb
|
1550
1563
|
- lib/ultracart_api/models/order_property.rb
|
@@ -1566,6 +1579,9 @@ files:
|
|
1566
1579
|
- lib/ultracart_api/models/order_tracking_number_details.rb
|
1567
1580
|
- lib/ultracart_api/models/orders_response.rb
|
1568
1581
|
- lib/ultracart_api/models/permission.rb
|
1582
|
+
- lib/ultracart_api/models/point_of_sale_location.rb
|
1583
|
+
- lib/ultracart_api/models/point_of_sale_reader.rb
|
1584
|
+
- lib/ultracart_api/models/point_of_sale_register.rb
|
1569
1585
|
- lib/ultracart_api/models/pricing_tier.rb
|
1570
1586
|
- lib/ultracart_api/models/pricing_tier_notification.rb
|
1571
1587
|
- lib/ultracart_api/models/pricing_tiers_response.rb
|