Class: PayPal::SDK::Subscriptions::Product

Inherits:
RequestBase show all
Defined in:
lib/paypal-sdk/subscriptions/product.rb

Overview

Defined Under Namespace

Classes: Page

Instance Attribute Summary

Attributes inherited from RequestAPIBase

#error, #header, #request_id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestBase

#commit, #create, create!, find, #path

Methods inherited from RequestAPIBase

#http_header, #merge!, #raise_error!, raise_on_api_error, #success?

Methods included from RequestDataType

#api, api, #error=, included

Class Method Details

.all(options = {}) ⇒ Object

options include ‘page’, ‘page_size’, and ‘total_required’



43
44
45
# File 'lib/paypal-sdk/subscriptions/product.rb', line 43

def all(options = {})
  Page.new(api.get(path, options))
end

.path(resource_id = nil) ⇒ Object



38
39
40
# File 'lib/paypal-sdk/subscriptions/product.rb', line 38

def path(resource_id = nil)
  "v1/catalogs/products/#{resource_id}"
end

Instance Method Details

#update(patch) ⇒ Object

patch [Hash] { op: ‘replace’, path: , value: } path = [/description|/category|/image_url|/home_url]



17
18
19
# File 'lib/paypal-sdk/subscriptions/product.rb', line 17

def update(patch)
  super
end