Class: Billingrails::Resources::PaymentPages
- Inherits:
-
Object
- Object
- Billingrails::Resources::PaymentPages
- Defined in:
- lib/billingrails/resources/payment_pages.rb
Overview
Payment pages resource
Instance Method Summary collapse
-
#create_payment_page(data) ⇒ Hash
Create payment page.
-
#initialize(client) ⇒ PaymentPages
constructor
A new instance of PaymentPages.
-
#list_payment_pages(params: nil) ⇒ Hash
List payment pages.
-
#retrieve_payment_page(id, params: nil) ⇒ Hash
Retrieve payment page.
-
#update_payment_page(id, data) ⇒ Hash
Update payment page.
Constructor Details
#initialize(client) ⇒ PaymentPages
Returns a new instance of PaymentPages.
10 11 12 |
# File 'lib/billingrails/resources/payment_pages.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#create_payment_page(data) ⇒ Hash
Create payment page
Creates a new payment page.
31 32 33 34 |
# File 'lib/billingrails/resources/payment_pages.rb', line 31 def create_payment_page(data) path = "/payment_pages" @client.request(:post, path, body: data) end |
#list_payment_pages(params: nil) ⇒ Hash
List payment pages
Retrieves a list of payment pages.
20 21 22 23 |
# File 'lib/billingrails/resources/payment_pages.rb', line 20 def list_payment_pages(params: nil) path = "/payment_pages" @client.request(:get, path, params: params) end |
#retrieve_payment_page(id, params: nil) ⇒ Hash
Retrieve payment page
Retrieves a payment page by ID.
43 44 45 46 |
# File 'lib/billingrails/resources/payment_pages.rb', line 43 def retrieve_payment_page(id, params: nil) path = "/payment_pages/#{id}" @client.request(:get, path, params: params) end |
#update_payment_page(id, data) ⇒ Hash
Update payment page
Updates a payment page.
55 56 57 58 |
# File 'lib/billingrails/resources/payment_pages.rb', line 55 def update_payment_page(id, data) path = "/payment_pages/#{id}" @client.request(:put, path, body: data) end |