ultracart_api 4.1.2 → 4.1.4

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: 2f29e7b81e1b11b67649b35a62e03ccc8f696424ba196d2e57fbded622d45705
4
- data.tar.gz: 28d9ac84cb9ee7247598f0dbe1ce76f2d7ba91fa2e141da5784552bc880bd299
3
+ metadata.gz: 7f73cdbb14f7434757e125f441e7177359ed026f60e7289828d3140794743701
4
+ data.tar.gz: 6749494d14fd1bce606f95c178229622137981d48b2448ea2db11c044a7adb43
5
5
  SHA512:
6
- metadata.gz: e4d72b503dda511e26bc329a76828c9685c0ca0d2876a92370085fe68cacea2aeeceb2de34dbf21ed61ce9301f42e630ec920ddb3297d6cda9ff22370a9e5d29
7
- data.tar.gz: 5aaf20d870e64457bbf589e773259bb9999df86b1e56e47c55ffed5fd761c994df39ad2d11036c055b9b29a0000a4d92a3bc7af9a12da8d3c5b253fcf18a1915
6
+ metadata.gz: a35199b5568393b6f8e69353771dbc1cc9fbfbe300b1bf281106c7b36636a48b38f97f3f7e1582a57b501bfd16ede57f85ba8b6cdbc0907df3f6298a2573d1e6
7
+ data.tar.gz: 8603ec97f9a44dc3e15f5d2442e46f734b65785be3d3eea59685ca4cdb1e140034b3345b640c11ddbed7c2a16626aa36d29f2f334b4fd00f8cd874426e9af4da
data/README.md CHANGED
@@ -1,89 +1,79 @@
1
- # ultracart_api
2
-
3
- UltracartClient - the Ruby gem for the UltraCart Rest API V2
1
+ # UltraCart Ruby SDK
4
2
 
5
3
  UltraCart REST API Version 2
6
4
 
5
+ Note: Every method has a sample for every language. See https://github.com/UltraCart/sdk_samples
6
+
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.1.2
10
+ - Package version: 4.1.4
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
12
+ - For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
14
14
  ## Installation
15
15
 
16
- ### Build a gem
17
-
18
- To build the Ruby code into a gem:
16
+ gemfile:
19
17
 
20
18
  ```shell
21
- gem build ultracart_api.gemspec
19
+ gem 'ultracart_api', '4.1.4'
22
20
  ```
23
21
 
24
- Then either install the gem locally:
22
+ install:
25
23
 
26
24
  ```shell
27
- gem install ./ultracart_api-4.1.2.gem
28
- ```
29
-
30
- (for development, run `gem install --dev ./ultracart_api-4.1.2.gem` to install the development dependencies)
31
-
32
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
-
34
- Finally add this to the Gemfile:
35
-
36
- gem 'ultracart_api', '~> 4.1.2'
37
-
38
- ### Install from Git
39
-
40
- If the Ruby gem is hosted at a git repository: https://github.com/UltraCart/rest_api_v2_sdk_ruby, then add the following in the Gemfile:
41
-
42
- gem 'ultracart_api', :git => 'https://github.com/UltraCart/rest_api_v2_sdk_ruby.git'
43
-
44
- ### Include the Ruby code directly
45
-
46
- Include the Ruby code directly using `-I` as follows:
47
-
48
- ```shell
49
- ruby -Ilib script.rb
25
+ gem install ultracart_api
50
26
  ```
51
27
 
52
28
  ## Getting Started
53
29
 
