ultracart_api 3.10.85 → 3.10.87

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: 61e6e044644499969a52bb919cb429021158e2dfda4d3e1bd0825828eea5e1a6
4
- data.tar.gz: d3bc073ee7e30067b227ced05ca567f07e7eae7bab697820aad350192d96682a
3
+ metadata.gz: 34f8843c1beeb281a4f4c9931006ce6a8214089360872be5c710c90e3ad60c8d
4
+ data.tar.gz: e4ee2fbe3e5115209d77c688aec9487ef22e90f1bf93ab99d97bb1b363885a18
5
5
  SHA512:
6
- metadata.gz: c125cdd0d5d3dbdff8cf523e0105df454cd01158711270501bfe33ea58b11a1ebb8658c41cb4f3c18c4023254e860d73d9c77fa7d9b00a0f1acff2d2c739fdcc
7
- data.tar.gz: baa81bf91501424b220693bb38c0b1157bbb0a8f9909a040a3cf7e16ba8be5d15efe3cebd7c7ebb9247f8f4b8624f8ef01a47748209b176b6363c89b04214fd0
6
+ metadata.gz: 12eca8ebe0786ef81d787156644f29033810e069a9984a1585921ca00d0dbd84f98663ec1c0d1d86aeeb7bb7968cc5858f28d884447bea7b20fc531d4856a32f
7
+ data.tar.gz: 58b844c2ac6b81beb6cc393e0f46809510b8abe85f3a5cd5be11abadad6046ed1de9fd17d4becac0605e34151faa32c30a09ad96b514415d3523dd98961b739f
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.85
10
+ - Package version: 3.10.87
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.85.gem
27
+ gem install ./ultracart_api-3.10.87.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.85.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.87.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.85'
35
+ gem 'ultracart_api', '~> 3.10.87'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -682,8 +682,12 @@ Class | Method | HTTP request | Description
682
682
  - [UltracartClient::CouponFreeShippingWithSubtotal](docs/CouponFreeShippingWithSubtotal.md)
683
683
  - [UltracartClient::CouponItemSearchResult](docs/CouponItemSearchResult.md)
684
684
  - [UltracartClient::CouponItemSearchResultsResponse](docs/CouponItemSearchResultsResponse.md)
685
+ - [UltracartClient::CouponMoreLoyaltyCashback](docs/CouponMoreLoyaltyCashback.md)
686
+ - [UltracartClient::CouponMoreLoyaltyPoints](docs/CouponMoreLoyaltyPoints.md)
685
687
  - [UltracartClient::CouponMultipleAmountsOffItems](docs/CouponMultipleAmountsOffItems.md)
686
688
  - [UltracartClient::CouponNoDiscount](docs/CouponNoDiscount.md)
689
+ - [UltracartClient::CouponPercentMoreLoyaltyCashback](docs/CouponPercentMoreLoyaltyCashback.md)
690
+ - [UltracartClient::CouponPercentMoreLoyaltyPoints](docs/CouponPercentMoreLoyaltyPoints.md)
687
691
  - [UltracartClient::CouponPercentOffItemWithItemsQuantityPurchase](docs/CouponPercentOffItemWithItemsQuantityPurchase.md)
688
692
  - [UltracartClient::CouponPercentOffItems](docs/CouponPercentOffItems.md)
689
693
  - [UltracartClient::CouponPercentOffItemsAndFreeShipping](docs/CouponPercentOffItemsAndFreeShipping.md)
@@ -1046,6 +1050,7 @@ Class | Method | HTTP request | Description
1046
1050
  - [UltracartClient::OrderPaymentPurchaseOrder](docs/OrderPaymentPurchaseOrder.md)
1047
1051
  - [UltracartClient::OrderPaymentTransaction](docs/OrderPaymentTransaction.md)
1048
1052
  - [UltracartClient::OrderPaymentTransactionDetail](docs/OrderPaymentTransactionDetail.md)
1053
+ - [UltracartClient::OrderPointOfSale](docs/OrderPointOfSale.md)
1049
1054
  - [UltracartClient::OrderProcessPaymentRequest](docs/OrderProcessPaymentRequest.md)
1050
1055
  - [UltracartClient::OrderProcessPaymentResponse](docs/OrderProcessPaymentResponse.md)
1051
1056
  - [UltracartClient::OrderProperty](docs/OrderProperty.md)
