ultracart_api 4.0.102.rc → 4.0.104.rc

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a64a1afa4a2d83919658e247dd99c8b5468d01d7776d6595b1a4bb4c720ad42
4
- data.tar.gz: 6db73e562b30820226b0ba7160834ae51b720fddb43180c90b160e50b712dbf2
3
+ metadata.gz: f46b8ecfa9f4fa1215427090019e8e29d70fa1b4b1004ab5b86fd7fd8596bf58
4
+ data.tar.gz: 242bf11f0c10ed247c7a187f4ab2dfc41579d084c22ed2e6876e95ddff627b9e
5
5
  SHA512:
6
- metadata.gz: d22dd15b843c5411e948234a4558f8d78f49867fdee098b63437cf8c57138a26f3b9513519a03e1f74776bb8fabea7833b97c53836601b2d28c682ad7e289c9d
7
- data.tar.gz: 1928eadbcd8786860925fc392ec1fed31d1f1d0987e5939601d917ef0762f877cd57c418fdc86a9326f9e0347f19e267a6580dedbe3e24bb52def63de4229171
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.102.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.102.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.102.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.102.rc'
36
+ gem 'ultracart_api', '~> 4.0.104.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -687,8 +687,12 @@ Class | Method | HTTP request | Description
687
687
  - [UltracartClient::CouponFreeShippingWithSubtotal](docs/CouponFreeShippingWithSubtotal.md)
688
688
  - [UltracartClient::CouponItemSearchResult](docs/CouponItemSearchResult.md)
689
689
  - [UltracartClient::CouponItemSearchResultsResponse](docs/CouponItemSearchResultsResponse.md)
690
+ - [UltracartClient::CouponMoreLoyaltyCashback](docs/CouponMoreLoyaltyCashback.md)
691
+ - [UltracartClient::CouponMoreLoyaltyPoints](docs/CouponMoreLoyaltyPoints.md)
690
692
  - [UltracartClient::CouponMultipleAmountsOffItems](docs/CouponMultipleAmountsOffItems.md)
691
693
  - [UltracartClient::CouponNoDiscount](docs/CouponNoDiscount.md)
694
+ - [UltracartClient::CouponPercentMoreLoyaltyCashback](docs/CouponPercentMoreLoyaltyCashback.md)
695
+ - [UltracartClient::CouponPercentMoreLoyaltyPoints](docs/CouponPercentMoreLoyaltyPoints.md)
692
696
  - [UltracartClient::CouponPercentOffItemWithItemsQuantityPurchase](docs/CouponPercentOffItemWithItemsQuantityPurchase.md)
693
697
  - [UltracartClient::CouponPercentOffItems](docs/CouponPercentOffItems.md)
694
698
  - [UltracartClient::CouponPercentOffItemsAndFreeShipping](docs/CouponPercentOffItemsAndFreeShipping.md)
@@ -1051,6 +1055,7 @@ Class | Method | HTTP request | Description
1051
1055
  - [UltracartClient::OrderPaymentPurchaseOrder](docs/OrderPaymentPurchaseOrder.md)
1052
1056
  - [UltracartClient::OrderPaymentTransaction](docs/OrderPaymentTransaction.md)
1053
1057
  - [UltracartClient::OrderPaymentTransactionDetail](docs/OrderPaymentTransactionDetail.md)
1058
+ - [UltracartClient::OrderPointOfSale](docs/OrderPointOfSale.md)
1054
1059
  - [UltracartClient::OrderProcessPaymentRequest](docs/OrderProcessPaymentRequest.md)
1055
1060
  - [UltracartClient::OrderProcessPaymentResponse](docs/OrderProcessPaymentResponse.md)
1056
1061
  - [UltracartClient::OrderProperty](docs/OrderProperty.md)
@@ -1072,6 +1077,9 @@ Class | Method | HTTP request | Description
1072
1077
  - [UltracartClient::OrderTrackingNumberDetails](docs/OrderTrackingNumberDetails.md)
1073
1078
  - [UltracartClient::OrdersResponse](docs/OrdersResponse.md)
1074
1079
  - [UltracartClient::Permission](docs/Permission.md)
1080
+ - [UltracartClient::PointOfSaleLocation](docs/PointOfSaleLocation.md)
1081
+ - [UltracartClient::PointOfSaleReader](docs/PointOfSaleReader.md)
1082
+ - [UltracartClient::PointOfSaleRegister](docs/PointOfSaleRegister.md)
1075
1083
  - [UltracartClient::PricingTier](docs/PricingTier.md)
1076
1084
  - [UltracartClient::PricingTierNotification](docs/PricingTierNotification.md)
1077
1085
  - [UltracartClient::PricingTiersResponse](docs/PricingTiersResponse.md)
@@ -1271,6 +1279,8 @@ Not every change is committed to every SDK.
1271
1279
 
1272
1280
  | Version | Date | Comments |
1273
1281
  | --: | :-: | --- |
1282
+ | 4.0.104-RC | 01/03/2023 | order point of sale details |
1283
+ | 4.0.103-RC | 12/27/2022 | additional loyalty related coupons |
1274
1284
  | 4.0.102-RC | 12/21/2022 | conversation development |
