Module: PaypalAPI::InvoiceTemplates::APIs
- Included in:
- PaypalAPI::InvoiceTemplates, PaypalAPI::InvoiceTemplates
- Defined in:
- lib/paypal-api/api_collections/invoice_templates.rb
Overview
Common methods for PaypalAPI::InvoiceTemplates class and client.invoice_templates instance
Instance Method Summary collapse
-
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create invoice template.
-
#delete(template_id, query: nil, body: nil, headers: nil) ⇒ Response
Fully update template.
-
#list(query: nil, body: nil, headers: nil) ⇒ Response
List templates.
-
#show(template_id, query: nil, body: nil, headers: nil) ⇒ Response
Show template details.
-
#update(template_id, query: nil, body: nil, headers: nil) ⇒ Response
Fully update template.
Instance Method Details
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create invoice template
27 28 29 |
# File 'lib/paypal-api/api_collections/invoice_templates.rb', line 27 def create(query: nil, body: nil, headers: nil) client.post("/v2/invoicing/templates", query: query, body: body, headers: headers) end |
#delete(template_id, query: nil, body: nil, headers: nil) ⇒ Response
Fully update template
74 75 76 |
# File 'lib/paypal-api/api_collections/invoice_templates.rb', line 74 def delete(template_id, query: nil, body: nil, headers: nil) client.delete("/v2/invoicing/templates/#{encode(template_id)}", query: query, body: body, headers: headers) end |
#list(query: nil, body: nil, headers: nil) ⇒ Response
List templates
38 39 40 |
# File 'lib/paypal-api/api_collections/invoice_templates.rb', line 38 def list(query: nil, body: nil, headers: nil) client.get("/v2/invoicing/templates", query: query, body: body, headers: headers) end |
#show(template_id, query: nil, body: nil, headers: nil) ⇒ Response
Show template details
50 51 52 |
# File 'lib/paypal-api/api_collections/invoice_templates.rb', line 50 def show(template_id, query: nil, body: nil, headers: nil) client.get("/v2/invoicing/templates/#{encode(template_id)}", query: query, body: body, headers: headers) end |
#update(template_id, query: nil, body: nil, headers: nil) ⇒ Response
Fully update template
62 63 64 |
# File 'lib/paypal-api/api_collections/invoice_templates.rb', line 62 def update(template_id, query: nil, body: nil, headers: nil) client.put("/v2/invoicing/templates/#{encode(template_id)}", query: query, body: body, headers: headers) end |