@@ -1067,6 +1072,9 @@ Class | Method | HTTP request | Description
1067
1072
  - [UltracartClient::OrderTrackingNumberDetails](docs/OrderTrackingNumberDetails.md)
1068
1073
  - [UltracartClient::OrdersResponse](docs/OrdersResponse.md)
1069
1074
  - [UltracartClient::Permission](docs/Permission.md)
1075
+ - [UltracartClient::PointOfSaleLocation](docs/PointOfSaleLocation.md)
1076
+ - [UltracartClient::PointOfSaleReader](docs/PointOfSaleReader.md)
1077
+ - [UltracartClient::PointOfSaleRegister](docs/PointOfSaleRegister.md)
1070
1078
  - [UltracartClient::PricingTier](docs/PricingTier.md)
1071
1079
  - [UltracartClient::PricingTierNotification](docs/PricingTierNotification.md)
1072
1080
  - [UltracartClient::PricingTiersResponse](docs/PricingTiersResponse.md)
@@ -1263,6 +1271,8 @@ Not every change is committed to every SDK.
1263
1271
 
1264
1272
  | Version | Date | Comments |
1265
1273
  | --: | :-: | --- |
1274
+ | 3.10.87 | 01/03/2023 | order point of sale details |
1275
+ | 3.10.86 | 12/27/2022 | additional loyalty related coupons |
1266
1276
  | 3.10.85 | 12/21/2022 | conversation development |
1267
1277
  | 3.10.84 | 12/20/2022 | conversation engagement update |
1268
1278
  | 3.10.83 | 12/20/2022 | conversation engagement update |
data/docs/Coupon.md CHANGED
@@ -37,8 +37,12 @@ Name | Type | Description | Notes
37
37
  **hide_from_customer** | **BOOLEAN** | Hide coupon from customer during checkout. Often used when coupons are automatic discounting mechanisms. | [optional]
38
38
  **merchant_code** | **String** | Merchant code of coupon up to 20 characters. | [optional]
39
39
  **merchant_notes** | **String** | Internal notes about this coupon. These are not visible to customer. | [optional]
40
+ **more_loyalty_cashback** | [**CouponMoreLoyaltyCashback**](CouponMoreLoyaltyCashback.md) | | [optional]
41
+ **more_loyalty_points** | [**CouponMoreLoyaltyPoints**](CouponMoreLoyaltyPoints.md) | | [optional]
40
42
  **multiple_amounts_off_items** | [**CouponMultipleAmountsOffItems**](CouponMultipleAmountsOffItems.md) | | [optional]
41
43
  **no_discount** | [**CouponNoDiscount**](CouponNoDiscount.md) | | [optional]
44
+ **percent_more_loyalty_cashback** | [**CouponPercentMoreLoyaltyCashback**](CouponPercentMoreLoyaltyCashback.md) | | [optional]
45
+ **percent_more_loyalty_points** | [**CouponPercentMoreLoyaltyPoints**](CouponPercentMoreLoyaltyPoints.md) | | [optional]
42
46
  **percent_off_item_with_items_quantity_purchase** | [**CouponPercentOffItemWithItemsQuantityPurchase**](CouponPercentOffItemWithItemsQuantityPurchase.md) | | [optional]
43
47
  **percent_off_items** | [**CouponPercentOffItems**](CouponPercentOffItems.md) | | [optional]
44
48
  **percent_off_items_and_free_shipping** | [**CouponPercentOffItemsAndFreeShipping**](CouponPercentOffItemsAndFreeShipping.md) | | [optional]
@@ -0,0 +1,8 @@
1
+ # UltracartClient::CouponMoreLoyaltyCashback
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **loyalty_cashback** | **Float** | The additional loyalty cashback | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # UltracartClient::CouponMoreLoyaltyPoints
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **loyalty_points** | **Float** | The additional loyalty points | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # UltracartClient::CouponPercentMoreLoyaltyCashback
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **percent_more_loyalty_cashback** | **Float** | The percentage of additional loyalty cashback | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # UltracartClient::CouponPercentMoreLoyaltyPoints
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **percent_more_loyalty_points** | **Float** | The percentage of additional loyalty points | [optional]
7
+
8
+
data/docs/Order.md CHANGED
@@ -28,6 +28,7 @@ Name | Type | Description | Notes
28
28
  **merchant_id** | **String** | UltraCart merchant ID owning this order | [optional]