54
- Please follow the [installation](#installation) procedure and then run the following code:
55
-
56
30
  ```ruby
57
- # Load the gem
58
31
  require 'ultracart_api'
32
+ require_relative '../constants'
59
33
 
60
- # Setup authorization
61
- UltracartClient.configure do |config|
62
- # Configure OAuth2 access token for authorization: ultraCartOauth
63
- config.access_token = 'YOUR ACCESS TOKEN'
34
+ # OrderApi.getOrder() retrieves a single order for a given order_id.
35
+ order_api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY)
64
36
 
65
- # Configure API key authorization: ultraCartSimpleApiKey
66
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
67
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
68
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
69
- end
37
+ # The expansion variable instructs UltraCart how much information to return. The order object is large and
38
+ # while it's easily manageable for a single order, when querying thousands of orders, is useful to reduce
39
+ # payload size.
40
+ # see www.ultracart.com/api/ for all the expansion fields available (this list below may become stale)
41
+ =begin
42
+ Possible Order Expansions:
43
+ affiliate affiliate.ledger auto_order
44
+ billing channel_partner checkout
45
+ coupon customer_profile digital_order
46
+ edi fraud_score gift
47
+ gift_certificate internal item
48
+ linked_shipment marketing payment
49
+ payment.transaction quote salesforce
50
+ shipping shipping.tracking_number_details summary
51
+ taxes
52
+ =end
53
+ expansion = "item,summary,billing,shipping,shipping.tracking_number_details"
70
54
 
71
- api_instance = UltracartClient::AffiliateApi.new
72
- click_query = UltracartClient::AffiliateClickQuery.new # AffiliateClickQuery | Click query
55
+ order_id = 'DEMO-0009104390'
73
56
  opts = {
74
- _limit: 56, # Integer | The maximum number of records to return on this one API call. (Maximum 10000)
75
- _offset: 56, # Integer | Pagination of the record set. Offset is a zero based index.
76
- _expand: '_expand_example' # String | The object expansion to perform on the result. Only option is link.
57
+ '_expand' => expansion
77
58
  }
78
59
 
79
60
  begin
80
- #Retrieve clicks
81
- result = api_instance.get_clicks_by_query(click_query, opts)
82
- p result
83
- rescue UltracartClient::ApiError => e
84
- puts "Exception when calling AffiliateApi->get_clicks_by_query: #{e}"
85
- end
61
+ api_response = order_api.get_order(order_id, opts)
62
+
63
+ # Check for errors
64
+ if api_response.error
65
+ puts "Developer Message: #{api_response.error.developer_message}"
66
+ puts "User Message: #{api_response.error.user_message}"
67
+ exit
68
+ end
86
69
 
70
+ order = api_response.order
71
+
72
+ # Using inspect instead of var_dump for Ruby-style object representation
73
+ puts order.inspect
74
+ rescue StandardError => e
75
+ puts "An error occurred: #{e.message}"
76
+ end
87
77
  ```
88
78
 
89
79
  ## Documentation for API Endpoints
@@ -1526,6 +1516,8 @@ Not every change is committed to every SDK.
1526
1516
 
1527
1517
  | Version | Date | Comments |
1528
1518
  | --: | :-: | --- |
1519
+ | 4.1.4 | 03/07/2025 | updated github readme.md |
1520
+ | 4.1.3 | 03/07/2025 | updated github readme.md files |
1529
1521
  | 4.1.2 | 03/05/2025 | added ChannelPartnerOrder.use_prior_payment_information_from_order_id |
1530
1522
  | 4.1.1 | 02/28/2025 | auto order pause method |
1531
1523
  | 4.1.0 | 02/21/2025 | ItemApi.getInventorySnapshot had bad nickname causing bad sdk method name |
data/docs/AutoOrderApi.md CHANGED
@@ -690,7 +690,7 @@ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/
690
690
 
691
691
  api = UltracartClient::AutoOrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
692
692
  auto_order_oid = 56 # Integer | The auto order oid to pause.
693
- auto_order = UltracartClient::AutoOrder.new # AutoOrder | Auto orders to pause
693
+ auto_order = UltracartClient::AutoOrder.new # AutoOrder | Auto order to pause
694
694
  opts = {
695
695
  _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
696
696
  }
@@ -727,7 +727,7 @@ end
727
727
  | Name | Type | Description | Notes |
728
728
  | ---- | ---- | ----------- | ----- |
729
729
  | **auto_order_oid** | **Integer** | The auto order oid to pause. | |
730
- | **auto_order** | [**AutoOrder**](AutoOrder.md) | Auto orders to pause | |
730
+ | **auto_order** | [**AutoOrder**](AutoOrder.md) | Auto order to pause | |
731
731
  | **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
732
732
 
733
733
  ### Return type
@@ -661,7 +661,7 @@ module UltracartClient
661
661
  # Pause auto order
662
662
  # Completely pause an auto order
663
663
  # @param auto_order_oid [Integer] The auto order oid to pause.
664
- # @param auto_order [AutoOrder] Auto orders to pause
664
+ # @param auto_order [AutoOrder] Auto order to pause
665
665
  # @param [Hash] opts the optional parameters
666
666
  # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
667
667
  # @return [AutoOrderResponse]
@@ -673,7 +673,7 @@ module UltracartClient
673
673
  # Pause auto order
674
674
  # Completely pause an auto order
675
675
  # @param auto_order_oid [Integer] The auto order oid to pause.
676
- # @param auto_order [AutoOrder] Auto orders to pause
676
+ # @param auto_order [AutoOrder] Auto order to pause
677
677
  # @param [Hash] opts the optional parameters
678
678
  # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
679
679
  # @return [Array<(AutoOrderResponse, Integer, Hash)>] AutoOrderResponse data, response status code and response headers
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.2'
14
+ VERSION = '4.1.4'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.2
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-05 00:00:00.000000000 Z
11
+ date: 2025-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus