mintsoft 0.1.7 → 0.1.8
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 +4 -4
- data/README.md +9 -2
- data/lib/mintsoft/resources/returns.rb +9 -0
- data/lib/mintsoft/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2794a34f86aaf4b8893894ad55ee7540b5d2aed7615696b3a4182d1dcdc46ab
|
4
|
+
data.tar.gz: 3ccf116643c9649630adf9d236b3d265c123688f89872f1454771e5d2189bc5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00f11f1b2b9dcf445d06f8a5545b9fc2bde79abfdb3f228a14cea0362856d5079fd22ed8befc8af22480bf0c2da83d807a1d9f240d8121ed15eb8589c62b81cd
|
7
|
+
data.tar.gz: c588a47224828812dec6d1a7371d017159a401feaa31e04bd167160fa0939a583f786733954380f1010b38dbccc77c265fcb64d59068b20f6cd1f149be55b911
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ A Ruby wrapper for the Mintsoft API that provides simple token-based authenticat
|
|
5
5
|
## Features
|
6
6
|
|
7
7
|
- **Token-only authentication**: Manual token management for full control
|
8
|
-
- **
|
8
|
+
- **6 Essential API endpoints**: Authentication, Order Search, Return Reasons, Create Returns, Add Return Items, Retrieve Returns
|
9
9
|
- **OpenStruct-based objects**: Flexible response handling with automatic attribute conversion
|
10
10
|
- **Faraday HTTP client**: Robust HTTP handling with JSON support
|
11
11
|
- **Comprehensive error handling**: Clear error messages for common scenarios
|
@@ -120,9 +120,16 @@ result = client.returns.add_item(return_obj.id, {
|
|
120
120
|
notes: "Optional notes"
|
121
121
|
})
|
122
122
|
|
123
|
+
# Retrieve a specific return by ID
|
124
|
+
return_obj = client.returns.retrieve(return_id)
|
125
|
+
|
123
126
|
# Access return properties
|
124
127
|
puts return_obj.id # Direct access to return ID
|
125
|
-
#
|
128
|
+
puts return_obj.order_id # Direct access to order ID
|
129
|
+
puts return_obj.status # Direct access to return status
|
130
|
+
puts return_obj.customer_name # Direct access to customer name
|
131
|
+
puts return_obj.total_value # Direct access to total value
|
132
|
+
# Note: Available properties depend on API response structure
|
126
133
|
```
|
127
134
|
|
128
135
|
### Error Handling
|
@@ -31,6 +31,15 @@ module Mintsoft
|
|
31
31
|
Objects::Return.new(response_data)
|
32
32
|
end
|
33
33
|
|
34
|
+
def retrieve(return_id)
|
35
|
+
validate_return_id!(return_id)
|
36
|
+
|
37
|
+
response = get_request("/api/Return/#{return_id}")
|
38
|
+
response_data = handle_response(response)
|
39
|
+
|
40
|
+
Objects::Return.new(response_data)
|
41
|
+
end
|
42
|
+
|
34
43
|
private
|
35
44
|
|
36
45
|
def validate_order_id!(order_id)
|
data/lib/mintsoft/version.rb
CHANGED