forked from Shopify/shopify-api-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: change the resource definition for payout and shopify_payment
- Loading branch information
1 parent
2c252f9
commit df7e2f7
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module ShopifyAPI | ||
class Payout < Base | ||
self.prefix = '/admin/shopify_payments/' | ||
self.resource_prefix = 'shopify_payments/' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
module ShopifyAPI | ||
class ShopifyPayout < Base | ||
self.prefix = '/admin/shopify_payments/payouts/' | ||
self.resource_prefix = 'shopify_payments/payouts/' | ||
|
||
def self.find_search(date_min=Time.zone.now.beginning_of_month.to_date.to_s, date_max=Time.zone.now.end_of_month.to_date.to_s) | ||
self.find(:all, from: "/admin/shopify_payments/payouts.json?date_min=#{date_min}&date_max=#{date_max}") | ||
self.find(:all, | ||
from: api_version.construct_api_path( | ||
"shopify_payments/payouts.json?date_min=#{date_min}&date_max=#{date_max}" | ||
) | ||
) | ||
end | ||
end | ||
end | ||
end |