From df7e2f7b9f2e2a4fc8a2be293d6ce8020a936282 Mon Sep 17 00:00:00 2001 From: sonika Date: Mon, 15 Jan 2024 14:56:07 +0545 Subject: [PATCH] style: change the resource definition for payout and shopify_payment --- lib/shopify_api/resources/payout.rb | 4 ++-- lib/shopify_api/resources/shopify_payment.rb | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/shopify_api/resources/payout.rb b/lib/shopify_api/resources/payout.rb index 0bff57381..9eef12b2c 100644 --- a/lib/shopify_api/resources/payout.rb +++ b/lib/shopify_api/resources/payout.rb @@ -1,5 +1,5 @@ module ShopifyAPI class Payout < Base - self.prefix = '/admin/shopify_payments/' + self.resource_prefix = 'shopify_payments/' end -end +end \ No newline at end of file diff --git a/lib/shopify_api/resources/shopify_payment.rb b/lib/shopify_api/resources/shopify_payment.rb index fdc925e2f..1b7d1b827 100644 --- a/lib/shopify_api/resources/shopify_payment.rb +++ b/lib/shopify_api/resources/shopify_payment.rb @@ -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 \ No newline at end of file