Class: Zazu::Resources::PaymentLinks

Inherits:
Base
  • Object
show all
Defined in:
lib/zazu/resources/payment_links.rb

Overview

Standalone payment links (not attached to an invoice).

Constant Summary

Constants inherited from Base

Base::MAX_PER_PAGE

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Zazu::Resources::Base

Instance Method Details

#cancel(id) ⇒ Object

POST /api/payment_links/:id/cancel



29
30
31
# File 'lib/zazu/resources/payment_links.rb', line 29

def cancel(id)
  http_post(encode_path("api/payment_links", id, "cancel"))
end

#create(**attributes) ⇒ Object

POST /api/payment_links



24
25
26
# File 'lib/zazu/resources/payment_links.rb', line 24

def create(**attributes)
  http_post("api/payment_links", body: attributes)
end

#get(id) ⇒ Object

GET /api/payment_links/:id



19
20
21
# File 'lib/zazu/resources/payment_links.rb', line 19

def get(id)
  http_get(encode_path("api/payment_links", id))
end

#list(status: nil, link_type: nil, limit: MAX_PER_PAGE, cursor: nil) ⇒ Object

GET /api/payment_links



8
9
10
11
12
13
14
15
16
# File 'lib/zazu/resources/payment_links.rb', line 8

def list(status: nil, link_type: nil, limit: MAX_PER_PAGE, cursor: nil)
  list_page(
    "api/payment_links",
    status: status,
    link_type: link_type,
    limit: limit,
    cursor: cursor
  )
end