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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 863c755bc404ed1ae18d8c3c38b32160ae1f4dd4d15c23fbcdd726fc840a27a0
4
- data.tar.gz: 50ed92c2b89e35fd855428b123aec0ac7985fee17f8997f71be58c9ce3ded267
3
+ metadata.gz: f46b8ecfa9f4fa1215427090019e8e29d70fa1b4b1004ab5b86fd7fd8596bf58
4
+ data.tar.gz: 242bf11f0c10ed247c7a187f4ab2dfc41579d084c22ed2e6876e95ddff627b9e
5
5
  SHA512:
6
- metadata.gz: 910c7d48bb30def245e60aea214d2da7b696339bccf53b9392d1359b242d98efb7fd07ddb1f2748bcf532ff3759cbaf0f5ddd458ca3d57bd51cf8543570e86f0
7
- data.tar.gz: 271d69adb4e1d7c2638a1984685b90b6779e8a63fc8962d6c054f67520e6a3d89735e2919140b5e8d2c4edffd13ae59f6ae920ba2b6cb39caa2b03f91358d917
6
+ metadata.gz: cdef64baca51718c026f1ae10a54095280989a9ae4a47ea4e0ccbf13e6407da083b5da7f8f9d1138e1e517216c69d846b5a86606f0df5d1cace978162f0346af
7
+ data.tar.gz: 78938e1c6022e3594402ffaff5d10df088bedda7410e77fd386545ecc377f219b756da6e4bb2645ee7830a1afc35d180e552d742402977ac2a251f91f8584af7
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.103.rc
10
+ - Package version: 4.0.104.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.103.rc.gem
27
+ gem install ./ultracart_api-4.0.104.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.103.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.104.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.103.rc'
36
+ gem 'ultracart_api', '~> 4.0.104.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -1055,6 +1055,7 @@ Class | Method | HTTP request | Description
1055
1055
  - [UltracartClient::OrderPaymentPurchaseOrder](docs/OrderPaymentPurchaseOrder.md)
1056
1056
  - [UltracartClient::OrderPaymentTransaction](docs/OrderPaymentTransaction.md)
1057
1057
  - [UltracartClient::OrderPaymentTransactionDetail](docs/OrderPaymentTransactionDetail.md)
1058
+ - [UltracartClient::OrderPointOfSale](docs/OrderPointOfSale.md)
1058
1059
  - [UltracartClient::OrderProcessPaymentRequest](docs/OrderProcessPaymentRequest.md)
1059
1060
  - [UltracartClient::OrderProcessPaymentResponse](docs/OrderProcessPaymentResponse.md)
1060
1061
  - [UltracartClient::OrderProperty](docs/OrderProperty.md)
@@ -1076,6 +1077,9 @@ Class | Method | HTTP request | Description
1076
1077
  - [UltracartClient::OrderTrackingNumberDetails](docs/OrderTrackingNumberDetails.md)
1077
1078
  - [UltracartClient::OrdersResponse](docs/OrdersResponse.md)
1078
1079
  - [UltracartClient::Permission](docs/Permission.md)
1080
+ - [UltracartClient::PointOfSaleLocation](docs/PointOfSaleLocation.md)
1081
+ - [UltracartClient::PointOfSaleReader](docs/PointOfSaleReader.md)
1082
+ - [UltracartClient::PointOfSaleRegister](docs/PointOfSaleRegister.md)
1079
1083
  - [UltracartClient::PricingTier](docs/PricingTier.md)
1080
1084
  - [UltracartClient::PricingTierNotification](docs/PricingTierNotification.md)
1081
1085
  - [UltracartClient::PricingTiersResponse](docs/PricingTiersResponse.md)
@@ -1275,6 +1279,7 @@ Not every change is committed to every SDK.
1275
1279
 
1276
1280
  | Version | Date | Comments |
1277
1281
  | --: | :-: | --- |
1282
+ | 4.0.104-RC | 01/03/2023 | order point of sale details |
1278
1283
  | 4.0.103-RC | 12/27/2022 | additional loyalty related coupons |
1279
1284
  | 4.0.102-RC | 12/21/2022 | conversation development |
1280
1285
  | 4.0.101-RC | 12/20/2022 | conversation engagement update |
data/docs/Order.md CHANGED
@@ -29,6 +29,7 @@
29
29
  | **merchant_id** | **String** | UltraCart merchant ID owning this order | [optional] |
30
30
  | **order_id** | **String** | Order ID | [optional] |
31
31
  | **payment** | [**OrderPayment**](OrderPayment.md) | | [optional] |
32
+ | **point_of_sale** | [**OrderPointOfSale**](OrderPointOfSale.md) | | [optional] |
32
33
  | **properties** | [**Array<OrderProperty>**](OrderProperty.md) | Properties, available only through update, not through insert due to the nature of how properties are handled internally | [optional] |
33
34
  | **quote** | [**OrderQuote**](OrderQuote.md) | | [optional] |
34
35
  | **refund_dts** | **String** | If the order was refunded, the date/time that the last refund occurred | [optional] |
@@ -70,6 +71,7 @@ instance = UltracartClient::Order.new(
70
71
  merchant_id: null,
71
72
  order_id: null,
72
73
  payment: null,
74
+ point_of_sale: null,
73
75
  properties: null,
74
76
  quote: null,
75
77
  refund_dts: null,
@@ -0,0 +1,22 @@
1
+ # UltracartClient::OrderPointOfSale
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **location** | [**PointOfSaleLocation**](PointOfSaleLocation.md) | | [optional] |
8
+ | **reader** | [**PointOfSaleReader**](PointOfSaleReader.md) | | [optional] |
9
+ | **register** | [**PointOfSaleRegister**](PointOfSaleRegister.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::OrderPointOfSale.new(
17
+ location: null,
18
+ reader: null,
19
+ register: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,34 @@
1
+ # UltracartClient::PointOfSaleLocation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **adddress2** | **String** | Address line 2 | [optional] |
8
+ | **address1** | **String** | Address line 1 | [optional] |
9
+ | **city** | **String** | City | [optional] |
10
+ | **country** | **String** | Country | [optional] |
11
+ | **distribution_center_code** | **String** | The distribution center code where inventory is reduced from for this sale. | [optional] |
12
+ | **merchant_id** | **String** | Merchant ID that owns this location | [optional] |
13
+ | **pos_location_oid** | **Integer** | Object identifier of the point of sale location. | [optional] |
14
+ | **postal_code** | **String** | Postal code | [optional] |
15
+ | **state_province** | **String** | State/province | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::PointOfSaleLocation.new(
23
+ adddress2: null,
24
+ address1: null,
25
+ city: null,
26
+ country: null,
27
+ distribution_center_code: null,
28
+ merchant_id: null,
29
+ pos_location_oid: null,
30
+ postal_code: null,
31
+ state_province: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,34 @@
1
+ # UltracartClient::PointOfSaleReader
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **device_type** | **String** | The device type of the reader. | [optional] |
8
+ | **label** | **String** | The label of the reader. | [optional] |
9
+ | **merchant_id** | **String** | The merchant id that owns this point of sale reader. | [optional] |
10
+ | **payment_provider** | **String** | The payment provider for the card reader. | [optional] |
11
+ | **pos_reader_id** | **Integer** | Object identifier of the point of sale reader. | [optional] |
12
+ | **pos_register_oid** | **Integer** | Object identifier of the point of sale register this reader is assigned to. | [optional] |
13
+ | **serial_number** | **String** | The serial number of the reader. | [optional] |
14
+ | **stripe_account_id** | **String** | If the payment provider is Stripe, this is the Stripe account id | [optional] |
15
+ | **stripe_reader_id** | **String** | If the payment provide is Stripe, this is the Stripe terminal reader id | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::PointOfSaleReader.new(
23
+ device_type: null,
24
+ label: null,
25
+ merchant_id: null,
26
+ payment_provider: null,
27
+ pos_reader_id: null,
28
+ pos_register_oid: null,
29
+ serial_number: null,
30
+ stripe_account_id: null,
31
+ stripe_reader_id: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,24 @@
1
+ # UltracartClient::PointOfSaleRegister
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **merchant_id** | **String** | The merchant id that owns this point of sale register. | [optional] |
8
+ | **name** | **String** | Name of the register. | [optional] |
9
+ | **pos_location_oid** | **Integer** | Object identifier of the point of sale location where this register is located. | [optional] |
10
+ | **pos_register_oid** | **Integer** | Object identifier of the point of sale register. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ultracart_api'
16
+
17
+ instance = UltracartClient::PointOfSaleRegister.new(
18
+ merchant_id: null,
19
+ name: null,
20
+ pos_location_oid: null,
21
+ pos_register_oid: null
22
+ )
23
+ ```
24
+
@@ -75,6 +75,8 @@ module UltracartClient
75
75
 
76
76
  attr_accessor :payment
77
77
 
78
+ attr_accessor :point_of_sale
79
+
78
80
  # Properties, available only through update, not through insert due to the nature of how properties are handled internally
79
81
  attr_accessor :properties
80
82
 
@@ -147,6 +149,7 @@ module UltracartClient
147
149
  :'merchant_id' => :'merchant_id',
148
150
  :'order_id' => :'order_id',
149
151
  :'payment' => :'payment',
152
+ :'point_of_sale' => :'point_of_sale',
150
153
  :'properties' => :'properties',
151
154
  :'quote' => :'quote',
152
155
  :'refund_dts' => :'refund_dts',
@@ -192,6 +195,7 @@ module UltracartClient
192
195
  :'merchant_id' => :'String',
193
196
  :'order_id' => :'String',
194
197
  :'payment' => :'OrderPayment',
198
+ :'point_of_sale' => :'OrderPointOfSale',
195
199
  :'properties' => :'Array<OrderProperty>',
196
200
  :'quote' => :'OrderQuote',
197
201
  :'refund_dts' => :'String',
@@ -331,6 +335,10 @@ module UltracartClient
331
335
  self.payment = attributes[:'payment']
332
336
  end
333
337
 
338
+ if attributes.key?(:'point_of_sale')
339
+ self.point_of_sale = attributes[:'point_of_sale']
340
+ end
341
+
334
342
  if attributes.key?(:'properties')
335
343
  if (value = attributes[:'properties']).is_a?(Array)
336
344
  self.properties = value
@@ -457,6 +465,7 @@ module UltracartClient
457
465
  merchant_id == o.merchant_id &&
458
466
  order_id == o.order_id &&
459
467
  payment == o.payment &&
468
+ point_of_sale == o.point_of_sale &&
460
469
  properties == o.properties &&
461
470
  quote == o.quote &&
462
471
  refund_dts == o.refund_dts &&
@@ -477,7 +486,7 @@ module UltracartClient
477
486
  # Calculates hash code according to all attributes.
478
487
  # @return [Integer] Hash code
479
488
  def hash
480
- [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, properties, quote, refund_dts, reject_dts, salesforce, shipping, summary, tags, taxes].hash
489
+ [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, reject_dts, salesforce, shipping, summary, tags, taxes].hash
481
490
  end
482
491
 
483
492
  # Builds the object from hash
@@ -0,0 +1,237 @@
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 OrderPointOfSale
18
+ attr_accessor :location
19
+
20
+ attr_accessor :reader
21
+
22
+ attr_accessor :register
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'location' => :'location',
28
+ :'reader' => :'reader',
29
+ :'register' => :'register'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'location' => :'PointOfSaleLocation',
42
+ :'reader' => :'PointOfSaleReader',
43
+ :'register' => :'PointOfSaleRegister'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPointOfSale` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPointOfSale`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'location')
69
+ self.location = attributes[:'location']
70
+ end
71
+
72
+ if attributes.key?(:'reader')
73
+ self.reader = attributes[:'reader']
74
+ end
75
+
76
+ if attributes.key?(:'register')
77
+ self.register = attributes[:'register']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ location == o.location &&
100
+ reader == o.reader &&
101
+ register == o.register
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [location, reader, register].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = UltracartClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end