29
29
  **order_id** | **String** | Order ID | [optional]
30
30
  **payment** | [**OrderPayment**](OrderPayment.md) | | [optional]
31
+ **point_of_sale** | [**OrderPointOfSale**](OrderPointOfSale.md) | | [optional]
31
32
  **properties** | [**Array<OrderProperty>**](OrderProperty.md) | Properties, available only through update, not through insert due to the nature of how properties are handled internally | [optional]
32
33
  **quote** | [**OrderQuote**](OrderQuote.md) | | [optional]
33
34
  **refund_dts** | **String** | If the order was refunded, the date/time that the last refund occurred | [optional]
@@ -0,0 +1,10 @@
1
+ # UltracartClient::OrderPointOfSale
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **location** | [**PointOfSaleLocation**](PointOfSaleLocation.md) | | [optional]
7
+ **reader** | [**PointOfSaleReader**](PointOfSaleReader.md) | | [optional]
8
+ **register** | [**PointOfSaleRegister**](PointOfSaleRegister.md) | | [optional]
9
+
10
+
@@ -0,0 +1,16 @@
1
+ # UltracartClient::PointOfSaleLocation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **adddress2** | **String** | Address line 2 | [optional]
7
+ **address1** | **String** | Address line 1 | [optional]
8
+ **city** | **String** | City | [optional]
9
+ **country** | **String** | Country | [optional]
10
+ **distribution_center_code** | **String** | The distribution center code where inventory is reduced from for this sale. | [optional]
11
+ **merchant_id** | **String** | Merchant ID that owns this location | [optional]
12
+ **pos_location_oid** | **Integer** | Object identifier of the point of sale location. | [optional]
13
+ **postal_code** | **String** | Postal code | [optional]
14
+ **state_province** | **String** | State/province | [optional]
15
+
16
+
@@ -0,0 +1,16 @@
1
+ # UltracartClient::PointOfSaleReader
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **device_type** | **String** | The device type of the reader. | [optional]
7
+ **label** | **String** | The label of the reader. | [optional]
8
+ **merchant_id** | **String** | The merchant id that owns this point of sale reader. | [optional]
9
+ **payment_provider** | **String** | The payment provider for the card reader. | [optional]
10
+ **pos_reader_id** | **Integer** | Object identifier of the point of sale reader. | [optional]
11
+ **pos_register_oid** | **Integer** | Object identifier of the point of sale register this reader is assigned to. | [optional]
12
+ **serial_number** | **String** | The serial number of the reader. | [optional]
13
+ **stripe_account_id** | **String** | If the payment provider is Stripe, this is the Stripe account id | [optional]
14
+ **stripe_reader_id** | **String** | If the payment provide is Stripe, this is the Stripe terminal reader id | [optional]
15
+
16
+
@@ -0,0 +1,11 @@
1
+ # UltracartClient::PointOfSaleRegister
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **merchant_id** | **String** | The merchant id that owns this point of sale register. | [optional]
7
+ **name** | **String** | Name of the register. | [optional]
8
+ **pos_location_oid** | **Integer** | Object identifier of the point of sale location where this register is located. | [optional]
9
+ **pos_register_oid** | **Integer** | Object identifier of the point of sale register. | [optional]
10
+
11
+
@@ -93,10 +93,18 @@ module UltracartClient
93
93
  # Internal notes about this coupon. These are not visible to customer.
94
94
  attr_accessor :merchant_notes
95
95
 
96
+ attr_accessor :more_loyalty_cashback
97
+
98
+ attr_accessor :more_loyalty_points
99
+
96
100
  attr_accessor :multiple_amounts_off_items
97
101
 
98
102
  attr_accessor :no_discount
99
103
 
104
+ attr_accessor :percent_more_loyalty_cashback
105
+
106
+ attr_accessor :percent_more_loyalty_points
107
+
100
108
  attr_accessor :percent_off_item_with_items_quantity_purchase
101
109
 
102
110
  attr_accessor :percent_off_items
@@ -191,8 +199,12 @@ module UltracartClient
191
199
  :'hide_from_customer' => :'hide_from_customer',
192
200
  :'merchant_code' => :'merchant_code',
193
201
  :'merchant_notes' => :'merchant_notes',
