Class: Softlayer::Billing::Item::Cancellation::Request

Inherits:
Model
  • Object
show all
Defined in:
lib/softlayer/billing/item/cancellation/request.rb,
lib/softlayer/billing/item/cancellation/request/item.rb,
lib/softlayer/billing/item/cancellation/request/status.rb

Defined Under Namespace

Classes: Item, Representer, Status

Constant Summary collapse

SERVICE =
'SoftLayer_Billing_Item_Cancellation_Request'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

all, all_request_for, create, find, #init_headers, parse, request, #request, service_name, #to_hash

Methods included from Model::Operations

extended, #filter, included, #limit, #mask, #request_headers

Instance Attribute Details

#accountObject

Returns the value of attribute account.



18
19
20
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 18

def 
  @account
end

#account_idObject

Returns the value of attribute account_id.



9
10
11
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 9

def 
  @account_id
end

#billing_cancel_reason_idObject

Returns the value of attribute billing_cancel_reason_id.



10
11
12
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 10

def billing_cancel_reason_id
  @billing_cancel_reason_id
end

#create_dateObject

Returns the value of attribute create_date.



11
12
13
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 11

def create_date
  @create_date
end

#idObject

Returns the value of attribute id.



12
13
14
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 12

def id
  @id
end

#item_countObject

Returns the value of attribute item_count.



17
18
19
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 17

def item_count
  @item_count
end

#itemsObject

Returns the value of attribute items.



19
20
21
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 19

def items
  @items
end

#modify_dateObject

Returns the value of attribute modify_date.



13
14
15
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 13

def modify_date
  @modify_date
end

#notesObject

Returns the value of attribute notes.



14
15
16
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 14

def notes
  @notes
end

#statusObject

Returns the value of attribute status.



20
21
22
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 20

def status
  @status
end

#status_idObject

Returns the value of attribute status_id.



15
16
17
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 15

def status_id
  @status_id
end

#ticketObject

Returns the value of attribute ticket.



21
22
23
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 21

def ticket
  @ticket
end

#ticket_idObject

Returns the value of attribute ticket_id.



16
17
18
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 16

def ticket_id
  @ticket_id
end

#userObject

Returns the value of attribute user.



22
23
24
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 22

def user
  @user
end

Class Method Details

.create_object(template_object = nil) ⇒ Object



24
25
26
27
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 24

def self.create_object(template_object = nil)
  message = {template_object: template_object}
  request(:create_object, Softlayer::Billing::Item::Cancellation::Request, message)
end

.get_all_cancellation_requestsObject



33
34
35
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 33

def self.get_all_cancellation_requests
  request(:get_all_cancellation_requests, Array[Softlayer::Billing::Item::Cancellation::Request])
end

.get_cancellation_cutoff_date(account_id = nil, category_code = nil) ⇒ Object



37
38
39
40
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 37

def self.get_cancellation_cutoff_date( = nil, category_code = nil)
  message = {account_id: , category_code: category_code}
  request(:get_cancellation_cutoff_date, DateTime, message)
end

.validate_billing_item_for_cancellation(billing_item_id = nil) ⇒ Object



67
68
69
70
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 67

def self.validate_billing_item_for_cancellation(billing_item_id = nil)
  message = {billing_item_id: billing_item_id}
  request(:validate_billing_item_for_cancellation, Boolean, message)
end

Instance Method Details

#get_accountObject



29
30
31
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 29

def 
  request(:get_account, Softlayer::)
end

#get_itemsObject



42
43
44
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 42

def get_items
  request(:get_items, Array[Softlayer::Billing::Item::Cancellation::Request::Item])
end

#get_objectObject



46
47
48
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 46

def get_object
  request(:get_object, Softlayer::Billing::Item::Cancellation::Request)
end

#get_statusObject



50
51
52
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 50

def get_status
  request(:get_status, Softlayer::Billing::Item::Cancellation::Request::Status)
end

#get_ticketObject



54
55
56
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 54

def get_ticket
  request(:get_ticket, Softlayer::Ticket)
end

#get_userObject



58
59
60
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 58

def get_user
  request(:get_user, Softlayer::User::Customer)
end

#remove_cancellation_item(item_id = nil) ⇒ Object



62
63
64
65
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 62

def remove_cancellation_item(item_id = nil)
  message = {item_id: item_id}
  request(:remove_cancellation_item, Boolean, message)
end

#void(close_related_ticket_flag = nil) ⇒ Object



72
73
74
75
# File 'lib/softlayer/billing/item/cancellation/request.rb', line 72

def void(close_related_ticket_flag = nil)
  message = {close_related_ticket_flag: close_related_ticket_flag}
  request(:void, Boolean, message)
end