Class: CloudpaymentsRuby::Resources::Orders
- Inherits:
-
Object
- Object
- CloudpaymentsRuby::Resources::Orders
- Defined in:
- lib/cloudpayments_ruby/resources/orders.rb
Instance Method Summary collapse
-
#cancel(id:, request_options: {}) ⇒ CloudpaymentsRuby::Models::OrderCancelResponse
Отмена созданного счёта.
-
#create(amount:, description:, account_id: nil, culture_name: nil, currency: nil, email: nil, fail_redirect_url: nil, invoice_id: nil, json_data: nil, offer_uri: nil, phone: nil, require_confirmation: nil, send_email: nil, send_sms: nil, send_viber: nil, subscription_behavior: nil, success_redirect_url: nil, request_options: {}) ⇒ CloudpaymentsRuby::Models::OrderCreateResponse
Создание счёта для отправки по почте.
-
#initialize(client:) ⇒ Orders
constructor
private
A new instance of Orders.
Constructor Details
#initialize(client:) ⇒ Orders
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Orders.
90 91 92 |
# File 'lib/cloudpayments_ruby/resources/orders.rb', line 90 def initialize(client:) @client = client end |
Instance Method Details
#cancel(id:, request_options: {}) ⇒ CloudpaymentsRuby::Models::OrderCancelResponse
Отмена созданного счёта
Отменяет ранее созданный счёт. После отмены оплата по ссылке невозможна.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/cloudpayments_ruby/resources/orders.rb', line 76 def cancel(params) parsed, = CloudpaymentsRuby::OrderCancelParams.dump_request(params) @client.request( method: :post, path: "orders/cancel", body: parsed, model: CloudpaymentsRuby::Models::OrderCancelResponse, options: ) end |
#create(amount:, description:, account_id: nil, culture_name: nil, currency: nil, email: nil, fail_redirect_url: nil, invoice_id: nil, json_data: nil, offer_uri: nil, phone: nil, require_confirmation: nil, send_email: nil, send_sms: nil, send_viber: nil, subscription_behavior: nil, success_redirect_url: nil, request_options: {}) ⇒ CloudpaymentsRuby::Models::OrderCreateResponse
Создание счёта для отправки по почте
Создаёт ссылку на оплату и при необходимости отправляет уведомление плательщику по email, SMS или Viber.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cloudpayments_ruby/resources/orders.rb', line 52 def create(params) parsed, = CloudpaymentsRuby::OrderCreateParams.dump_request(params) @client.request( method: :post, path: "orders/create", body: parsed, model: CloudpaymentsRuby::Models::OrderCreateResponse, options: ) end |