202
+ :'more_loyalty_cashback' => :'more_loyalty_cashback',
203
+ :'more_loyalty_points' => :'more_loyalty_points',
194
204
  :'multiple_amounts_off_items' => :'multiple_amounts_off_items',
195
205
  :'no_discount' => :'no_discount',
206
+ :'percent_more_loyalty_cashback' => :'percent_more_loyalty_cashback',
207
+ :'percent_more_loyalty_points' => :'percent_more_loyalty_points',
196
208
  :'percent_off_item_with_items_quantity_purchase' => :'percent_off_item_with_items_quantity_purchase',
197
209
  :'percent_off_items' => :'percent_off_items',
198
210
  :'percent_off_items_and_free_shipping' => :'percent_off_items_and_free_shipping',
@@ -258,8 +270,12 @@ module UltracartClient
258
270
  :'hide_from_customer' => :'BOOLEAN',
259
271
  :'merchant_code' => :'String',
260
272
  :'merchant_notes' => :'String',
273
+ :'more_loyalty_cashback' => :'CouponMoreLoyaltyCashback',
274
+ :'more_loyalty_points' => :'CouponMoreLoyaltyPoints',
261
275
  :'multiple_amounts_off_items' => :'CouponMultipleAmountsOffItems',
262
276
  :'no_discount' => :'CouponNoDiscount',
277
+ :'percent_more_loyalty_cashback' => :'CouponPercentMoreLoyaltyCashback',
278
+ :'percent_more_loyalty_points' => :'CouponPercentMoreLoyaltyPoints',
263
279
  :'percent_off_item_with_items_quantity_purchase' => :'CouponPercentOffItemWithItemsQuantityPurchase',
264
280
  :'percent_off_items' => :'CouponPercentOffItems',
265
281
  :'percent_off_items_and_free_shipping' => :'CouponPercentOffItemsAndFreeShipping',
@@ -432,6 +448,14 @@ module UltracartClient
432
448
  self.merchant_notes = attributes[:'merchant_notes']
433
449
  end
434
450
 
451
+ if attributes.has_key?(:'more_loyalty_cashback')
452
+ self.more_loyalty_cashback = attributes[:'more_loyalty_cashback']
453
+ end
454
+
455
+ if attributes.has_key?(:'more_loyalty_points')
456
+ self.more_loyalty_points = attributes[:'more_loyalty_points']
457
+ end
458
+
435
459
  if attributes.has_key?(:'multiple_amounts_off_items')
436
460
  self.multiple_amounts_off_items = attributes[:'multiple_amounts_off_items']
437
461
  end
@@ -440,6 +464,14 @@ module UltracartClient
440
464
  self.no_discount = attributes[:'no_discount']
441
465
  end
442
466
 
467
+ if attributes.has_key?(:'percent_more_loyalty_cashback')
468
+ self.percent_more_loyalty_cashback = attributes[:'percent_more_loyalty_cashback']
469
+ end
470
+
471
+ if attributes.has_key?(:'percent_more_loyalty_points')
472
+ self.percent_more_loyalty_points = attributes[:'percent_more_loyalty_points']
473
+ end
474
+
443
475
  if attributes.has_key?(:'percent_off_item_with_items_quantity_purchase')
444
476
  self.percent_off_item_with_items_quantity_purchase = attributes[:'percent_off_item_with_items_quantity_purchase']
445
477
  end
@@ -689,8 +721,12 @@ module UltracartClient
689
721
  hide_from_customer == o.hide_from_customer &&
690
722
  merchant_code == o.merchant_code &&
691
723
  merchant_notes == o.merchant_notes &&
724
+ more_loyalty_cashback == o.more_loyalty_cashback &&
725
+ more_loyalty_points == o.more_loyalty_points &&
692
726
  multiple_amounts_off_items == o.multiple_amounts_off_items &&
693
727
  no_discount == o.no_discount &&
728
+ percent_more_loyalty_cashback == o.percent_more_loyalty_cashback &&
729
+ percent_more_loyalty_points == o.percent_more_loyalty_points &&
694
730
  percent_off_item_with_items_quantity_purchase == o.percent_off_item_with_items_quantity_purchase &&
695
731
  percent_off_items == o.percent_off_items &&
696
732
  percent_off_items_and_free_shipping == o.percent_off_items_and_free_shipping &&
@@ -727,7 +763,7 @@ module UltracartClient
727
763
  # Calculates hash code according to all attributes.
728
764
  # @return [Fixnum] Hash code
729
765
  def hash
730
- [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
766
+ [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
731
767
  end
732
768
 
733
769
  # Builds the object from hash
@@ -0,0 +1,185 @@
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 CouponMoreLoyaltyCashback
17
+ # The additional loyalty cashback
18
+ attr_accessor :loyalty_cashback
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'loyalty_cashback' => :'loyalty_cashback'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'loyalty_cashback' => :'Float'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'loyalty_cashback')
43
+ self.loyalty_cashback = attributes[:'loyalty_cashback']
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ invalid_properties
52
+ end
53
+
54
+ # Check to see if the all the properties in the model are valid
55
+ # @return true if the model is valid
56
+ def valid?
57
+ true
58
+ end
59
+
60
+ # Checks equality by comparing each attribute.
61
+ # @param [Object] Object to be compared
62
+ def ==(o)
63
+ return true if self.equal?(o)
64
+ self.class == o.class &&
65
+ loyalty_cashback == o.loyalty_cashback
66
+ end
67
+
68
+ # @see the `==` method
69
+ # @param [Object] Object to be compared
70
+ def eql?(o)
71
+ self == o
72
+ end
73
+
74
+ # Calculates hash code according to all attributes.
75
+ # @return [Fixnum] Hash code
76
+ def hash
77
+ [loyalty_cashback].hash
78
+ end
79
+
80
+ # Builds the object from hash
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ # @return [Object] Returns the model itself
83
+ def build_from_hash(attributes)
84
+ return nil unless attributes.is_a?(Hash)
85
+ self.class.swagger_types.each_pair do |key, type|
86
+ if type =~ /\AArray<(.*)>/i
87
+ # check to ensure the input is an array given that the attribute
88
+ # is documented as an array but the input is not
89
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
90
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
91
+ end
92
+ elsif !attributes[self.class.attribute_map[key]].nil?
93
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
94
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
95
+ end
96
+
97
+ self
98
+ end
99
+
100
+ # Deserializes the data based on type
101
+ # @param string type Data type
102
+ # @param string value Value to be deserialized
103
+ # @return [Object] Deserialized data
104
+ def _deserialize(type, value)
105
+ case type.to_sym
106
+ when :DateTime
107
+ DateTime.parse(value)
108
+ when :Date
109
+ Date.parse(value)
110
+ when :String
111
+ value.to_s
112
+ when :Integer
113
+ value.to_i
114
+ when :Float
115
+ value.to_f
116
+ when :BOOLEAN
117
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
118
+ true
119
+ else
120
+ false
121
+ end
122
+ when :Object
123
+ # generic object (usually a Hash), return directly
124
+ value
125
+ when /\AArray<(?<inner_type>.+)>\z/
126
+ inner_type = Regexp.last_match[:inner_type]
127
+ value.map { |v| _deserialize(inner_type, v) }
128
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
129
+ k_type = Regexp.last_match[:k_type]
130
+ v_type = Regexp.last_match[:v_type]
131
+ {}.tap do |hash|
132
+ value.each do |k, v|
133
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
134
+ end
135
+ end
136
+ else # model
137
+ temp_model = UltracartClient.const_get(type).new
138
+ temp_model.build_from_hash(value)
139
+ end
140
+ end
141
+
142
+ # Returns the string representation of the object
143
+ # @return [String] String presentation of the object
144
+ def to_s
145
+ to_hash.to_s
146
+ end
147
+
148
+ # to_body is an alias to to_hash (backward compatibility)
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_body
151
+ to_hash
152
+ end
153
+
154
+ # Returns the object in the form of hash
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_hash
157
+ hash = {}
158
+ self.class.attribute_map.each_pair do |attr, param|
159
+ value = self.send(attr)
160
+ next if value.nil?
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ # Outputs non-array value in the form of hash
167
+ # For object, use to_hash. Otherwise, just return the value
168
+ # @param [Object] value Any valid value
169
+ # @return [Hash] Returns the value in the form of hash
170
+ def _to_hash(value)
171
+ if value.is_a?(Array)
172
+ value.compact.map { |v| _to_hash(v) }
173
+ elsif value.is_a?(Hash)
174
+ {}.tap do |hash|
175
+ value.each { |k, v| hash[k] = _to_hash(v) }
176
+ end
177
+ elsif value.respond_to? :to_hash
178
+ value.to_hash
179
+ else
180
+ value
181
+ end
182
+ end
183
+
184
+ end
185
+ end
@@ -0,0 +1,185 @@
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 CouponMoreLoyaltyPoints
17
+ # The additional loyalty points
18
+ attr_accessor :loyalty_points
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'loyalty_points' => :'loyalty_points'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'loyalty_points' => :'Float'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'loyalty_points')
43
+ self.loyalty_points = attributes[:'loyalty_points']
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ invalid_properties
52
+ end
53
+
54
+ # Check to see if the all the properties in the model are valid
55
+ # @return true if the model is valid
56
+ def valid?
57
+ true
58
+ end
59
+
60
+ # Checks equality by comparing each attribute.
61
+ # @param [Object] Object to be compared
62
+ def ==(o)
63
+ return true if self.equal?(o)
64
+ self.class == o.class &&
65
+ loyalty_points == o.loyalty_points
66
+ end
67
+
68
+ # @see the `==` method
69
+ # @param [Object] Object to be compared
70
+ def eql?(o)
71
+ self == o
72
+ end
73
+
74
+ # Calculates hash code according to all attributes.
75
+ # @return [Fixnum] Hash code
76
+ def hash
77
+ [loyalty_points].hash
78
+ end
79
+
80
+ # Builds the object from hash
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ # @return [Object] Returns the model itself
83
+ def build_from_hash(attributes)
84
+ return nil unless attributes.is_a?(Hash)
85
+ self.class.swagger_types.each_pair do |key, type|
86
+ if type =~ /\AArray<(.*)>/i
87
+ # check to ensure the input is an array given that the attribute
88
+ # is documented as an array but the input is not
89
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
90
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
91
+ end
92
+ elsif !attributes[self.class.attribute_map[key]].nil?
93
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
94
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
95
+ end
96
+
97
+ self
98
+ end
99
+
100
+ # Deserializes the data based on type
101
+ # @param string type Data type
102
+ # @param string value Value to be deserialized
103
+ # @return [Object] Deserialized data
104
+ def _deserialize(type, value)
105
+ case type.to_sym
106
+ when :DateTime
107
+ DateTime.parse(value)
108
+ when :Date
109
+ Date.parse(value)
110
+ when :String
111
+ value.to_s
112
+ when :Integer
113
+ value.to_i
114
+ when :Float
115
+ value.to_f
116
+ when :BOOLEAN
117
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
118
+ true
119
+ else
120
+ false
121
+ end
122
+ when :Object
123
+ # generic object (usually a Hash), return directly
124
+ value
125
+ when /\AArray<(?<inner_type>.+)>\z/
126
+ inner_type = Regexp.last_match[:inner_type]
127
+ value.map { |v| _deserialize(inner_type, v) }
128
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
129
+ k_type = Regexp.last_match[:k_type]
130
+ v_type = Regexp.last_match[:v_type]
131
+ {}.tap do |hash|
132
+ value.each do |k, v|
133
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
134
+ end
135
+ end
136
+ else # model
137
+ temp_model = UltracartClient.const_get(type).new
138
+ temp_model.build_from_hash(value)
139
+ end
140
+ end
141
+
142
+ # Returns the string representation of the object
143
+ # @return [String] String presentation of the object
144
+ def to_s
145
+ to_hash.to_s
146
+ end
147
+
148
+ # to_body is an alias to to_hash (backward compatibility)
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_body
151
+ to_hash
152
+ end
153
+
154
+ # Returns the object in the form of hash
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_hash
157
+ hash = {}
158
+ self.class.attribute_map.each_pair do |attr, param|
159
+ value = self.send(attr)
160
+ next if value.nil?
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ # Outputs non-array value in the form of hash
167
+ # For object, use to_hash. Otherwise, just return the value
168
+ # @param [Object] value Any valid value
169
+ # @return [Hash] Returns the value in the form of hash
170
+ def _to_hash(value)
171
+ if value.is_a?(Array)
172
+ value.compact.map { |v| _to_hash(v) }
173
+ elsif value.is_a?(Hash)
174
+ {}.tap do |hash|
175
+ value.each { |k, v| hash[k] = _to_hash(v) }
176
+ end
177
+ elsif value.respond_to? :to_hash
178
+ value.to_hash
179
+ else
180
+ value
181
+ end
182
+ end
183
+
184
+ end
185
+ end