Skip to content

Commit efe1b4c

Browse files
authoredFeb 3, 2022
Remove unused preferences files + update README (#56)
* Clean-up for preferences * Update PR template
1 parent 44a5554 commit efe1b4c

File tree

6 files changed

+4
-314
lines changed

6 files changed

+4
-314
lines changed
 

Diff for: ‎.github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
- [ ] Have you built the gem locally and made queries against it successfully?
1313
- [ ] Did you update the changelog?
1414
- [ ] Did you bump the package version [in the code generator](https://github.com/patch-technology/client-code-generation/blob/main/configs/ruby-config.json#L11-L12)?
15+
- [ ] If endpoints were removed, did you manually remove the corresponding files? (this should be rare)
1516
- [ ] For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

Diff for: ‎Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
patch_ruby (1.17.0)
4+
patch_ruby (1.17.1)
55
typhoeus (~> 1.0, >= 1.0.1)
66

77
GEM

Diff for: ‎README.md

-27
Original file line numberDiff line numberDiff line change
@@ -188,33 +188,6 @@ Patch::Project.retrieve_projects(type: type)
188188
minimum_available_mass = 100
189189
Patch::Project.retrieve_projects(minimum_available_mass: minimum_available_mass)
190190
```
191-
192-
### Preferences
193-
194-
Preferences are how you route your orders in Patch. If you don't have a preference, Patch will allocate your order to the least expensive option. If you do have a preference, all of your orders will be sent to that project. You can set your preferences via API, or through the [Patch Dashboard](https://dashboard.patch.io/projects).
195-
196-
[API Reference](https://docs.patch.io/#/?id=preferences)
197-
198-
#### Examples
199-
200-
```ruby
201-
# Create a preference
202-
project_id = 'pro_test_1234' # Pass in the project_id for your preference
203-
Patch::Preference.create_preference(project_id: project_id)
204-
205-
# Retrieve a preference
206-
preference_id = 'pre_test_1234' # Pass in the preferences's id
207-
Patch::Preference.retrieve_preference(preference_id)
208-
209-
# Delete a preference
210-
preference_id = 'pre_test_1234' # Pass in the preferences's id
211-
Patch::Preference.delete_preference(preference_id)
212-
213-
# Retrieve a list of preferences
214-
page = 1 # Pass in which page of preferences you'd like
215-
Patch::Preference.retrieve_preferences(page: page)
216-
```
217-
218191
## Contributing
219192

220193
While we value open-source contributions to this SDK, the core of this library is generated programmatically. Complex additions made directly to the library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!

Diff for: ‎lib/patch_ruby/api/preferences_api.rb

-284
This file was deleted.

Diff for: ‎lib/patch_ruby/api_client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ApiClient
3131
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
3232
def initialize(config = Configuration.default)
3333
@config = config
34-
@user_agent = "patch-ruby/1.17.0"
34+
@user_agent = "patch-ruby/1.17.1"
3535
@default_headers = {
3636
'Content-Type' => 'application/json',
3737
'User-Agent' => @user_agent

Diff for: ‎lib/patch_ruby/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module Patch
14-
VERSION = '1.17.0'
14+
VERSION = '1.17.1'
1515
end

0 commit comments

Comments
 (0)
Please sign in to comment.