1275
1285
  | 4.0.101-RC | 12/20/2022 | conversation engagement update |
1276
1286
  | 4.0.100-RC | 12/20/2022 | conversation engagement update |
data/docs/Coupon.md CHANGED
@@ -38,8 +38,12 @@
38
38
  | **hide_from_customer** | **Boolean** | Hide coupon from customer during checkout. Often used when coupons are automatic discounting mechanisms. | [optional] |
39
39
  | **merchant_code** | **String** | Merchant code of coupon up to 20 characters. | [optional] |
40
40
  | **merchant_notes** | **String** | Internal notes about this coupon. These are not visible to customer. | [optional] |
41
+ | **more_loyalty_cashback** | [**CouponMoreLoyaltyCashback**](CouponMoreLoyaltyCashback.md) | | [optional] |
42
+ | **more_loyalty_points** | [**CouponMoreLoyaltyPoints**](CouponMoreLoyaltyPoints.md) | | [optional] |
41
43
  | **multiple_amounts_off_items** | [**CouponMultipleAmountsOffItems**](CouponMultipleAmountsOffItems.md) | | [optional] |
42
44
  | **no_discount** | [**CouponNoDiscount**](CouponNoDiscount.md) | | [optional] |
45
+ | **percent_more_loyalty_cashback** | [**CouponPercentMoreLoyaltyCashback**](CouponPercentMoreLoyaltyCashback.md) | | [optional] |
46
+ | **percent_more_loyalty_points** | [**CouponPercentMoreLoyaltyPoints**](CouponPercentMoreLoyaltyPoints.md) | | [optional] |
43
47
  | **percent_off_item_with_items_quantity_purchase** | [**CouponPercentOffItemWithItemsQuantityPurchase**](CouponPercentOffItemWithItemsQuantityPurchase.md) | | [optional] |
44
48
  | **percent_off_items** | [**CouponPercentOffItems**](CouponPercentOffItems.md) | | [optional] |
45
49
  | **percent_off_items_and_free_shipping** | [**CouponPercentOffItemsAndFreeShipping**](CouponPercentOffItemsAndFreeShipping.md) | | [optional] |
@@ -106,8 +110,12 @@ instance = UltracartClient::Coupon.new(
106
110
  hide_from_customer: null,
107
111
  merchant_code: null,
108
112
  merchant_notes: null,
113
+ more_loyalty_cashback: null,
114
+ more_loyalty_points: null,
109
115
  multiple_amounts_off_items: null,
110
116
  no_discount: null,
117
+ percent_more_loyalty_cashback: null,
118
+ percent_more_loyalty_points: null,
111
119
  percent_off_item_with_items_quantity_purchase: null,
112
120
  percent_off_items: null,
113
121
  percent_off_items_and_free_shipping: null,
@@ -0,0 +1,18 @@
1
+ # UltracartClient::CouponMoreLoyaltyCashback
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **loyalty_cashback** | **Float** | The additional loyalty cashback | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::CouponMoreLoyaltyCashback.new(
15
+ loyalty_cashback: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # UltracartClient::CouponMoreLoyaltyPoints
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **loyalty_points** | **Float** | The additional loyalty points | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::CouponMoreLoyaltyPoints.new(
15
+ loyalty_points: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # UltracartClient::CouponPercentMoreLoyaltyCashback
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **percent_more_loyalty_cashback** | **Float** | The percentage of additional loyalty cashback | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::CouponPercentMoreLoyaltyCashback.new(
15
+ percent_more_loyalty_cashback: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # UltracartClient::CouponPercentMoreLoyaltyPoints
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **percent_more_loyalty_points** | **Float** | The percentage of additional loyalty points | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::CouponPercentMoreLoyaltyPoints.new(
15
+ percent_more_loyalty_points: null
16
+ )
17
+ ```
18
+
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
+
@@ -94,10 +94,18 @@ module UltracartClient
94
94
  # Internal notes about this coupon. These are not visible to customer.
95
95
  attr_accessor :merchant_notes
96
96
 
97
+ attr_accessor :more_loyalty_cashback
98
+
99
+ attr_accessor :more_loyalty_points
100
+
97
101
  attr_accessor :multiple_amounts_off_items
98
102
 
99
103
  attr_accessor :no_discount
100
104
 
105
+ attr_accessor :percent_more_loyalty_cashback
106
+
107
+ attr_accessor :percent_more_loyalty_points
108
+
101
109
  attr_accessor :percent_off_item_with_items_quantity_purchase
102
110
 
103
111
  attr_accessor :percent_off_items
@@ -192,8 +200,12 @@ module UltracartClient
192
200
  :'hide_from_customer' => :'hide_from_customer',
193
201
  :'merchant_code' => :'merchant_code',
194
202
  :'merchant_notes' => :'merchant_notes',
203
+ :'more_loyalty_cashback' => :'more_loyalty_cashback',
204
+ :'more_loyalty_points' => :'more_loyalty_points',
195
205
  :'multiple_amounts_off_items' => :'multiple_amounts_off_items',
196
206
  :'no_discount' => :'no_discount',
207
+ :'percent_more_loyalty_cashback' => :'percent_more_loyalty_cashback',
208
+ :'percent_more_loyalty_points' => :'percent_more_loyalty_points',
197
209
  :'percent_off_item_with_items_quantity_purchase' => :'percent_off_item_with_items_quantity_purchase',
198
210
  :'percent_off_items' => :'percent_off_items',
199
211
  :'percent_off_items_and_free_shipping' => :'percent_off_items_and_free_shipping',
@@ -264,8 +276,12 @@ module UltracartClient
264
276
  :'hide_from_customer' => :'Boolean',
265
277
  :'merchant_code' => :'String',
266
278
  :'merchant_notes' => :'String',
279
+ :'more_loyalty_cashback' => :'CouponMoreLoyaltyCashback',
280
+ :'more_loyalty_points' => :'CouponMoreLoyaltyPoints',
267
281
  :'multiple_amounts_off_items' => :'CouponMultipleAmountsOffItems',
268
282
  :'no_discount' => :'CouponNoDiscount',
283
+ :'percent_more_loyalty_cashback' => :'CouponPercentMoreLoyaltyCashback',
284
+ :'percent_more_loyalty_points' => :'CouponPercentMoreLoyaltyPoints',
269
285
  :'percent_off_item_with_items_quantity_purchase' => :'CouponPercentOffItemWithItemsQuantityPurchase',
270
286
  :'percent_off_items' => :'CouponPercentOffItems',
271
287
  :'percent_off_items_and_free_shipping' => :'CouponPercentOffItemsAndFreeShipping',
@@ -451,6 +467,14 @@ module UltracartClient
451
467
  self.merchant_notes = attributes[:'merchant_notes']
452
468
  end
453
469
 
470
+ if attributes.key?(:'more_loyalty_cashback')
471
+ self.more_loyalty_cashback = attributes[:'more_loyalty_cashback']
472
+ end
473
+
474
+ if attributes.key?(:'more_loyalty_points')
475
+ self.more_loyalty_points = attributes[:'more_loyalty_points']
476
+ end
477
+
454
478
  if attributes.key?(:'multiple_amounts_off_items')
455
479
  self.multiple_amounts_off_items = attributes[:'multiple_amounts_off_items']
456
480
  end
@@ -459,6 +483,14 @@ module UltracartClient
459
483
  self.no_discount = attributes[:'no_discount']
460
484
  end
461
485
 
486
+ if attributes.key?(:'percent_more_loyalty_cashback')
487
+ self.percent_more_loyalty_cashback = attributes[:'percent_more_loyalty_cashback']
488
+ end
489
+
490
+ if attributes.key?(:'percent_more_loyalty_points')
491
+ self.percent_more_loyalty_points = attributes[:'percent_more_loyalty_points']
492
+ end
493
+
462
494
  if attributes.key?(:'percent_off_item_with_items_quantity_purchase')
463
495
  self.percent_off_item_with_items_quantity_purchase = attributes[:'percent_off_item_with_items_quantity_purchase']
464
496
  end
@@ -708,8 +740,12 @@ module UltracartClient
708
740
  hide_from_customer == o.hide_from_customer &&
709
741
  merchant_code == o.merchant_code &&
710
742
  merchant_notes == o.merchant_notes &&
743
+ more_loyalty_cashback == o.more_loyalty_cashback &&
744
+ more_loyalty_points == o.more_loyalty_points &&
711
745
  multiple_amounts_off_items == o.multiple_amounts_off_items &&
712
746
  no_discount == o.no_discount &&
747
+ percent_more_loyalty_cashback == o.percent_more_loyalty_cashback &&
748
+ percent_more_loyalty_points == o.percent_more_loyalty_points &&
713
749
  percent_off_item_with_items_quantity_purchase == o.percent_off_item_with_items_quantity_purchase &&
714
750
  percent_off_items == o.percent_off_items &&
715
751
  percent_off_items_and_free_shipping == o.percent_off_items_and_free_shipping &&
@@ -746,7 +782,7 @@ module UltracartClient
746
782
  # Calculates hash code according to all attributes.
747
783
  # @return [Integer] Hash code
748
784
  def hash
749
- [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
785
+ [affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
750
786
  end
751
787
 
752
788
  # Builds the object from hash
@@ -0,0 +1,220 @@
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 CouponMoreLoyaltyCashback
18
+ # The additional loyalty cashback
19
+ attr_accessor :loyalty_cashback
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'loyalty_cashback' => :'loyalty_cashback'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'loyalty_cashback' => :'Float'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CouponMoreLoyaltyCashback` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CouponMoreLoyaltyCashback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'loyalty_cashback')
62
+ self.loyalty_cashback = attributes[:'loyalty_cashback']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ loyalty_cashback == o.loyalty_cashback
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [loyalty_cashback].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif 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
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 :Time
136
+ Time.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
+ # models (e.g. Pet) or oneOf
167
+ klass = UltracartClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end